From 822984854913e1a545ba53b8d79143aa169d7287 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Mon, 12 Mar 2018 12:28:33 +0800 Subject: [PATCH] :lock: Update external URL using SSL --- .header.txt | 2 +- LICENSE | 2 +- README.md | 18 +++++++++--------- TERMS.md | 2 +- conf/user.go | 2 +- conf/wide.go | 2 +- editor/editors.go | 2 +- editor/formatter.go | 2 +- event/events.go | 2 +- file/decompress.go | 2 +- file/exporter.go | 2 +- file/files.go | 2 +- file/importer.go | 2 +- file/outline.go | 2 +- gulpfile.js | 2 +- i18n/locales.go | 2 +- log/logs.go | 2 +- log/logs_test.go | 2 +- main.go | 2 +- notification/notifications.go | 2 +- output/build.go | 2 +- output/cross.go | 2 +- output/get.go | 2 +- output/install.go | 2 +- output/namespace.go | 2 +- output/namespace_linux.go | 2 +- output/outputs.go | 2 +- output/processes.go | 2 +- output/run.go | 2 +- output/test.go | 2 +- output/vet.go | 2 +- playground/autocomplete.go | 2 +- playground/build.go | 2 +- playground/file.go | 2 +- playground/playgrounds.go | 2 +- playground/run.go | 2 +- scm/git/clone.go | 2 +- session/sessions.go | 2 +- session/users.go | 4 ++-- shell/shells.go | 2 +- static/css/about.css | 2 +- static/css/base.css | 2 +- static/css/dialog.css | 2 +- static/css/lib.min.css | 2 +- static/css/playground.css | 2 +- static/css/shell.css | 2 +- static/css/side.css | 2 +- static/css/sign.css | 2 +- static/css/start.css | 2 +- static/css/themes/dark.css | 2 +- static/css/themes/default.css | 2 +- static/css/wide.css | 2 +- static/css/wide.min.css | 2 +- static/js/bottomGroup.js | 2 +- static/js/dialog.js | 2 +- static/js/editors.js | 2 +- static/js/hotkeys.js | 2 +- static/js/lib.min.js | 2 +- .../lib/codemirror-5.1/mode/xquery/index.html | 2 +- static/js/menu.js | 2 +- static/js/notification.js | 2 +- .../codemirror/addon/hint/show-hint.js | 2 +- static/js/overwrite/codemirror/theme/wide.css | 2 +- static/js/playground.js | 2 +- static/js/session.js | 2 +- static/js/shell.js | 2 +- static/js/tabs.js | 2 +- static/js/tree.js | 2 +- static/js/wide.js | 2 +- static/js/wide.min.js | 2 +- static/js/wide.min.js.map | 2 +- static/js/windows.js | 2 +- util/file.go | 2 +- util/file_test.go | 2 +- util/go.go | 2 +- util/go_test.go | 2 +- util/net.go | 2 +- util/net_test.go | 2 +- util/os.go | 2 +- util/os_test.go | 2 +- util/panic.go | 2 +- util/panic_test.go | 2 +- util/rand.go | 2 +- util/rand_test.go | 2 +- util/ret.go | 2 +- util/string.go | 2 +- util/string_test.go | 2 +- util/websocket.go | 2 +- util/zip.go | 2 +- util/zip_test.go | 2 +- views/about.html | 4 ++-- views/index.html | 2 +- views/login.html | 4 ++-- views/playground/index.html | 2 +- views/sign_up.html | 4 ++-- views/start.html | 2 +- 96 files changed, 108 insertions(+), 108 deletions(-) diff --git a/.header.txt b/.header.txt index a724058..4b7b389 100644 --- a/.header.txt +++ b/.header.txt @@ -4,7 +4,7 @@ Licensed 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 + https://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, diff --git a/LICENSE b/LICENSE index 261eeb9..b447376 100644 --- a/LICENSE +++ b/LICENSE @@ -192,7 +192,7 @@ 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 + https://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, diff --git a/README.md b/README.md index e2cb33e..fb2e572 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# [Wide](https://github.com/b3log/wide) [![Build Status](https://img.shields.io/travis/b3log/wide.svg?style=flat)](https://travis-ci.org/b3log/wide) [![Go Report Card](https://goreportcard.com/badge/github.com/b3log/wide)](https://goreportcard.com/report/github.com/b3log/wide) [![Coverage Status](https://img.shields.io/coveralls/b3log/wide.svg?style=flat)](https://coveralls.io/r/b3log/wide) [![Apache License](http://img.shields.io/badge/license-apache2-orange.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) [![API Documentation](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](http://godoc.org/github.com/b3log/wide) [![Download](http://img.shields.io/badge/download-~4.3K-red.svg?style=flat)](http://pan.baidu.com/s/1dD3XwOT) +# [Wide](https://github.com/b3log/wide) [![Build Status](https://img.shields.io/travis/b3log/wide.svg?style=flat)](https://travis-ci.org/b3log/wide) [![Go Report Card](https://goreportcard.com/badge/github.com/b3log/wide)](https://goreportcard.com/report/github.com/b3log/wide) [![Coverage Status](https://img.shields.io/coveralls/b3log/wide.svg?style=flat)](https://coveralls.io/r/b3log/wide) [![Apache License](https://img.shields.io/badge/license-apache2-orange.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0) [![API Documentation](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/b3log/wide) [![Download](https://img.shields.io/badge/download-~4.3K-red.svg?style=flat)](https://pan.baidu.com/s/1dD3XwOT) -_Have a [try](http://wide.b3log.org/signup) first, then [download](http://pan.baidu.com/s/1dD3XwOT) and setup it on your local area network, enjoy yourself!_ +_Have a [try](https://wide.b3log.org/signup) first, then [download](https://pan.baidu.com/s/1dD3XwOT) and setup it on your local area network, enjoy yourself!_ -先试试我们搭建好的[在线服务](http://wide.b3log.org/signup),你可以在这里[下载](http://pan.baidu.com/s/1dD3XwOT)并在本地环境运行,然后邀请小伙伴们来玩吧! +先试试我们搭建好的[在线服务](https://wide.b3log.org/signup),你可以在这里[下载](https://pan.baidu.com/s/1dD3XwOT)并在本地环境运行,然后邀请小伙伴们来玩吧! -> * 关于 Wide 的产品定位,请看[这里](http://hacpai.com/article/1438407961481),并欢迎参与讨论~ -> * 加入[**黑客派**](http://hacpai.com/register),与其他程序员、设计师共同成长! +> * 关于 Wide 的产品定位,请看[这里](https://hacpai.com/article/1438407961481),并欢迎参与讨论~ +> * 加入[**黑客派**](https://hacpai.com/register),与其他程序员、设计师共同成长! ## Introduction @@ -49,7 +49,7 @@ Wide 的主要作者是 [Daniel](https://github.com/88250) 与 [Vanessa](https:/ * [X] Multiplayer: a real team development experience * [X] Navigation, Jump to declaration, Find usages, File search etc. * [X] Shell: run command on the server -* [X] Web development: HTML/JS/CSS editor with [Emmet](http://emmet.io) integrated +* [X] Web development: HTML/JS/CSS editor with [Emmet](https://emmet.io) integrated * [X] Go tool: go get/install/fmt etc. * [X] File Import & Export * [X] Themes: editor and UI adjust, respectively @@ -135,7 +135,7 @@ We have provided OS-specific executable binary as follows: * windows-amd64/386 * darwin-amd64/386 -Download [HERE](http://pan.baidu.com/s/1dD3XwOT)! +Download [HERE](https://pan.baidu.com/s/1dD3XwOT)! ### Build Wide for yourself @@ -159,7 +159,7 @@ Download [HERE](http://pan.baidu.com/s/1dD3XwOT)! ## Terms * This software is open sourced under the Apache License 2.0 -* You can not get rid of the "Powered by [B3log](http://b3log.org)" from any page, even which you made +* You can not get rid of the "Powered by [B3log](https://b3log.org)" from any page, even which you made * If you want to use this software for commercial purpose, please mail to support@liuyun.io for a commercial license request * Copyright © b3log.org, all rights reserved @@ -167,7 +167,7 @@ Download [HERE](http://pan.baidu.com/s/1dD3XwOT)! Wide is made possible by the following open source projects. -* [golang](http://golang.org) +* [golang](https://golang.org) * [CodeMirror](https://github.com/marijnh/CodeMirror) * [zTree](https://github.com/zTree/zTree_v3) * [LiteIDE](https://github.com/visualfc/liteide) diff --git a/TERMS.md b/TERMS.md index e1ed6ec..0fdd02a 100644 --- a/TERMS.md +++ b/TERMS.md @@ -1,4 +1,4 @@ * This software is open sourced under the Apache License 2.0 -* You can not get rid of the "Powered by [B3log](http://b3log.org)" from any pages, even the pages are developed by you +* You can not get rid of the "Powered by [B3log](https://b3log.org)" from any pages, even the pages are developed by you * If you want to use this software for commercial purpose, please mail to support@liuyun.io for request a commercial license * Copyright (c) b3log.org, all rights reserved diff --git a/conf/user.go b/conf/user.go index e88c097..4958937 100644 --- a/conf/user.go +++ b/conf/user.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/conf/wide.go b/conf/wide.go index b0ddc2f..4ff3ab6 100644 --- a/conf/wide.go +++ b/conf/wide.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/editor/editors.go b/editor/editors.go index 0fd5455..7b81a5e 100644 --- a/editor/editors.go +++ b/editor/editors.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/editor/formatter.go b/editor/formatter.go index 29ece3f..edbf047 100644 --- a/editor/formatter.go +++ b/editor/formatter.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/event/events.go b/event/events.go index bf74d5a..38eb922 100644 --- a/event/events.go +++ b/event/events.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/file/decompress.go b/file/decompress.go index cc103ac..8ff4a94 100644 --- a/file/decompress.go +++ b/file/decompress.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/file/exporter.go b/file/exporter.go index 74639f6..ddf21a8 100644 --- a/file/exporter.go +++ b/file/exporter.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/file/files.go b/file/files.go index efb38c2..d3bedf6 100644 --- a/file/files.go +++ b/file/files.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/file/importer.go b/file/importer.go index 384e590..ae2f67c 100644 --- a/file/importer.go +++ b/file/importer.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/file/outline.go b/file/outline.go index 0e2a4c3..a53079e 100755 --- a/file/outline.go +++ b/file/outline.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/gulpfile.js b/gulpfile.js index b93f6eb..7902f7c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/i18n/locales.go b/i18n/locales.go index 41092b4..5ca1fd4 100644 --- a/i18n/locales.go +++ b/i18n/locales.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/log/logs.go b/log/logs.go index c980534..1f19110 100755 --- a/log/logs.go +++ b/log/logs.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/log/logs_test.go b/log/logs_test.go index a04f4d0..7121e61 100644 --- a/log/logs_test.go +++ b/log/logs_test.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/main.go b/main.go index 91f77d5..3030030 100644 --- a/main.go +++ b/main.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/notification/notifications.go b/notification/notifications.go index 02afa4c..b04b260 100644 --- a/notification/notifications.go +++ b/notification/notifications.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/output/build.go b/output/build.go index 1299004..ed0dc9b 100644 --- a/output/build.go +++ b/output/build.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/output/cross.go b/output/cross.go index 6f516f8..35851a5 100644 --- a/output/cross.go +++ b/output/cross.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/output/get.go b/output/get.go index f1c28ba..671b509 100644 --- a/output/get.go +++ b/output/get.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/output/install.go b/output/install.go index 431bde3..f3bd300 100644 --- a/output/install.go +++ b/output/install.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/output/namespace.go b/output/namespace.go index eff146e..ffefc0f 100644 --- a/output/namespace.go +++ b/output/namespace.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/output/namespace_linux.go b/output/namespace_linux.go index 36b46f4..d2fbc41 100644 --- a/output/namespace_linux.go +++ b/output/namespace_linux.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/output/outputs.go b/output/outputs.go index fca07af..07f4b91 100644 --- a/output/outputs.go +++ b/output/outputs.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/output/processes.go b/output/processes.go index d3e9422..0d0e199 100644 --- a/output/processes.go +++ b/output/processes.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/output/run.go b/output/run.go index cfbb0c3..370ef2e 100644 --- a/output/run.go +++ b/output/run.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/output/test.go b/output/test.go index 62000b3..791b046 100644 --- a/output/test.go +++ b/output/test.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/output/vet.go b/output/vet.go index 21083fe..456523f 100644 --- a/output/vet.go +++ b/output/vet.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/playground/autocomplete.go b/playground/autocomplete.go index 6e783cb..675f786 100644 --- a/playground/autocomplete.go +++ b/playground/autocomplete.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/playground/build.go b/playground/build.go index 71be48f..d7bd090 100644 --- a/playground/build.go +++ b/playground/build.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/playground/file.go b/playground/file.go index 585d150..82f383f 100644 --- a/playground/file.go +++ b/playground/file.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/playground/playgrounds.go b/playground/playgrounds.go index 13c4660..d1cb2e3 100644 --- a/playground/playgrounds.go +++ b/playground/playgrounds.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/playground/run.go b/playground/run.go index 854e086..d6c2add 100644 --- a/playground/run.go +++ b/playground/run.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/scm/git/clone.go b/scm/git/clone.go index b873d34..671e7ea 100644 --- a/scm/git/clone.go +++ b/scm/git/clone.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/session/sessions.go b/session/sessions.go index c0dada7..f04eae1 100644 --- a/session/sessions.go +++ b/session/sessions.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/session/users.go b/session/users.go index 6f6b2b0..fb9bd93 100644 --- a/session/users.go +++ b/session/users.go @@ -4,7 +4,7 @@ // 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 +// https://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, @@ -478,7 +478,7 @@ func main() { port := getPort() // you may need to change the address - fmt.Println("Open http://wide.b3log.org:" + port + " in your browser to see the result") + fmt.Println("Open https://wide.b3log.org:" + port + " in your browser to see the result") if err := http.ListenAndServe(":"+port, nil); nil != err { fmt.Println(err) diff --git a/shell/shells.go b/shell/shells.go index 8c2df12..a1cdb38 100644 --- a/shell/shells.go +++ b/shell/shells.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/static/css/about.css b/static/css/about.css index b00695a..daf7819 100644 --- a/static/css/about.css +++ b/static/css/about.css @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/css/base.css b/static/css/base.css index 3846f94..353efbf 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/css/dialog.css b/static/css/dialog.css index 756b3b9..99ad1c1 100644 --- a/static/css/dialog.css +++ b/static/css/dialog.css @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/css/lib.min.css b/static/css/lib.min.css index 5139a55..7bed3b0 100644 --- a/static/css/lib.min.css +++ b/static/css/lib.min.css @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/css/playground.css b/static/css/playground.css index 514c236..637875c 100644 --- a/static/css/playground.css +++ b/static/css/playground.css @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/css/shell.css b/static/css/shell.css index 45ac06b..b361eaf 100644 --- a/static/css/shell.css +++ b/static/css/shell.css @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/css/side.css b/static/css/side.css index 83f2f87..dc5d2f8 100644 --- a/static/css/side.css +++ b/static/css/side.css @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/css/sign.css b/static/css/sign.css index 6451f44..876a752 100644 --- a/static/css/sign.css +++ b/static/css/sign.css @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/css/start.css b/static/css/start.css index 88abf44..ece2cdb 100644 --- a/static/css/start.css +++ b/static/css/start.css @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/css/themes/dark.css b/static/css/themes/dark.css index 8fa1092..f5a0fb3 100644 --- a/static/css/themes/dark.css +++ b/static/css/themes/dark.css @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/css/themes/default.css b/static/css/themes/default.css index 2e548f3..1a4a562 100644 --- a/static/css/themes/default.css +++ b/static/css/themes/default.css @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/css/wide.css b/static/css/wide.css index a61322d..b4a1b1f 100644 --- a/static/css/wide.css +++ b/static/css/wide.css @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/css/wide.min.css b/static/css/wide.min.css index cbc52a7..6d34747 100644 --- a/static/css/wide.min.css +++ b/static/css/wide.min.css @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/js/bottomGroup.js b/static/js/bottomGroup.js index d465b70..2ff8cdc 100644 --- a/static/js/bottomGroup.js +++ b/static/js/bottomGroup.js @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/js/dialog.js b/static/js/dialog.js index a1a764c..f9df147 100644 --- a/static/js/dialog.js +++ b/static/js/dialog.js @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/js/editors.js b/static/js/editors.js index df9ec66..2b3ce4d 100644 --- a/static/js/editors.js +++ b/static/js/editors.js @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/js/hotkeys.js b/static/js/hotkeys.js index 0ff3bf3..48b2f67 100644 --- a/static/js/hotkeys.js +++ b/static/js/hotkeys.js @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/js/lib.min.js b/static/js/lib.min.js index 2f74dbf..d01fc8d 100644 --- a/static/js/lib.min.js +++ b/static/js/lib.min.js @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/js/lib/codemirror-5.1/mode/xquery/index.html b/static/js/lib/codemirror-5.1/mode/xquery/index.html index 7ac5aae..1d95018 100644 --- a/static/js/lib/codemirror-5.1/mode/xquery/index.html +++ b/static/js/lib/codemirror-5.1/mode/xquery/index.html @@ -73,7 +73,7 @@ xquery version "1.0-ml"; : 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 + : https://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, diff --git a/static/js/menu.js b/static/js/menu.js index de0d297..e92e269 100644 --- a/static/js/menu.js +++ b/static/js/menu.js @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/js/notification.js b/static/js/notification.js index af142ac..7ac7d3c 100644 --- a/static/js/notification.js +++ b/static/js/notification.js @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/js/overwrite/codemirror/addon/hint/show-hint.js b/static/js/overwrite/codemirror/addon/hint/show-hint.js index 102e638..f8f313a 100644 --- a/static/js/overwrite/codemirror/addon/hint/show-hint.js +++ b/static/js/overwrite/codemirror/addon/hint/show-hint.js @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/js/overwrite/codemirror/theme/wide.css b/static/js/overwrite/codemirror/theme/wide.css index 657b2a4..86e380c 100644 --- a/static/js/overwrite/codemirror/theme/wide.css +++ b/static/js/overwrite/codemirror/theme/wide.css @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/js/playground.js b/static/js/playground.js index 5790e95..5c4f564 100644 --- a/static/js/playground.js +++ b/static/js/playground.js @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/js/session.js b/static/js/session.js index 2330b2e..7f2e45f 100644 --- a/static/js/session.js +++ b/static/js/session.js @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/js/shell.js b/static/js/shell.js index 74dd3ff..9cd2720 100644 --- a/static/js/shell.js +++ b/static/js/shell.js @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/js/tabs.js b/static/js/tabs.js index ece553f..b37d568 100644 --- a/static/js/tabs.js +++ b/static/js/tabs.js @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/js/tree.js b/static/js/tree.js index bc643f2..371d864 100644 --- a/static/js/tree.js +++ b/static/js/tree.js @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/js/wide.js b/static/js/wide.js index 20ee700..69662d3 100644 --- a/static/js/wide.js +++ b/static/js/wide.js @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/js/wide.min.js b/static/js/wide.min.js index d6bd8f2..8021023 100644 --- a/static/js/wide.min.js +++ b/static/js/wide.min.js @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/static/js/wide.min.js.map b/static/js/wide.min.js.map index fbfa3d2..90f9a35 100644 --- a/static/js/wide.min.js.map +++ b/static/js/wide.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["tabs.js","dialog.js","editors.js","notification.js","tree.js","wide.js","session.js","menu.js","windows.js","hotkeys.js","bottomGroup.js"],"names":["Tabs","obj","_$tabsPanel","$","id","_$tabs","_stack","this","STACKSIZE","_init","_it","each","data","length","splice","push","extend","prototype","_that","on","event","hasClass","setCurrent","clickAfter","parent","isRemove","removeBefore","del","stopPropagation","_hasId","$tabs","find","add","getCurrentId","$tabsPanel","append","title","content","after","stack","prevId","children","remove","i","removeAfter","path","$currentTab","removeClass","hide","addClass","show","setAfter","tId","tree","getTIdByPath","node","fileTree","getNodeByTId","selectNode","wide","curNode","ii","editors","curEditor","editor","cursor","getCursor","setCursor","focus","refreshOutline","text","line","ch","fn","dialog","version","author","dpuuid","Date","getTime","PROP_NAME","Dialog","_defaults","styleClass","background","panel","main","footer","headerMiddle","headerBg","closeIcon","closeIconHover","_attach","target","settings","uuid","inst","_newInst","replace","_getInst","err","_destroyDialog","removeData","prependTo","unwrap","removeAttr","_getDefaults","windowH","window","height","windowW","width","dialogH","parseInt","dialogW","okText","cancelText","footerHTML","headerHTML","hideFooter","hiddenOk","dialogHTML","bgHTML","modal","bgHeight","document","documentElement","scrollHeight","wrap","cloneObj","clone","get","bind","_close","$buttons","undefined","ok","_bindMove","keyup","keyCode","resize","afterInit","className","mousedown","_document","getElementById","x","clientX","style","left","y","clientY","top","ondragstart","onselectstart","onselect","setCapture","captureEvents","Event","MOUSEMOVE","MOUSEUP","onmousemove","positionX","positionY","onmouseup","releaseCapture","css","close","_closeDialog","_openDialog","msg","$dialog","position","afterOpen","_updateDialog","html","defaults","key","theme","styleName","options","otherArgs","Array","slice","call","arguments","shift","apply","concat","jQuery","autocompleteMutex","tabs","getEditorByPath","click","closeOther","currentIndex","firstIndex","_removeAllMarker","removeIndex","_initClose","ZeroClipboard","button","screenX","attr","init","config","label","tip","fileName","file","confirm_save","fmt","doc","isClean","nextId","menu","disabled","cancelSelectedNode","_initCodeMirrorHotKeys","openStartPage","dateFormat","time","date","dateObj","M+","getMonth","d+","getDate","h+","getHours","m+","getMinutes","s+","getSeconds","q+","Math","floor","S","getMilliseconds","test","RegExp","$1","getFullYear","substr","k","start_page","load","context","wideSessionId","ajax","url","type","dataType","jsonp","success","textStatus","articles","listHTML","community","article","articlePermalink","articleTitle","articleCreateTime","ret","getCurrentPath","currentPath","CodeMirror","registerHelper","word","cur","curLine","getLine","start","end","charAt","request","newWideRequest","code","getValue","cursorLine","cursorCh","autocompleteHints","state","completionActive","async","JSON","stringify","autocompleteArray","displayText","name","substring","console","warn","markClean","setTimeout","list","from","Pos","to","commands","autocompleteAfterDot","cm","mode","getMode","Pass","token","getTokenAt","showHint","hint","go","completeSingle","autocompleteAnyWord","auto","gotoLine","doNothing","exprInfo","result","succ","cursorCoords","copyLinesDown","selectoion","listSelections","anchor","head","max","replaceToLine","replaceRange","offset","setSelection","copyLinesUp","moveLinesUp","moveLinesDown","lastLine","jumpToDecl","openFile","findUsages","appendSearch","selectIdentifier","findWordAt","extendSelection","searcHTML","toLowerCase","contents","lowerCaseContents","matches","split","startIndex","endIndex","j","keyWord","search_no_match","$search","find_usages","search_text","bottomGroup","searchTab","$it","half","getScrollInfo","clientHeight","defaultTextHeight","scrollTo","windows","flowBottom","newEditor","iconSkin","undisabled","textArea","value","fromTextArea","lineNumbers","autofocus","autoCloseBrackets","matchBrackets","highlightSelectionMatches","showToken","rulers","color","column","lineStyle","styleActiveLine","editorTheme","tabSize","editorTabSize","indentUnit","indentWithTabs","foldGutter","cursorHeight","readOnly","isGOAPI","profile","extraKeys","Ctrl-\\",".","Ctrl-/","Ctrl-I","Ctrl-L","Ctrl-E","Ctrl-D","Ctrl-B","Ctrl-S","saveFile","Shift-Ctrl-S","saveAllFiles","Shift-Alt-F","Alt-F7","Shift-Alt-Enter","isMaxEditor","restoreEditor","maxEditor","Shift-Ctrl-Up","Shift-Ctrl-Down","Shift-Alt-Up","Shift-Alt-Down","Shift-Alt-J","emmetCodeMirror","$span","evt","altKey","ctrlKey","shiftKey","which","autocomplete","random","setSize","setOption","keymap","notification","_initWS","notificationWS","ReconnectingWebSocket","channel","onopen","log","onmessage","e","parse","$notification","notificationHTML","cmd","severity","message","onclose","onerror","getCurrentNodeLastNode","returnNode","open","getNextShowNode","level","getParentNode","getNextNode","isBottomNode","isLastNode","nodes","transformToArray","getNodes","getOpenPaths","paths","getAllParents","parents","parentTId","isParents","parentPath","parentNode","isDir","indexOf","newFile","it","newDir","removeIt","removable","rename","export","isSucc","crossCompile","platform","decompress","dir","reAsyncChildNodes","refresh","gitClone","import","fileupload","formData","done","fail","$dirRMenu","$fileRMenu","setting","view","showTitle","selectedMulti","enable","autoParam","callback","onDblClick","treeId","treeNode","onRightClick","creatable","display","onClick","clickFlag","zTree","session","restore","_initSearch","_initRename","tempCursor","findModeByFileName","mime","error","$okBtn","closest","prop","trim","val","search","cancel","extension","select","oldPath","newPath","lastIndexOf","curProcessId","outlineHTML","decls","maxj","Ch","Line","Name","dblclick","_initDialog","confirm","create_file","create","fileType","create_dir","goto_file","$list","hotkeys","bindList","$selected","goFileHTML","icoSkin","getClassBySuffix","goto_line","git_clone","repository","outputWS","goLintFound","nextCmd","executable","fillOutput","output","pid","build_n_run","lints","files","lint","lineNo","signal","_initFooter","unbind","subMenu","onbeforeunload","oncontextmenu","_save","getOption","gofmt","beforeSend","resetOutput","stop","run","scrollInfo","setValue","formatted","html_beautify","js_beautify","css_beautify","suffix","ready","getLayoutState","paneState","isClosed","size","setInterval","filse","currentId","currentFile","layout","side","outerLayout","west","sideRight","innerLayout","east","bottom","south","latestSessionContent","nodesToOpen","jj","isOpen","l","expandNode","kk","m","mm","n","nn","c","sessionWS","addNodes","isParent","removeNode","_initPreference","_initAbout","_initShare","hover","pic","urls","email","twitterShare","encodeURIComponent","twitter","facebook","googleplus","weibo","tencent","about","wideVersion","uptodate","new_version_available","colon","wideDownload","mouseover","openPreference","closeAllFiles","exit","location","href","openAbout","goget","goinstall","govet","build","isChange","emptys","emptysTip","tabIndex","no_empty","preference","$dialogPreference","$fontFamily","$fontSize","$goFmt","$GoBuildArgsForLinux","$GoBuildArgsForWindows","$GoBuildArgsForDarwin","$workspace","$password","$email","$locale","$theme","$editorFontFamily","$editorFontSize","$editorLineHeight","$editorTheme","$editorTabSize","$keymap","fontFamily","fontSize","goFmt","GoBuildArgsForLinux","GoBuildArgsForWindows","GoBuildArgsForDarwin","workspace","password","locale","editorFontFamily","editorFontSize","editorLineHeight","reload","jqXHR","staticServer","north__paneSelector","center__paneSelector","south__paneSelector","north__size","south__size","spacing_open","north__spacing_open","south__spacing_open","fxSpeed_open","fxSpeed_close","fxSettings_close","easing","fxSettings_open","paneSelector","togglerLength_open","togglerLength_closed","togglerAlign_closed","slideTrigger_open","spacing_closed","minSize","togglerClass","togglerTip_open","min","togglerTip_closed","restore_side","resizerTip","initClosed","center","restore_outline","restore_bottom","ondrag_end","pane","refreshEditor","onresize_end","onclose_end","onopen_end","onshow_end","addCloseBtn","maxSide","maxSideRight","maxBottom","toggleEditor","restoreBottom","restoreSide","restoreSideRight","sizePane","max_editor","editorDatas","slideOpen","defaultKeyMap","goEditor","fun","goFileTree","goOutline","goOutput","goSearch","goNotification","clearWindow","changeEditor","closeCurEditor","goFile","buildRun","$source","enterFun","keydown","index","count","scrollTop","offsetTop","_bindOutput","hotKeys","clear","preventDefault","_bindFileTree","isFirstNode","getPreNode","preNode","nextShowNode","_bindDocument","activeElement","nextPath","nextTId","_initTabs","_initFrame","$path","mouseup","offsetY","$output","Autolinker","link"],"mappings":"AAsBA,GAAIA,MAAO,SAAUC,GACjBA,EAAIC,YAAcC,EAAEF,EAAIG,GAAK,kBAC7BH,EAAII,OAASF,EAAEF,EAAIG,GAAK,YACxBH,EAAIK,UAEJC,KAAKN,IAAMA,EACXM,KAAKN,IAAIO,UAAY,GAErBD,KAAKE,MAAMR,EAGX,IAAIS,GAAMH,IACVJ,GAAEF,EAAIG,GAAK,kBAAkBO,KAAK,WAC9B,GAAIP,GAAKD,EAAEI,MAAMK,KAAK,QAClBX,GAAIK,OAAOO,SAAWH,EAAIT,IAAIO,WAC9BP,EAAIK,OAAOQ,OAAO,EAAG,GAErBb,EAAIK,OAAOL,EAAIK,OAAOO,OAAS,KAAOT,GACtCM,EAAIT,IAAIK,OAAOS,KAAKX,KAMhCD,GAAEa,OAAOhB,KAAKiB,WACVR,MAAO,SAAUR,GACb,GAAIiB,GAAQX,IAEZN,GAAII,OAAOc,GAAG,QAAS,MAAO,SAAUC,GACpC,GAAIjB,EAAEI,MAAMc,SAAS,WACjB,OAAO,CAGX,IAAIjB,GAAKD,EAAEI,MAAMK,KAAK,QACtBM,GAAMI,WAAWlB,GACe,kBAApBH,GAAc,YACtBA,EAAIsB,WAAWnB,KAIvBH,EAAII,OAAOc,GAAG,QAAS,aAAc,SAAUC,GAC3C,G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AKqc,QAAQ,WACpBrc,EAAOyvB,WAAWC,KAAK1vB,IAG3BwvB,EAAQruB,KAAK,OAAOgJ,KAAKnK,GACzBwvB,EAAQ5uB,SAASwtB,UAAUoB,EAAQ,GAAGroB","file":"wide.min.js","sourcesContent":["/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file tabs.js\n *\n * @author Liyuan Li\n * @version 1.0.0.1, Dec 8, 2015\n */\nvar Tabs = function (obj) {\n obj._$tabsPanel = $(obj.id + \" > .tabs-panel\");\n obj._$tabs = $(obj.id + \" > .tabs\");\n obj._stack = [];\n\n this.obj = obj;\n this.obj.STACKSIZE = 64;\n\n this._init(obj);\n\n // DOM 元素存在时,应顺序入栈\n var _it = this;\n $(obj.id + \" > .tabs > div\").each(function () {\n var id = $(this).data(\"index\");\n if (obj._stack.length === _it.obj.STACKSIZE) {\n obj._stack.splice(0, 1);\n }\n if (obj._stack[obj._stack.length - 1] !== id) {\n _it.obj._stack.push(id);\n }\n });\n\n};\n\n$.extend(Tabs.prototype, {\n _init: function (obj) {\n var _that = this;\n\n obj._$tabs.on(\"click\", \"div\", function (event) {\n if ($(this).hasClass('current')) {\n return false;\n }\n\n var id = $(this).data(\"index\");\n _that.setCurrent(id);\n if (typeof (obj.clickAfter) === \"function\") {\n obj.clickAfter(id);\n }\n });\n\n obj._$tabs.on(\"click\", \".ico-close\", function (event) {\n var id = $(this).parent().data(\"index\"),\n isRemove = true;\n\n if (typeof obj.removeBefore === 'function') {\n isRemove = obj.removeBefore(id);\n }\n\n if (isRemove) {\n _that.del(id);\n }\n event.stopPropagation();\n });\n },\n _hasId: function (id) {\n var $tabs = this.obj._$tabs;\n if ($tabs.find('div[data-index=\"' + id + '\"]').length === 0) {\n return false;\n }\n return true;\n },\n add: function (data) {\n // 添加当前 tab\n if (this.getCurrentId() === data.id) {\n return false;\n }\n\n // 当前 tab 已经存在\n if (this._hasId(data.id)) {\n this.setCurrent(data.id);\n return false;\n }\n\n var $tabsPanel = this.obj._$tabsPanel,\n $tabs = this.obj._$tabs;\n\n $tabs.append('
'\n + data.title + '
');\n $tabsPanel.append('
' + data.content\n + '
');\n\n this.setCurrent(data.id);\n\n if (typeof data.after === 'function') {\n data.after();\n }\n },\n del: function (id) {\n var $tabsPanel = this.obj._$tabsPanel,\n $tabs = this.obj._$tabs,\n stack = this.obj._stack,\n prevId = null;\n\n $tabs.children(\"div[data-index='\" + id + \"']\").remove();\n $tabsPanel.children(\"div[data-index='\" + id + \"']\").remove();\n\n // 移除堆栈中该 id\n for (var i = 0; i < stack.length; i++) {\n if (id === stack[i]) {\n stack.splice(i, 1);\n i--;\n }\n }\n\n prevId = stack[stack.length - 1];\n\n if (typeof this.obj.removeAfter === 'function') {\n this.obj.removeAfter(id, prevId);\n }\n\n this.setCurrent(prevId);\n },\n getCurrentId: function () {\n var $tabs = this.obj._$tabs;\n return $tabs.children(\".current\").data(\"index\");\n },\n setCurrent: function (path) {\n if (!path) {\n return false;\n }\n\n var $tabsPanel = this.obj._$tabsPanel,\n $tabs = this.obj._$tabs;\n\n var $currentTab = $tabs.children(\".current\");\n if ($currentTab.data(\"index\") === path) {\n return false;\n }\n\n // tab 顺序入栈,如栈满则清除\n var stack = this.obj._stack;\n if (stack.length === this.obj.STACKSIZE) {\n stack.splice(0, 1);\n }\n if (stack[stack.length - 1] !== path) {\n this.obj._stack.push(path);\n }\n\n $tabs.children(\"div\").removeClass(\"current\");\n $tabsPanel.children(\"div\").hide();\n\n $tabs.children('div[data-index=\"' + path + '\"]').addClass(\"current\");\n $tabsPanel.children('div[data-index=\"' + path + '\"]').show();\n\n if (typeof this.obj.setAfter === 'function') {\n this.obj.setAfter();\n }\n\n var id = this.getCurrentId();\n if (\"startPage\" === id) {\n return;\n }\n\n // set tree node selected\n var tId = tree.getTIdByPath(id);\n var node = tree.fileTree.getNodeByTId(tId);\n tree.fileTree.selectNode(node);\n wide.curNode = node;\n\n for (var i = 0, ii = editors.data.length; i < ii; i++) {\n if (editors.data[i].id === id) {\n wide.curEditor = editors.data[i].editor;\n break;\n }\n }\n\n if (wide.curEditor) {\n var cursor = wide.curEditor.getCursor();\n wide.curEditor.setCursor(cursor);\n wide.curEditor.focus();\n wide.refreshOutline();\n\n $(\".footer .cursor\").text('| ' + (cursor.line + 1) + ':' + (cursor.ch + 1) + ' |');\n }\n }\n});","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file dialog.js\n *\n * @author Liyuan Li\n * @version 1.0.0.1, Dec 8, 2015\n */\n(function ($) {\n $.fn.extend({\n dialog: {\n version: \"0.0.1.7\",\n author: \"lly219@gmail.com\"\n }\n });\n\n var dpuuid = new Date().getTime();\n var PROP_NAME = 'dialog';\n\n var Dialog = function () {\n this._defaults = {\n \"styleClass\": {\n \"background\": \"dialog-background\",\n \"panel\": \"dialog-panel\",\n \"main\": \"dialog-main\",\n \"footer\": \"dialog-footer\",\n \"headerMiddle\": \"dialog-header-middle\",\n \"headerBg\": \"dialog-header-bg\",\n \"closeIcon\": \"dialog-close-icon\",\n \"closeIconHover\": \"dialog-close-icon-hover\",\n \"title\": \"dialog-title\"\n }\n };\n };\n\n $.extend(Dialog.prototype, {\n _attach: function (target, settings) {\n if (!target.id) {\n this.uuid++;\n target.id = 'dp' + this.uuid;\n }\n var inst = this._newInst($(target));\n\n inst.settings = $.extend({}, settings || {});\n $.data(target, PROP_NAME, inst);\n this._init(target);\n },\n /* Create a new instance object. */\n _newInst: function (target) {\n // escape jQuery meta chars\n var id = target[0].id.replace(/([^A-Za-z0-9_])/g, '\\\\\\\\$1');\n return {\n id: id\n };\n },\n _getInst: function (target) {\n try {\n return $.data(target, PROP_NAME);\n } catch (err) {\n throw 'Missing instance data for this dialog';\n }\n },\n _destroyDialog: function (target) {\n var inst = $.dialog._getInst(target);\n var id = inst.id;\n $.removeData(target, PROP_NAME);\n\n $(target).prependTo(\"#\" + id + \"Wrap\").unwrap();\n $(target).removeAttr(\"style\");\n\n var styleClass = this._getDefaults($.dialog._defaults, inst.settings, \"styleClass\");\n $(\".\" + styleClass.background).remove();\n $(\"#\" + id + \"Dialog\").remove();\n },\n _init: function (target) {\n var inst = this._getInst(target);\n var id = inst.id,\n settings = inst.settings;\n var windowH = $(window).height(),\n windowW = $(window).width();\n var styleClass = this._getDefaults($.dialog._defaults, settings, \"styleClass\"),\n dialogH = settings.height ? settings.height : parseInt(windowH * 0.6),\n dialogW = settings.width ? settings.width : parseInt(windowW * 0.6);\n\n // get settings or default value.\n settings.title = settings.title ? settings.title : \"\";\n settings.okText = settings.okText ? settings.okText : \"Ok\";\n settings.cancelText = settings.cancelText ? settings.cancelText : \"Cancel\";\n\n // build HTML.\n var footerHTML = \"\",\n headerHTML = \"
\"\n + settings.title + \"
\";\n\n // Sets footerHTML.\n if (!settings.hideFooter) {\n if (!settings.hiddenOk) {\n footerHTML = \"\";\n }\n footerHTML += \"\";\n }\n\n var dialogHTML = \"
\" + headerHTML\n + \"
\"\n + footerHTML + \"
\";\n\n var bgHTML = \"\";\n if (settings.modal && $(\".\" + styleClass.background).length === 0) {\n var bgHeight = windowH < document.documentElement.scrollHeight\n ? document.documentElement.scrollHeight : windowH;\n bgHTML = \"
\";\n }\n\n // Package dialog.\n $(\"#\" + id).wrap(\"
\");\n var cloneObj = $(target).clone(true);\n $(target).remove();\n $('body').append(bgHTML + dialogHTML);\n $($(\"#\" + id + \"Dialog .\" + styleClass.main + \" div\").get(0)).append(cloneObj);\n $(cloneObj).show();\n\n // Bind event.\n $(\"#\" + id + \"Dialog .\" + styleClass.closeIcon).bind(\"click\", function () {\n $.dialog._close(id, settings);\n });\n\n var $buttons = $(\"#\" + id + \"Dialog .\" + styleClass.footer + \" button\");\n $($buttons.get(1)).bind(\"click\", function () {\n $.dialog._close(id, settings);\n });\n\n $($buttons.get(0)).bind(\"click\", function () {\n if (settings.ok === undefined || settings.ok()) {\n $.dialog._close(id, settings);\n }\n });\n\n this._bindMove(id, styleClass.headerBg, dialogH, dialogW);\n\n // esc exit\n $(window).keyup(function (event) {\n if (event.keyCode === 27) {\n $.dialog._close(id, settings);\n }\n });\n\n $(window).resize(function () {\n var height = $(\"body\").height() > $(window).height() ? $(\"body\").height() : $(window).height();\n $(\".dialog-background\").height(height);\n });\n\n if (typeof settings.afterInit === \"function\") {\n settings.afterInit();\n }\n },\n _bindMove: function (id, className) {\n $(\"#\" + id + \"Dialog .\" + className).mousedown(function (event) {\n var _document = document;\n if (!event) {\n event = window.event;\n }\n var dialog = document.getElementById(id + \"Dialog\");\n var x = event.clientX - parseInt(dialog.style.left),\n y = event.clientY - parseInt(dialog.style.top);\n _document.ondragstart = \"return false;\";\n _document.onselectstart = \"return false;\";\n _document.onselect = \"document.selection.empty();\";\n\n if (this.setCapture) {\n this.setCapture();\n } else if (window.captureEvents) {\n window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP);\n }\n\n _document.onmousemove = function (event) {\n if (!event) {\n event = window.event;\n }\n var positionX = event.clientX - x,\n positionY = event.clientY - y;\n if (positionX < 0) {\n positionX = 0;\n }\n if (positionX > $(window).width() - $(dialog).width()) {\n positionX = $(window).width() - $(dialog).width();\n }\n if (positionY > $(window).height() - $(dialog).height()) {\n positionY = $(window).height() - $(dialog).height();\n }\n if (positionY < 0) {\n positionY = 0;\n }\n dialog.style.left = positionX + \"px\";\n dialog.style.top = positionY + \"px\";\n };\n\n _document.onmouseup = function () {\n if (this.releaseCapture) {\n this.releaseCapture();\n } else if (window.captureEvents) {\n window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP);\n }\n _document.onmousemove = null;\n _document.onmouseup = null;\n _document.ondragstart = null;\n _document.onselectstart = null;\n _document.onselect = null;\n };\n });\n },\n _close: function (id, settings) {\n if ($(\"#\" + id + \"Dialog\").css(\"display\") === \"none\") {\n return;\n }\n if (settings.close === undefined || settings.close()) {\n $(\"#\" + id + \"Dialog\").hide();\n if (settings.modal) {\n var styleClass = this._getDefaults($.dialog._defaults, settings, \"styleClass\");\n $(\".\" + styleClass.background).hide();\n }\n }\n },\n _closeDialog: function (target) {\n var inst = this._getInst(target);\n var id = inst.id,\n settings = inst.settings;\n $.dialog._close(id, settings);\n },\n _openDialog: function (target, msg) {\n var inst = this._getInst(target);\n var id = inst.id,\n settings = inst.settings,\n top = \"\", left = \"\",\n $dialog = $(\"#\" + id + \"Dialog\"),\n windowH = $(window).height(),\n windowW = $(window).width(),\n dialogH = settings.height ? settings.height : parseInt(windowH * 0.6),\n dialogW = settings.width ? settings.width : parseInt(windowW * 0.6);\n\n // Sets position.\n if (settings.position) {\n top = settings.position.top;\n left = settings.position.left;\n } else {\n // 20(footer) + 23(header)\n top = parseInt((windowH - dialogH - 43) / 2);\n if (top < 0) {\n top = 0;\n }\n left = parseInt((windowW - dialogW) / 2);\n }\n $dialog.css({\n \"top\": top + \"px\",\n \"left\": left + \"px\"\n }).show();\n\n if (settings.modal) {\n var styleClass = this._getDefaults($.dialog._defaults, settings, \"styleClass\");\n $(\".\" + styleClass.background).show();\n }\n\n if (typeof settings.afterOpen === \"function\") {\n settings.afterOpen(msg);\n }\n\n $(\"#\" + id + \"Dialog .dialog-footer button:eq(0)\").focus();\n },\n _updateDialog: function (target, data) {\n var inst = this._getInst(target);\n var id = inst.id,\n settings = inst.settings;\n var styleClass = this._getDefaults($.dialog._defaults, settings, \"styleClass\");\n $.extend(settings, data);\n var $dialog = $(\"#\" + id + \"Dialog\");\n if (data.position) {\n $dialog.css({\n \"top\": data.position.top,\n \"left\": data.position.left\n });\n }\n\n if (data.width) {\n $dialog.width(data.width + 26);\n $dialog.find(\".\" + styleClass.main + \" div\")[0].style.width = data.width + \"px\";\n $dialog.find(\".\" + styleClass.headerBg).width(data.width + 18);\n }\n\n if (data.height) {\n $dialog.find(\".\" + styleClass.main + \" div\")[0].style.height = data.height + \"px\";\n }\n\n if (data.title) {\n $dialog.find(\".\" + styleClass.title).html(data.title);\n }\n\n if (data.modal !== undefined) {\n if (data.modal) {\n $(\".\" + styleClass.background).show();\n } else {\n $(\".\" + styleClass.background).hide();\n }\n }\n\n if (data.hideFooter !== undefined) {\n if (data.hideFooter) {\n $dialog.find(\".\" + styleClass.footer).hide();\n } else {\n $dialog.find(\".\" + styleClass.footer).show();\n }\n }\n\n },\n _getDefaults: function (defaults, settings, key) {\n if (key === \"styleClass\") {\n if (settings.theme === \"default\" || settings.theme === undefined) {\n return defaults.styleClass;\n }\n settings.styleClass = {};\n for (var styleName in defaults[key]) {\n settings.styleClass[styleName] = settings.theme + \"-\" + defaults.styleClass[styleName];\n }\n } else if (key === \"height\" || key === \"width\") {\n if (settings[key] === null || settings[key] === undefined) {\n return \"auto\";\n } else {\n return settings[key] + \"px\";\n }\n } else {\n if (settings[key] === null || settings[key] === undefined) {\n return defaults[key];\n }\n }\n return settings[key];\n }\n });\n\n $.fn.dialog = function (options) {\n var otherArgs = Array.prototype.slice.call(arguments);\n\n if (typeof options === 'string') {\n otherArgs.shift();\n return $.dialog['_' + options + 'Dialog'].apply($.dialog, [this[0]].concat(otherArgs));\n }\n return this.each(function () {\n $.dialog._attach(this, options);\n });\n };\n\n $.dialog = new Dialog();\n\n // Add another global to avoid noConflict issues with inline event handlers\n window['DP_jQuery_' + dpuuid] = $;\n})(jQuery);","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file editor.js\n *\n * @author Liyuan Li\n * @author Liang Ding\n * @version 1.1.1.0, Jan 12, 2016\n */\nvar editors = {\n autocompleteMutex: false,\n data: [],\n tabs: {},\n getEditorByPath: function (path) {\n for (var i = 0, ii = editors.data.length; i < ii; i++) {\n if (editors.data[i].editor.options.path === path) {\n return editors.data[i].editor;\n }\n }\n },\n close: function () {\n $('.edit-panel .tabs > div[data-index=\"' + $('.edit-panel .frame').data('index') + ']').find('.ico-close').click();\n },\n closeOther: function () {\n var currentIndex = $(\".edit-panel .frame\").data(\"index\");\n\n // 设置全部关闭标识\n var removeData = [];\n $(\".edit-panel .tabs > div\").each(function (i) {\n if (currentIndex !== $(this).data(\"index\")) {\n removeData.push($(this).data(\"index\"));\n }\n });\n if (removeData.length === 0) {\n return false;\n }\n var firstIndex = removeData.splice(0, 1);\n $(\"#dialogCloseEditor\").data(\"removeData\", removeData);\n // 开始关闭\n $('.edit-panel .tabs > div[data-index=\"' + firstIndex + '\"]').find(\".ico-close\").click();\n },\n _removeAllMarker: function () {\n var removeData = $(\"#dialogCloseEditor\").data(\"removeData\");\n if (removeData && removeData.length > 0) {\n var removeIndex = removeData.splice(0, 1);\n $(\"#dialogCloseEditor\").data(\"removeData\", removeData);\n $('.edit-panel .tabs > div[data-index=\"' + removeIndex + '\"] .ico-close').click();\n }\n if (wide.curEditor) {\n wide.curEditor.focus();\n }\n },\n _initClose: function () {\n new ZeroClipboard($(\"#copyFilePath\"));\n\n // 关闭、关闭其他、关闭所有\n $(\".edit-panel\").on(\"mouseup\", '.tabs > div', function (event) {\n event.stopPropagation();\n\n if (event.button === 0) { // 左键\n $(\".edit-panel .frame\").hide();\n return false;\n }\n\n // event.button === 2 右键\n var left = event.screenX;\n if ($(\".side\").css(\"left\") === \"auto\" || $(\".side\").css(\"left\") === \"0px\") {\n left = event.screenX - $(\".side\").width();\n }\n $(\".edit-panel .frame\").show().css({\n \"left\": left + \"px\",\n \"top\": \"21px\"\n }).data('index', $(this).data(\"index\"));\n\n $(\"#copyFilePath\").attr('data-clipboard-text', $(this).find(\"span:eq(0)\").attr(\"title\"));\n return false;\n });\n },\n init: function () {\n $(\"#dialogCloseEditor\").dialog({\n \"modal\": true,\n \"height\": 90,\n \"width\": 260,\n \"title\": config.label.tip,\n \"hideFooter\": true,\n \"afterOpen\": function (fileName) {\n $(\"#dialogCloseEditor > div:eq(0)\").html(config.label.file\n + ' ' + fileName + '. ' + config.label.confirm_save + '?');\n $(\"#dialogCloseEditor button:eq(0)\").focus();\n },\n \"afterInit\": function () {\n $(\"#dialogCloseEditor button.save\").click(function () {\n var i = $(\"#dialogCloseEditor\").data(\"index\");\n wide.fmt(editors.data[i].id, editors.data[i].editor);\n editors.tabs.del(editors.data[i].id);\n $(\"#dialogCloseEditor\").dialog(\"close\");\n editors._removeAllMarker();\n });\n\n $(\"#dialogCloseEditor button.discard\").click(function () {\n var i = $(\"#dialogCloseEditor\").data(\"index\");\n editors.tabs.del(editors.data[i].id);\n $(\"#dialogCloseEditor\").dialog(\"close\");\n editors._removeAllMarker();\n });\n\n $(\"#dialogCloseEditor button.cancel\").click(function (event) {\n $(\"#dialogCloseEditor\").dialog(\"close\");\n editors._removeAllMarker();\n });\n }\n });\n\n editors.tabs = new Tabs({\n id: \".edit-panel\",\n setAfter: function () {\n if (wide.curEditor) {\n wide.curEditor.focus();\n }\n },\n clickAfter: function (id) {\n if (id === 'startPage') {\n wide.curEditor = undefined;\n $(\".footer .cursor\").text('');\n wide.refreshOutline();\n \n return false;\n }\n },\n removeBefore: function (id) {\n if (id === 'startPage') { // 当前关闭的 tab 是起始页\n editors._removeAllMarker();\n return true;\n }\n\n for (var i = 0, ii = editors.data.length; i < ii; i++) {\n if (editors.data[i].id === id) {\n if (editors.data[i].editor.doc.isClean()) {\n editors._removeAllMarker();\n return true;\n } else {\n $(\"#dialogCloseEditor\").dialog(\"open\", $('.edit-panel .tabs > div[data-index=\"'\n + editors.data[i].id + '\"] > span:eq(0)').text());\n $(\"#dialogCloseEditor\").data(\"index\", i);\n return false;\n }\n\n break;\n }\n }\n },\n removeAfter: function (id, nextId) {\n if ($(\".edit-panel .tabs > div\").length === 0) {\n // 全部 tab 都关闭时才 disables 菜单中“全部关闭”的按钮\n menu.disabled(['close-all']);\n }\n\n // 移除编辑器\n for (var i = 0, ii = editors.data.length; i < ii; i++) {\n if (editors.data[i].id === id) {\n editors.data.splice(i, 1);\n break;\n }\n }\n\n if (editors.data.length === 0) { // 起始页可能存在,所以用编辑器数据判断\n menu.disabled(['save-all', 'build', 'run', 'go-test', 'go-vet', 'go-get', 'go-install',\n 'find', 'find-next', 'find-previous', 'replace', 'replace-all',\n 'format', 'autocomplete', 'jump-to-decl', 'expr-info', 'find-usages', 'toggle-comment',\n 'edit']);\n\n // remove selected tree node\n tree.fileTree.cancelSelectedNode();\n wide.curNode = undefined;\n wide.curEditor = undefined;\n wide.refreshOutline();\n $(\".footer .cursor\").text('');\n return false;\n }\n\n if (!nextId) {\n // 编辑器区域不存在打开的 Tab\n // remove selected tree node\n tree.fileTree.cancelSelectedNode();\n wide.curNode = undefined;\n wide.curEditor = undefined;\n wide.refreshOutline();\n $(\".footer .cursor\").text('');\n return false;\n }\n\n if (nextId === editors.tabs.getCurrentId()) {\n // 关闭的不是当前编辑器\n return false;\n }\n }\n });\n\n this._initCodeMirrorHotKeys();\n this.openStartPage();\n this._initClose();\n },\n openStartPage: function () {\n wide.curEditor = undefined;\n wide.refreshOutline();\n $(\".footer .cursor\").text('');\n\n var dateFormat = function (time, fmt) {\n var date = new Date(time);\n var dateObj = {\n \"M+\": date.getMonth() + 1, //月份 \n \"d+\": date.getDate(), //日 \n \"h+\": date.getHours(), //小时 \n \"m+\": date.getMinutes(), //分 \n \"s+\": date.getSeconds(), //秒 \n \"q+\": Math.floor((date.getMonth() + 3) / 3), //季度 \n \"S\": date.getMilliseconds() //毫秒 \n };\n if (/(y+)/.test(fmt))\n fmt = fmt.replace(RegExp.$1, (date.getFullYear() + \"\").substr(4 - RegExp.$1.length));\n for (var k in dateObj)\n if (new RegExp(\"(\" + k + \")\").test(fmt)) {\n fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1)\n ? (dateObj[k]) : ((\"00\" + dateObj[k]).substr((\"\" + dateObj[k]).length)));\n }\n return fmt;\n };\n\n editors.tabs.add({\n id: \"startPage\",\n title: ' ' + config.label.start_page + '',\n content: '
',\n after: function () {\n $(\"#startPage\").load(config.context + '/start?sid=' + config.wideSessionId);\n $.ajax({\n url: \"https://hacpai.com/apis/articles?tags=wide,golang&p=1&size=20\",\n type: \"GET\",\n dataType: \"jsonp\",\n jsonp: \"callback\",\n success: function (data, textStatus) {\n var articles = data.articles;\n if (0 === articles.length) {\n return;\n }\n\n // 按 size = 20 取,但只保留最多 9 篇\n var length = articles.length;\n if (length > 9) {\n length = 9;\n }\n\n var listHTML = \"\");\n }\n });\n }\n });\n },\n getCurrentId: function () {\n var ret = editors.tabs.getCurrentId();\n if (ret === 'startPage') {\n ret = null;\n }\n \n return ret;\n },\n getCurrentPath: function () {\n var currentPath = $(\".edit-panel .tabs .current span:eq(0)\").attr(\"title\");\n if (currentPath === config.label.start_page) {\n currentPath = null;\n }\n return currentPath;\n },\n _initCodeMirrorHotKeys: function () {\n CodeMirror.registerHelper(\"hint\", \"go\", function (editor) {\n editor = wide.curEditor; // 使用当前编辑器覆盖实参,因为异步调用的原因,实参不一定正确\n var word = /[\\w$]+/;\n\n var cur = editor.getCursor(), curLine = editor.getLine(cur.line);\n\n var start = cur.ch, end = start;\n while (end < curLine.length && word.test(curLine.charAt(end))) {\n ++end;\n }\n while (start && word.test(curLine.charAt(start - 1))) {\n --start;\n }\n\n var request = newWideRequest();\n request.path = $(\".edit-panel .tabs .current > span:eq(0)\").attr(\"title\");\n request.code = editor.getValue();\n request.cursorLine = cur.line;\n request.cursorCh = cur.ch;\n\n var autocompleteHints = [];\n\n if (editors.autocompleteMutex && editor.state.completionActive) {\n return;\n }\n\n editors.autocompleteMutex = true;\n\n $.ajax({\n async: false, // 同步执行\n type: 'POST',\n url: config.context + '/autocomplete',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (data) {\n var autocompleteArray = data[1];\n\n if (autocompleteArray) {\n for (var i = 0; i < autocompleteArray.length; i++) {\n var displayText = '',\n text = autocompleteArray[i].name;\n\n switch (autocompleteArray[i].class) {\n case \"type\":\n displayText = ''// + autocompleteArray[i].class \n + '' + autocompleteArray[i].name + ' '\n + autocompleteArray[i].type + '';\n break;\n case \"const\":\n displayText = ''// + autocompleteArray[i].class \n + '' + autocompleteArray[i].name + ' '\n + autocompleteArray[i].type + '';\n break;\n case \"var\":\n displayText = ''// + autocompleteArray[i].class \n + '' + autocompleteArray[i].name + ' '\n + autocompleteArray[i].type + '';\n break;\n case \"package\":\n displayText = ''// + autocompleteArray[i].class \n + '' + autocompleteArray[i].name + ' '\n + autocompleteArray[i].type + '';\n break;\n case \"func\":\n displayText = ''// + autocompleteArray[i].class \n + '' + autocompleteArray[i].name + ''\n + autocompleteArray[i].type.substring(4) + '';\n text += '()';\n break;\n default:\n console.warn(\"Can't handle autocomplete [\" + autocompleteArray[i].class + \"]\");\n break;\n }\n\n autocompleteHints[i] = {\n displayText: displayText,\n text: text\n };\n }\n }\n\n editor.doc.markClean();\n $(\".edit-panel .tabs .current > span:eq(0)\").removeClass(\"changed\");\n }\n });\n\n setTimeout(function () {\n editors.autocompleteMutex = false;\n }, 20);\n\n return {list: autocompleteHints, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)};\n });\n\n CodeMirror.commands.autocompleteAfterDot = function (cm) {\n var mode = cm.getMode();\n if (mode && \"go\" !== mode.name) {\n return CodeMirror.Pass;\n }\n\n var token = cm.getTokenAt(cm.getCursor());\n\n if (\"comment\" === token.type || \"string\" === token.type) {\n return CodeMirror.Pass;\n }\n\n setTimeout(function () {\n if (!cm.state.completionActive) {\n cm.showHint({hint: CodeMirror.hint.go, completeSingle: false});\n }\n }, 50);\n\n return CodeMirror.Pass;\n };\n\n CodeMirror.commands.autocompleteAnyWord = function (cm) {\n cm.showHint({hint: CodeMirror.hint.auto});\n };\n\n CodeMirror.commands.gotoLine = function (cm) {\n $(\"#dialogGoLinePrompt\").dialog(\"open\");\n };\n\n // 用于覆盖 cm 默认绑定的某些快捷键功能.\n CodeMirror.commands.doNothing = function (cm) {\n };\n\n CodeMirror.commands.exprInfo = function (cm) {\n var cur = wide.curEditor.getCursor();\n\n var request = newWideRequest();\n request.path = $(\".edit-panel .tabs .current > span:eq(0)\").attr(\"title\");\n request.code = wide.curEditor.getValue();\n request.cursorLine = cur.line;\n request.cursorCh = cur.ch;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/exprinfo',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n return;\n }\n \n var position = wide.curEditor.cursorCoords();\n $(\"body\").append('
' + result.data + '
');\n }\n });\n };\n\n CodeMirror.commands.copyLinesDown = function (cm) {\n var content = '',\n selectoion = cm.listSelections()[0];\n\n var from = selectoion.anchor,\n to = selectoion.head;\n if (from.line > to.line) {\n from = selectoion.head;\n to = selectoion.anchor;\n }\n\n for (var i = from.line, max = to.line; i <= max; i++) {\n if (to.ch !== 0 || i !== max) { // 下一行选中为0时,不应添加内容\n content += '\\n' + cm.getLine(i);\n }\n }\n // 下一行选中为0时,应添加到上一行末\n var replaceToLine = to.line;\n if (to.ch === 0) {\n replaceToLine = to.line - 1;\n }\n cm.replaceRange(content, CodeMirror.Pos(replaceToLine));\n\n var offset = replaceToLine - from.line + 1;\n cm.setSelection(CodeMirror.Pos(from.line + offset, from.ch),\n CodeMirror.Pos(to.line + offset, to.ch));\n };\n\n CodeMirror.commands.copyLinesUp = function (cm) {\n var content = '',\n selectoion = cm.listSelections()[0];\n\n var from = selectoion.anchor,\n to = selectoion.head;\n if (from.line > to.line) {\n from = selectoion.head;\n to = selectoion.anchor;\n }\n\n for (var i = from.line, max = to.line; i <= max; i++) {\n if (to.ch !== 0 || i !== max) { // 下一行选中为0时,不应添加内容\n content += '\\n' + cm.getLine(i);\n }\n }\n\n // 下一行选中为0时,应添加到上一行末\n var replaceToLine = to.line;\n if (to.ch === 0) {\n replaceToLine = to.line - 1;\n }\n cm.replaceRange(content, CodeMirror.Pos(replaceToLine));\n\n cm.setSelection(CodeMirror.Pos(from.line, from.ch),\n CodeMirror.Pos(to.line, to.ch));\n };\n\n CodeMirror.commands.moveLinesUp = function (cm) {\n var selectoion = cm.listSelections()[0];\n\n var from = selectoion.anchor,\n to = selectoion.head;\n if (from.line > to.line) {\n from = selectoion.head;\n to = selectoion.anchor;\n }\n\n if (from.line === 0) {\n return false;\n }\n // 下一行选中为0时,应添加到上一行末\n var replaceToLine = to.line;\n if (to.ch === 0) {\n replaceToLine = to.line - 1;\n }\n cm.replaceRange('\\n' + cm.getLine(from.line - 1), CodeMirror.Pos(replaceToLine));\n if (from.line === 1) {\n // 移除第一行的换行\n cm.replaceRange('', CodeMirror.Pos(0, 0),\n CodeMirror.Pos(1, 0));\n } else {\n cm.replaceRange('', CodeMirror.Pos(from.line - 2, cm.getLine(from.line - 2).length),\n CodeMirror.Pos(from.line - 1, cm.getLine(from.line - 1).length));\n }\n\n cm.setSelection(CodeMirror.Pos(from.line - 1, from.ch),\n CodeMirror.Pos(to.line - 1, to.ch));\n };\n\n CodeMirror.commands.moveLinesDown = function (cm) {\n var selectoion = cm.listSelections()[0];\n\n var from = selectoion.anchor,\n to = selectoion.head;\n if (from.line > to.line) {\n from = selectoion.head;\n to = selectoion.anchor;\n }\n\n if (to.line === cm.lastLine()) {\n return false;\n }\n\n // 下一行选中为0时,应添加到上一行末\n var replaceToLine = to.line;\n if (to.ch === 0) {\n replaceToLine = to.line - 1;\n }\n // 把选中的下一行添加到选中区域的上一行\n if (from.line === 0) {\n cm.replaceRange(cm.getLine(replaceToLine + 1) + '\\n', CodeMirror.Pos(0, 0));\n } else {\n cm.replaceRange('\\n' + cm.getLine(replaceToLine + 1), CodeMirror.Pos(from.line - 1));\n }\n // 删除选中的下一行\n cm.replaceRange('', CodeMirror.Pos(replaceToLine + 1, cm.getLine(replaceToLine + 1).length),\n CodeMirror.Pos(replaceToLine + 2, cm.getLine(replaceToLine + 2).length));\n\n cm.setSelection(CodeMirror.Pos(from.line + 1, from.ch),\n CodeMirror.Pos(to.line + 1, to.ch));\n };\n\n CodeMirror.commands.jumpToDecl = function (cm) {\n var cur = wide.curEditor.getCursor();\n\n var request = newWideRequest();\n request.path = $(\".edit-panel .tabs .current > span:eq(0)\").attr(\"title\");\n request.code = wide.curEditor.getValue();\n request.cursorLine = cur.line;\n request.cursorCh = cur.ch;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/find/decl',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n return;\n }\n \n var data = result.data;\n\n var tId = tree.getTIdByPath(data.path);\n wide.curNode = tree.fileTree.getNodeByTId(tId);\n tree.fileTree.selectNode(wide.curNode);\n\n tree.openFile(wide.curNode, CodeMirror.Pos(data.cursorLine - 1, data.cursorCh - 1));\n }\n });\n };\n\n CodeMirror.commands.findUsages = function (cm) {\n var cur = wide.curEditor.getCursor();\n\n var request = newWideRequest();\n request.path = $(\".edit-panel .tabs .current > span:eq(0)\").attr(\"title\");\n request.code = wide.curEditor.getValue();\n request.cursorLine = cur.line;\n request.cursorCh = cur.ch;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/find/usages',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n return;\n }\n\n editors.appendSearch(result.data, 'usages', '');\n }\n });\n };\n\n CodeMirror.commands.selectIdentifier = function (cm) {\n var cur = cm.getCursor();\n var word = cm.findWordAt(cur);\n cm.extendSelection(word.anchor, word.head);\n };\n },\n appendSearch: function (data, type, key) {\n var searcHTML = '';\n\n var $search = $('.bottom-window-group .search'),\n title = config.label.find_usages;\n if (type === \"founds\") {\n title = config.label.search_text;\n }\n if ($search.find(\"ul\").length === 0) {\n bottomGroup.searchTab = new Tabs({\n id: \".bottom-window-group .search\",\n removeAfter: function (id, prevId) {\n if ($search.find(\"ul\").length === 1) {\n $search.find(\".tabs\").hide();\n }\n }\n });\n\n $search.on(\"click\", \"li\", function () {\n $search.find(\"li\").removeClass(\"selected\");\n $(this).addClass(\"selected\");\n });\n\n $search.on(\"dblclick\", \"li\", function () {\n var $it = $(this),\n tId = tree.getTIdByPath($it.attr(\"title\"));\n tree.openFile(tree.fileTree.getNodeByTId(tId));\n tree.fileTree.selectNode(wide.curNode);\n\n var line = $it.find(\".position\").data(\"line\") - 1;\n var cursor = CodeMirror.Pos(line, $it.find(\".position\").data(\"ch\") - 1);\n\n\n var editor = wide.curEditor;\n editor.setCursor(cursor);\n\n var half = Math.floor(editor.getScrollInfo().clientHeight / editor.defaultTextHeight() / 2);\n var cursorCoords = editor.cursorCoords({line: cursor.line - half, ch: 0}, \"local\");\n editor.scrollTo(0, cursorCoords.top);\n\n wide.curEditor.focus();\n });\n\n $search.find(\".tabs-panel > div\").append(searcHTML);\n\n $search.find(\".tabs .first\").text(title);\n } else {\n $search.find(\".tabs\").show();\n bottomGroup.searchTab.add({\n \"id\": \"search\" + (new Date()).getTime(),\n \"title\": title,\n \"content\": searcHTML\n });\n }\n\n // focus\n bottomGroup.tabs.setCurrent(\"search\");\n windows.flowBottom();\n $(\".bottom-window-group .search\").focus();\n },\n // 新建一个编辑器 Tab,如果已经存在 Tab 则切换到该 Tab.\n newEditor: function (data, cursor) {\n var id = wide.curNode.id;\n\n editors.tabs.add({\n id: id,\n title: '' + wide.curNode.name + '',\n content: ''\n });\n\n menu.undisabled(['save-all', 'close-all', 'build', 'run', 'go-test', 'go-vet', 'go-get', 'go-install',\n 'find', 'find-next', 'find-previous', 'replace', 'replace-all',\n 'format', 'autocomplete', 'jump-to-decl', 'expr-info', 'find-usages', 'toggle-comment',\n 'edit']);\n\n var textArea = document.getElementById(\"editor\" + id);\n textArea.value = data.content;\n\n var editor = CodeMirror.fromTextArea(textArea, {\n lineNumbers: true,\n autofocus: true,\n autoCloseBrackets: true,\n matchBrackets: true,\n highlightSelectionMatches: {showToken: /\\w/},\n rulers: [{color: \"#ccc\", column: 120, lineStyle: \"dashed\"}],\n styleActiveLine: true,\n theme: config.editorTheme,\n tabSize: config.editorTabSize,\n indentUnit: 4,\n indentWithTabs: true,\n foldGutter: true,\n cursorHeight: 1,\n path: data.path,\n readOnly: wide.curNode.isGOAPI,\n profile: 'xhtml', // define Emmet output profile\n extraKeys: {\n \"Ctrl-\\\\\": \"autocompleteAnyWord\",\n \".\": \"autocompleteAfterDot\",\n \"Ctrl-/\": 'toggleComment',\n \"Ctrl-I\": \"exprInfo\",\n \"Ctrl-L\": \"gotoLine\",\n \"Ctrl-E\": \"deleteLine\",\n \"Ctrl-D\": \"doNothing\", // 取消默认的 deleteLine\n \"Ctrl-B\": \"jumpToDecl\",\n \"Ctrl-S\": function () {\n wide.saveFile();\n },\n \"Shift-Ctrl-S\": function () {\n menu.saveAllFiles();\n },\n \"Shift-Alt-F\": function () {\n var currentPath = editors.getCurrentPath();\n if (!currentPath) {\n return false;\n }\n wide.fmt(currentPath, wide.curEditor);\n },\n \"Alt-F7\": \"findUsages\",\n \"Shift-Alt-Enter\": function () {\n if (windows.isMaxEditor) {\n windows.restoreEditor();\n } else {\n windows.maxEditor();\n }\n },\n \"Shift-Ctrl-Up\": \"copyLinesUp\",\n \"Shift-Ctrl-Down\": \"copyLinesDown\",\n \"Shift-Alt-Up\": \"moveLinesUp\",\n \"Shift-Alt-Down\": \"moveLinesDown\",\n \"Shift-Alt-J\": \"selectIdentifier\"\n }\n });\n\n if (\"text/html\" === data.mode) {\n emmetCodeMirror(editor);\n }\n\n editor.on('cursorActivity', function (cm) {\n $(\".edit-exprinfo\").remove();\n var cursor = cm.getCursor();\n\n $(\".footer .cursor\").text('| ' + (cursor.line + 1) + ':' + (cursor.ch + 1) + ' |');\n });\n\n editor.on('blur', function (cm) {\n $(\".edit-exprinfo\").remove();\n });\n\n editor.on('changes', function (cm) {\n if (cm.doc.isClean()) { // no modification\n $(\".edit-panel .tabs > div\").each(function () {\n var $span = $(this).find(\"span:eq(0)\");\n if ($span.attr(\"title\") === cm.options.path) {\n $span.removeClass(\"changed\");\n }\n });\n\n return;\n }\n\n // changed\n\n $(\".edit-panel .tabs > div\").each(function () {\n var $span = $(this).find(\"span:eq(0)\");\n if ($span.attr(\"title\") === cm.options.path) {\n $span.addClass(\"changed\");\n }\n });\n });\n\n editor.on('keydown', function (cm, evt) {\n if (evt.altKey || evt.ctrlKey || evt.shiftKey) {\n return;\n }\n\n var k = evt.which;\n\n if (k < 48) {\n return;\n }\n\n // hit [0-9]\n\n if (k > 57 && k < 65) {\n return;\n }\n\n // hit [a-z]\n\n if (k > 90) {\n return;\n }\n\n if (config.autocomplete) {\n if (0.5 <= Math.random()) {\n CodeMirror.commands.autocompleteAfterDot(cm);\n }\n }\n });\n\n editor.setSize('100%', $(\".edit-panel\").height() - $(\".edit-panel .tabs\").height());\n editor.setOption(\"mode\", data.mode);\n editor.setOption(\"gutters\", [\"CodeMirror-lint-markers\", \"CodeMirror-foldgutter\"]);\n\n if (\"wide\" !== config.keymap) {\n editor.setOption(\"keyMap\", config.keymap);\n }\n\n if (\"text/x-go\" === data.mode || \"application/json\" === data.mode) {\n editor.setOption(\"lint\", true);\n }\n\n if (\"application/xml\" === data.mode || \"text/html\" === data.mode) {\n editor.setOption(\"autoCloseTags\", true);\n }\n\n wide.curEditor = editor;\n editors.data.push({\n \"editor\": editor,\n \"id\": id\n });\n\n $(\".footer .cursor\").text('| ' + (cursor.line + 1) + ':' + (cursor.ch + 1) + ' |');\n\n var half = Math.floor(wide.curEditor.getScrollInfo().clientHeight / wide.curEditor.defaultTextHeight() / 2);\n var cursorCoords = wide.curEditor.cursorCoords({line: cursor.line - half, ch: 0}, \"local\");\n wide.curEditor.scrollTo(0, cursorCoords.top);\n\n editor.setCursor(cursor);\n editor.focus();\n }\n};","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file notification.js\n *\n * @author Liyuan Li\n * @author Liang Ding\n * @version 1.0.0.1, Dec 8, 2015\n */\nvar notification = {\n init: function () {\n $(\".notification-count\").click(function () {\n bottomGroup.tabs.setCurrent(\"notification\");\n $(\".bottom-window-group .notification\").focus();\n $(this).hide();\n });\n\n this._initWS();\n },\n _initWS: function () {\n var notificationWS = new ReconnectingWebSocket(config.channel + '/notification/ws?sid=' + config.wideSessionId);\n\n notificationWS.onopen = function () {\n console.log('[notification onopen] connected');\n };\n\n notificationWS.onmessage = function (e) {\n var data = JSON.parse(e.data),\n $notification = $('.bottom-window-group .notification > table'),\n notificationHTML = '';\n \n if (data.cmd && \"init-notification\" === data.cmd) {\n console.log('[notification onmessage]' + e.data);\n \n return;\n }\n\n notificationHTML += '' + data.severity\n + '' + data.message\n + '' + data.type + '';\n $notification.append(notificationHTML);\n\n $(\".notification-count\").show();\n };\n\n notificationWS.onclose = function (e) {\n console.log('[notification onclose] disconnected (' + e.code + ')');\n };\n\n notificationWS.onerror = function (e) {\n console.log('[notification onerror]');\n };\n }\n};","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file tree.js\n *\n * @author Liyuan Li\n * @author Liang Ding\n * @version 1.0.1.1, Dec 15, 2015\n */\nvar tree = {\n fileTree: undefined,\n // 递归获取当前节点展开中的最后一个节点\n getCurrentNodeLastNode: function (node) {\n var returnNode = node.children[node.children.length - 1];\n if (returnNode.open) {\n return tree.getCurrentNodeLastNode(returnNode);\n } else {\n return returnNode;\n }\n },\n // 按照树展现获取下一个节点\n getNextShowNode: function (node) {\n if (node.level !== 0) {\n if (node.getParentNode().getNextNode()) {\n return node.getParentNode().getNextNode();\n } else {\n return tree.getNextShowNode(node.getParentNode());\n }\n } else {\n return node.getNextNode();\n }\n },\n isBottomNode: function (node) {\n if (node.open) {\n return false;\n }\n\n if (node.getParentNode()) {\n if (node.getParentNode().isLastNode) {\n return tree.isBottomNode(node.getParentNode());\n } else {\n return false;\n }\n } else {\n if (node.isLastNode) {\n return true;\n } else {\n return false;\n }\n }\n },\n getTIdByPath: function (path) {\n var nodes = tree.fileTree.transformToArray(tree.fileTree.getNodes());\n for (var i = 0, ii = nodes.length; i < ii; i++) {\n if (nodes[i].path === path) {\n return nodes[i].tId;\n }\n }\n\n return undefined;\n },\n getOpenPaths: function () {\n var nodes = tree.fileTree.transformToArray(tree.fileTree.getNodes()),\n paths = [];\n for (var i = 0, ii = nodes.length; i < ii; i++) {\n if (nodes[i].open) {\n paths.push(nodes[i].path);\n }\n }\n\n return paths;\n },\n getAllParents: function (node, parents) {\n if (!parents) {\n parents = [];\n }\n\n if (!node || !node.parentTId) {\n return parents;\n } else {\n parents.push(node.getParentNode());\n return tree.getAllParents(node.getParentNode(), parents);\n }\n },\n isParents: function (tId, parentPath) {\n var node = tree.fileTree.getNodeByTId(tId);\n if (!node || !node.parentTId) {\n return false;\n } else {\n var parentNode = tree.fileTree.getNodeByTId(node.parentTId);\n if (node.path === parentPath) {\n return true;\n } else {\n return tree.isParents(parentNode.tId, parentPath);\n }\n }\n },\n isDir: function () {\n if (wide.curNode.iconSkin.indexOf(\"ico-ztree-dir\") === 0) {\n return true;\n }\n\n return false;\n },\n newFile: function (it) {\n if ($(it).hasClass(\"disabled\")) {\n return false;\n }\n\n $(\"#dialogNewFilePrompt\").dialog(\"open\");\n },\n newDir: function (it) {\n if ($(it).hasClass(\"disabled\")) {\n return false;\n }\n\n $(\"#dialogNewDirPrompt\").dialog(\"open\");\n },\n removeIt: function (it) {\n if (it) {\n if ($(it).hasClass(\"disabled\")) {\n return false;\n }\n } else {\n if (!wide.curNode.removable) {\n return false;\n }\n }\n\n $(\"#dialogRemoveConfirm\").dialog(\"open\");\n },\n rename: function (it) {\n if (it) {\n if ($(it).hasClass(\"disabled\")) {\n return false;\n }\n }\n\n $(\"#dialogRenamePrompt\").dialog(\"open\");\n },\n export: function () {\n var request = newWideRequest(),\n isSucc = false;\n request.path = wide.curNode.path;\n\n $.ajax({\n async: false,\n type: 'POST',\n url: config.context + '/file/zip/new',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n $(\"#dialogAlert\").dialog(\"open\", result.msg);\n\n return false;\n }\n\n isSucc = true;\n }\n });\n\n if (isSucc) {\n window.open(config.context + '/file/zip?path=' + wide.curNode.path + \".zip\");\n }\n },\n crossCompile: function (platform) {\n var request = newWideRequest();\n request.path = wide.curNode.path;\n request.platform = platform;\n\n $.ajax({\n async: false,\n type: 'POST',\n url: config.context + '/cross',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n $(\"#dialogAlert\").dialog(\"open\", result.msg);\n\n return false;\n }\n }\n });\n },\n decompress: function () {\n var request = newWideRequest();\n request.path = wide.curNode.path;\n\n $.ajax({\n async: false,\n type: 'POST',\n url: config.context + '/file/decompress',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n $(\"#dialogAlert\").dialog(\"open\", result.msg);\n\n return false;\n }\n\n var dir = wide.curNode.getParentNode();\n tree.fileTree.reAsyncChildNodes(dir, \"refresh\");\n }\n });\n },\n refresh: function (it) {\n if (it) {\n if ($(it).hasClass(\"disabled\")) {\n return false;\n }\n }\n\n tree.fileTree.reAsyncChildNodes(wide.curNode, \"refresh\", true);\n },\n gitClone: function (it) {\n if (it) {\n if ($(it).hasClass(\"disabled\")) {\n return false;\n }\n }\n\n $(\"#dialogGitClonePrompt\").dialog('open');\n },\n import: function () {\n var request = newWideRequest();\n request.path = wide.curNode.path;\n\n $('#importFileupload').fileupload({\n url: \"/file/upload?path=\" + request.path,\n dataType: 'json',\n formData: request,\n done: function (e, result) {\n tree.fileTree.reAsyncChildNodes(wide.curNode, \"refresh\");\n },\n fail: function () {\n console.log(arguments);\n }\n });\n },\n init: function () {\n $(\"#file\").click(function () {\n $(this).focus();\n });\n\n var request = newWideRequest();\n\n $.ajax({\n type: 'POST',\n url: config.context + '/files',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (result.succ) {\n var $dirRMenu = $(\"#dirRMenu\");\n var $fileRMenu = $(\"#fileRMenu\");\n var setting = {\n data: {\n key: {\n title: \"path\"\n }\n },\n view: {\n showTitle: true,\n selectedMulti: false\n },\n async: {\n enable: true,\n url: config.context + \"/file/refresh\",\n autoParam: [\"path\"]\n },\n callback: {\n onDblClick: function (event, treeId, treeNode) {\n if (treeNode) {\n tree.openFile(treeNode);\n }\n },\n onRightClick: function (event, treeId, treeNode) {\n if (treeNode && !treeNode.isGOAPI) {\n menu.undisabled(['import', 'export', 'git-clone']);\n\n wide.curNode = treeNode;\n tree.fileTree.selectNode(treeNode);\n\n if (!tree.isDir()) { // if right click on a file\n if (wide.curNode.removable) {\n $fileRMenu.find(\".remove\").removeClass(\"disabled\");\n } else {\n $fileRMenu.find(\".remove\").addClass(\"disabled\");\n }\n\n if (-1 === wide.curNode.path.indexOf(\"zip\", wide.curNode.path.length - \"zip\".length)) { // !path.endsWith(\"zip\")\n $fileRMenu.find(\".decompress\").hide();\n } else {\n $fileRMenu.find(\".decompress\").show();\n }\n\n if (-1 === wide.curNode.path.indexOf(\"go\", wide.curNode.path.length - \"go\".length)) { // !path.endsWith(\"go\")\n $fileRMenu.find(\".linux64\").hide();\n } else {\n $fileRMenu.find(\".linux64\").show();\n }\n\n var top = event.clientY - 10;\n if ($fileRMenu.height() + top > $('.content').height()) {\n top = top - $fileRMenu.height() - 25;\n }\n $fileRMenu.css({\n \"top\": top + \"px\",\n \"left\": event.clientX + \"px\",\n \"display\": \"block\"\n }).show();\n\n $dirRMenu.hide();\n\n menu.disabled(['import', 'git-clone']);\n } else { // 右击了目录\n if (wide.curNode.removable) {\n $dirRMenu.find(\".remove\").removeClass(\"disabled\");\n } else {\n $dirRMenu.find(\".remove\").addClass(\"disabled\");\n }\n\n if (wide.curNode.creatable) {\n $dirRMenu.find(\".create\").removeClass(\"disabled\");\n } else {\n $dirRMenu.find(\".create\").addClass(\"disabled\");\n }\n\n var top = event.clientY - 10;\n if ($dirRMenu.height() + top > $('.content').height()) {\n top = top - $dirRMenu.height() - 25;\n }\n\n $dirRMenu.css({\n \"top\": top + \"px\",\n \"left\": event.clientX + \"px\",\n \"display\": \"block\"\n }).show();\n\n $fileRMenu.hide();\n }\n $(\"#files\").focus();\n }\n },\n onClick: function (event, treeId, treeNode, clickFlag) {\n if (treeNode) {\n wide.curNode = treeNode;\n tree.fileTree.selectNode(treeNode);\n\n menu.undisabled(['import', 'export', 'git-clone']);\n if (!tree.isDir()) {\n menu.disabled(['import', 'git-clone']);\n }\n\n $(\"#files\").focus();\n }\n }\n }\n };\n tree.fileTree = $.fn.zTree.init($(\"#files\"), setting, result.data.children);\n\n session.restore();\n }\n }\n });\n\n this._initSearch();\n this._initRename();\n },\n openFile: function (treeNode, cursor) {\n wide.curNode = treeNode;\n var tempCursor = cursor;\n\n for (var i = 0, ii = editors.data.length; i < ii; i++) {\n // 该节点文件已经打开\n if (editors.data[i].id === treeNode.path) {\n editors.tabs.setCurrent(treeNode.path);\n wide.curEditor = editors.data[i].editor;\n\n if (!tempCursor) {\n tempCursor = wide.curEditor.getCursor();\n }\n $(\".footer .cursor\").text('| ' + (tempCursor.line + 1) + ':' + (tempCursor.ch + 1) + ' |');\n\n wide.curEditor.setCursor(tempCursor);\n var half = Math.floor(wide.curEditor.getScrollInfo().clientHeight / wide.curEditor.defaultTextHeight() / 2);\n var cursorCoords = wide.curEditor.cursorCoords({line: tempCursor.line - half, ch: 0}, \"local\");\n wide.curEditor.scrollTo(0, cursorCoords.top);\n wide.curEditor.focus();\n\n wide.refreshOutline();\n return false;\n }\n }\n\n if (!tree.isDir()) {\n var request = newWideRequest();\n request.path = treeNode.path;\n\n $.ajax({\n async: false,\n type: 'POST',\n url: config.context + '/file',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n $(\"#dialogAlert\").dialog(\"open\", result.msg);\n\n return false;\n }\n\n var data = result.data;\n\n if (!data.mode) {\n var mode = CodeMirror.findModeByFileName(treeNode.path);\n if (mode) {\n data.mode = mode.mime;\n } else {\n data.mode = 'text/plain';\n }\n }\n\n if (!data.mode) {\n console.error(\"Can't find mode by file name [\" + treeNode.path + \"]\");\n }\n\n if (\"img\" === data.mode) { // 是图片文件的话新建 tab 打开\n // 最好是开 tab,但这个最终取决于浏览器设置\n var w = window.open(config.context + data.path);\n return false;\n }\n\n if (!tempCursor) {\n tempCursor = CodeMirror.Pos(0, 0);\n }\n\n editors.newEditor(data, tempCursor);\n\n wide.refreshOutline();\n }\n });\n }\n },\n _initSearch: function () {\n $(\"#dialogSearchForm > input:eq(0)\").keyup(function (event) {\n var $okBtn = $(this).closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\");\n if (event.which === 13 && !$okBtn.prop(\"disabled\")) {\n $okBtn.click();\n }\n\n if ($.trim($(this).val()) === \"\") {\n $okBtn.prop(\"disabled\", true);\n } else {\n $okBtn.prop(\"disabled\", false);\n }\n });\n\n $(\"#dialogSearchForm > input:eq(1)\").keyup(function (event) {\n var $okBtn = $(this).closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\");\n if (event.which === 13 && !$okBtn.prop(\"disabled\")) {\n $okBtn.click();\n }\n });\n\n $(\"#dialogSearchForm\").dialog({\n \"modal\": true,\n \"height\": 80,\n \"width\": 260,\n \"title\": config.label.search,\n \"okText\": config.label.search,\n \"cancelText\": config.label.cancel,\n \"afterOpen\": function () {\n $(\"#dialogSearchForm > input:eq(0)\").val('').focus();\n $(\"#dialogSearchForm > input:eq(1)\").val('');\n $(\"#dialogSearchForm\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\").prop(\"disabled\", true);\n },\n \"ok\": function () {\n var request = newWideRequest();\n\n if (!wide.curNode) {\n request.dir = \"\";\n } else {\n request.dir = wide.curNode.path;\n }\n\n request.text = $(\"#dialogSearchForm > input:eq(0)\").val();\n request.extension = $(\"#dialogSearchForm > input:eq(1)\").val();\n\n $.ajax({\n type: 'POST',\n url: config.context + '/file/search/text',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n return;\n }\n\n $(\"#dialogSearchForm\").dialog(\"close\");\n editors.appendSearch(result.data, 'founds', request.text);\n }\n });\n }\n });\n },\n _initRename: function () {\n $(\"#dialogRenamePrompt\").dialog({\n \"modal\": true,\n \"height\": 52,\n \"width\": 260,\n \"title\": config.label.rename,\n \"okText\": config.label.rename,\n \"cancelText\": config.label.cancel,\n \"afterOpen\": function () {\n $(\"#dialogRenamePrompt\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\").prop(\"disabled\", true);\n $(\"#dialogRenamePrompt > input\").val(wide.curNode.name).select().focus();\n },\n \"ok\": function () {\n var name = $(\"#dialogRenamePrompt > input\").val(),\n request = newWideRequest();\n\n request.oldPath = wide.curNode.path;\n request.newPath = wide.curNode.path.substring(0, wide.curNode.path.lastIndexOf(\"/\") + 1) + name;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/file/rename',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n $(\"#dialogRenamePrompt\").dialog(\"close\");\n bottomGroup.tabs.setCurrent(\"notification\");\n windows.flowBottom();\n $(\".bottom-window-group .notification\").focus();\n return false;\n }\n\n $(\"#dialogRenamePrompt\").dialog(\"close\");\n }\n });\n }\n });\n }\n};","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file wide.js\n *\n * @author Liyuan Li\n * @author Liang Ding\n * @version 1.0.0.1, Dec 8, 2015\n */\nvar wide = {\n curNode: undefined,\n curEditor: undefined,\n curProcessId: undefined, // curent running process id (pid)\n refreshOutline: function () {\n if (!wide.curEditor ||\n (wide.curEditor && wide.curEditor.doc.getMode().name !== \"go\")) {\n $(\"#outline\").html('');\n return false;\n }\n\n var request = newWideRequest();\n request.code = wide.curEditor.getValue();\n\n $.ajax({\n type: 'POST',\n async: false,\n url: config.context + '/outline',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n return;\n }\n\n var data = result.data;\n\n var outlineHTML = '');\n\n $(\"#outline li\").dblclick(function () {\n var $it = $(this),\n cursor = CodeMirror.Pos($it.data('line'), $it.data(\"ch\"));\n\n var editor = wide.curEditor;\n editor.setCursor(cursor);\n\n var half = Math.floor(editor.getScrollInfo().clientHeight / editor.defaultTextHeight() / 2);\n var cursorCoords = editor.cursorCoords({line: cursor.line - half, ch: 0}, \"local\");\n editor.scrollTo(0, cursorCoords.top);\n\n editor.focus();\n });\n }\n });\n },\n _initDialog: function () {\n $(\".dialog-prompt > input\").keyup(function (event) {\n var $okBtn = $(this).closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\");\n if (event.which === 13 && !$okBtn.prop(\"disabled\")) {\n $okBtn.click();\n }\n\n if ($.trim($(this).val()) === \"\") {\n $okBtn.prop(\"disabled\", true);\n } else {\n $okBtn.prop(\"disabled\", false);\n }\n });\n\n $(\"#dialogAlert\").dialog({\n \"modal\": true,\n \"height\": 40,\n \"width\": 350,\n \"title\": config.label.tip,\n \"hiddenOk\": true,\n \"cancelText\": config.label.confirm,\n \"afterOpen\": function (msg) {\n $(\"#dialogAlert\").html(msg);\n }\n });\n\n $(\"#dialogRemoveConfirm\").dialog({\n \"modal\": true,\n \"height\": 36,\n \"width\": 260,\n \"title\": config.label.delete,\n \"okText\": config.label.delete,\n \"cancelText\": config.label.cancel,\n \"afterOpen\": function () {\n $(\"#dialogRemoveConfirm > b\").html('\"' + wide.curNode.name + '\"');\n },\n \"ok\": function () {\n var request = newWideRequest();\n request.path = wide.curNode.path;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/file/remove',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n $(\"#dialogRemoveConfirm\").dialog(\"close\");\n bottomGroup.tabs.setCurrent(\"notification\");\n windows.flowBottom();\n $(\".bottom-window-group .notification\").focus();\n return false;\n }\n\n $(\"#dialogRemoveConfirm\").dialog(\"close\");\n }\n });\n }\n });\n\n $(\"#dialogNewFilePrompt\").dialog({\n \"modal\": true,\n \"height\": 52,\n \"width\": 260,\n \"title\": config.label.create_file,\n \"okText\": config.label.create,\n \"cancelText\": config.label.cancel,\n \"afterOpen\": function () {\n $(\"#dialogNewFilePrompt > input\").val('').focus();\n $(\"#dialogNewFilePrompt\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\").prop(\"disabled\", true);\n },\n \"ok\": function () {\n var request = newWideRequest(),\n name = $(\"#dialogNewFilePrompt > input\").val();\n\n request.path = wide.curNode.path + \"/\" + name;\n request.fileType = \"f\";\n\n $.ajax({\n type: 'POST',\n url: config.context + '/file/new',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n $(\"#dialogNewFilePrompt\").dialog(\"close\");\n bottomGroup.tabs.setCurrent(\"notification\");\n windows.flowBottom();\n $(\".bottom-window-group .notification\").focus();\n return false;\n }\n\n $(\"#dialogNewFilePrompt\").dialog(\"close\");\n\n setTimeout(function () { // Delay, waiting the file change notified and then open it\n var tId = tree.getTIdByPath(request.path);\n tree.openFile(tree.fileTree.getNodeByTId(tId));\n tree.fileTree.selectNode(wide.curNode);\n }, 100);\n }\n });\n }\n });\n\n $(\"#dialogNewDirPrompt\").dialog({\n \"modal\": true,\n \"height\": 52,\n \"width\": 260,\n \"title\": config.label.create_dir,\n \"okText\": config.label.create,\n \"cancelText\": config.label.cancel,\n \"afterOpen\": function () {\n $(\"#dialogNewDirPrompt > input\").val('').focus();\n $(\"#dialogNewDirPrompt\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\").prop(\"disabled\", true);\n },\n \"ok\": function () {\n var name = $(\"#dialogNewDirPrompt > input\").val(),\n request = newWideRequest();\n\n request.path = wide.curNode.path + \"/\" + name;\n request.fileType = \"d\";\n\n $.ajax({\n type: 'POST',\n url: config.context + '/file/new',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n $(\"#dialogNewDirPrompt\").dialog(\"close\");\n bottomGroup.tabs.setCurrent(\"notification\");\n windows.flowBottom();\n $(\".bottom-window-group .notification\").focus();\n return false;\n }\n\n $(\"#dialogNewDirPrompt\").dialog(\"close\");\n }\n });\n }\n });\n\n $(\"#dialogGoFilePrompt\").dialog({\n \"modal\": true,\n \"height\": 320,\n \"width\": 660,\n \"title\": config.label.goto_file,\n \"okText\": config.label.go,\n \"cancelText\": config.label.cancel,\n \"afterInit\": function () {\n $(\"#dialogGoFilePrompt\").on(\"dblclick\", \"li\", function () {\n var tId = tree.getTIdByPath($(this).find(\".ft-small\").text());\n tree.openFile(tree.fileTree.getNodeByTId(tId));\n tree.fileTree.selectNode(wide.curNode);\n $(\"#dialogGoFilePrompt\").dialog(\"close\");\n wide.curEditor.focus();\n });\n\n $(\"#dialogGoFilePrompt\").on(\"click\", \"li\", function () {\n var $list = $(\"#dialogGoFilePrompt > .list\");\n $list.find(\"li\").removeClass(\"selected\");\n $list.data(\"index\", $(this).data(\"index\"));\n $(this).addClass(\"selected\");\n });\n\n hotkeys.bindList($(\"#dialogGoFilePrompt > input\"), $(\"#dialogGoFilePrompt > .list\"), function ($selected) {\n var tId = tree.getTIdByPath($selected.find(\".ft-small\").text());\n tree.openFile(tree.fileTree.getNodeByTId(tId));\n tree.fileTree.selectNode(wide.curNode);\n $(\"#dialogGoFilePrompt\").dialog(\"close\");\n wide.curEditor.focus();\n });\n\n $(\"#dialogGoFilePrompt > input\").bind(\"input\", function () {\n var name = $(\"#dialogGoFilePrompt > input\").val();\n\n var request = newWideRequest();\n request.path = '';\n request.name = '*' + name + '*';\n if (wide.curNode) {\n request.path = wide.curNode.path;\n }\n\n $.ajax({\n type: 'POST',\n url: config.context + '/file/find/name',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n return;\n }\n\n var data = result.data;\n\n var goFileHTML = '';\n for (var i = 0, max = data.length; i < max; i++) {\n var path = data[i].path,\n name = path.substr(path.lastIndexOf(\"/\") + 1),\n icoSkin = wide.getClassBySuffix(name.split(\".\")[1]);\n if (i === 0) {\n goFileHTML += '
  • '\n + name + '    '\n + path + '
  • ';\n } else {\n goFileHTML += '
  • '\n + name + '    '\n + path + '
  • ';\n }\n }\n\n $(\"#dialogGoFilePrompt > ul\").html(goFileHTML);\n }\n });\n });\n },\n \"afterOpen\": function () {\n $(\"#dialogGoFilePrompt > input\").val('').focus();\n $(\"#dialogGoFilePrompt\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\").prop(\"disabled\", true);\n $(\"#dialogGoFilePrompt .list\").html('').data(\"index\", 0);\n },\n \"ok\": function () {\n var tId = tree.getTIdByPath($(\"#dialogGoFilePrompt .selected .ft-small\").text());\n tree.openFile(tree.fileTree.getNodeByTId(tId));\n tree.fileTree.selectNode(wide.curNode);\n $(\"#dialogGoFilePrompt\").dialog(\"close\");\n wide.curEditor.focus();\n }\n });\n\n $(\"#dialogGoLinePrompt\").dialog({\n \"modal\": true,\n \"height\": 52,\n \"width\": 260,\n \"title\": config.label.goto_line,\n \"okText\": config.label.go,\n \"cancelText\": config.label.cancel,\n \"afterOpen\": function () {\n $(\"#dialogGoLinePrompt > input\").val('').focus();\n $(\"#dialogGoLinePrompt\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\").prop(\"disabled\", true);\n },\n \"ok\": function () {\n var line = parseInt($(\"#dialogGoLinePrompt > input\").val()) - 1;\n $(\"#dialogGoLinePrompt\").dialog(\"close\");\n\n var editor = wide.curEditor;\n var cursor = editor.getCursor();\n\n editor.setCursor(CodeMirror.Pos(line, cursor.ch));\n\n var half = Math.floor(editor.getScrollInfo().clientHeight / editor.defaultTextHeight() / 2);\n var cursorCoords = editor.cursorCoords({line: line - half, ch: cursor.ch}, \"local\");\n editor.scrollTo(0, cursorCoords.top);\n\n editor.focus();\n }\n });\n\n $(\"#dialogGitClonePrompt\").dialog({\n \"modal\": true,\n \"height\": 52,\n \"width\": 360,\n \"title\": config.label.git_clone,\n \"okText\": config.label.confirm,\n \"cancelText\": config.label.cancel,\n \"afterOpen\": function () {\n $(\"#dialogGitClonePrompt > input\").val('').focus();\n $(\"#dialogGitClonePrompt\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\").prop(\"disabled\", true);\n },\n \"ok\": function () {\n $(\"#dialogGitClonePrompt\").dialog(\"close\");\n\n var request = newWideRequest();\n request.path = wide.curNode.path;\n request.repository = $(\"#dialogGitClonePrompt > input\").val();\n\n $.ajax({\n type: 'POST',\n url: config.context + '/git/clone',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n }\n });\n }\n });\n },\n _initWS: function () {\n var outputWS = new ReconnectingWebSocket(config.channel + '/output/ws?sid=' + config.wideSessionId);\n outputWS.onopen = function () {\n console.log('[output onopen] connected');\n };\n\n outputWS.onmessage = function (e) {\n console.log('[output onmessage]' + e.data);\n var data = JSON.parse(e.data);\n\n if (goLintFound) {\n goLintFound = [];\n }\n\n if ('run' === data.nextCmd) {\n var request = newWideRequest();\n request.executable = data.executable;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/run',\n data: JSON.stringify(request),\n dataType: \"json\"\n });\n }\n\n switch (data.cmd) {\n case 'run':\n var content = $('.bottom-window-group .output > div').html();\n if (!wide.curProcessId || '' === content) {\n bottomGroup.fillOutput(content + '
    ' + data.output + '
    ');\n } else {\n bottomGroup.fillOutput(content.replace(/<\\/pre>$/g, data.output + ''));\n }\n\n wide.curProcessId = data.pid;\n\n break;\n case 'run-done':\n bottomGroup.fillOutput($('.bottom-window-group .output > div').html().replace(/<\\/pre>$/g, data.output + ''));\n\n wide.curProcessId = undefined;\n $(\"#buildRun\").removeClass(\"ico-stop\")\n .addClass(\"ico-buildrun\").attr(\"title\", config.label.build_n_run);\n\n break;\n case 'start-build':\n case 'start-test':\n case 'start-vet':\n case 'start-install':\n case 'start-get':\n case 'start-git_clone':\n bottomGroup.fillOutput(data.output);\n\n break;\n case 'go test':\n case 'go vet':\n case 'go install':\n case 'go get':\n bottomGroup.fillOutput($('.bottom-window-group .output > div').html() + data.output);\n\n break;\n case 'git clone':\n bottomGroup.fillOutput($('.bottom-window-group .output > div').html() + data.output);\n tree.fileTree.reAsyncChildNodes(wide.curNode, \"refresh\", false);\n\n break;\n case 'build':\n case 'cross-build':\n bottomGroup.fillOutput($('.bottom-window-group .output > div').html() + data.output);\n\n if (data.lints) { // has build error\n var files = {};\n\n for (var i = 0; i < data.lints.length; i++) {\n var lint = data.lints[i];\n\n goLintFound.push({from: CodeMirror.Pos(lint.lineNo, 0),\n to: CodeMirror.Pos(lint.lineNo, 0),\n message: lint.msg, severity: lint.severity});\n\n files[lint.file] = lint.file;\n }\n\n $(\"#buildRun\").removeClass(\"ico-stop\")\n .addClass(\"ico-buildrun\").attr(\"title\", config.label.build_n_run);\n\n // trigger gutter lint\n for (var path in files) {\n var editor = editors.getEditorByPath(path);\n CodeMirror.signal(editor, \"change\", editor);\n }\n } else {\n if ('cross-build' === data.cmd) {\n var request = newWideRequest(),\n path = null;\n request.path = data.executable;\n request.name = data.name;\n\n $.ajax({\n async: false,\n type: 'POST',\n url: config.context + '/file/zip/new',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n $(\"#dialogAlert\").dialog(\"open\", result.msg);\n\n return false;\n }\n\n path = result.data;\n }\n });\n\n if (path) {\n window.open(config.context + '/file/zip?path=' + path + \".zip\");\n }\n }\n }\n\n break;\n }\n };\n outputWS.onclose = function (e) {\n console.log('[output onclose] disconnected (' + e.code + ')');\n };\n outputWS.onerror = function (e) {\n console.log('[output onerror]');\n };\n },\n _initFooter: function () {\n $(\".footer .cursor\").dblclick(function () {\n $(\"#dialogGoLinePrompt\").dialog(\"open\");\n });\n },\n init: function () {\n this._initFooter();\n\n this._initWS();\n\n // 点击隐藏弹出层\n $(\"body\").bind(\"mouseup\", function (event) {\n // MAC 右键文件树失效\n if (event.which === 3) {\n return false;\n }\n\n $(\".frame\").hide();\n\n if (!($(event.target).closest(\".frame\").length === 1 || event.target.className === \"frame\")) {\n $(\".menu > ul > li\").unbind().removeClass(\"selected\");\n menu.subMenu();\n }\n });\n\n // 刷新提示\n window.onbeforeunload = function () {\n if (editors.data.length > 0) {\n return config.label.confirm_save;\n }\n };\n\n // 禁止鼠标右键菜单\n document.oncontextmenu = function () {\n return false;\n };\n\n this._initDialog();\n },\n _save: function (path, editor) {\n if (!path) {\n return false;\n }\n\n var request = newWideRequest();\n request.file = path;\n request.code = editor.getValue();\n\n $.ajax({\n type: 'POST',\n url: config.context + '/file/save',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n // reset the save state\n editor.doc.markClean();\n $(\".edit-panel .tabs > div\").each(function () {\n var $span = $(this).find(\"span:eq(0)\");\n if ($span.attr(\"title\") === path) {\n $span.removeClass(\"changed\");\n }\n });\n }\n });\n },\n saveFile: function () {\n var path = editors.getCurrentPath();\n if (!path) {\n return false;\n }\n\n var editor = wide.curEditor;\n if (editor.doc.isClean()) { // no modification\n return false;\n }\n\n if (\"text/x-go\" === editor.getOption(\"mode\")) {\n wide.gofmt(path, wide.curEditor); // go fmt will save\n\n // build the file at once\n var request = newWideRequest();\n request.file = path;\n request.code = editor.getValue();\n request.nextCmd = \"\"; // build only, no following operation\n $.ajax({\n type: 'POST',\n url: config.context + '/build',\n data: JSON.stringify(request),\n dataType: \"json\",\n beforeSend: function () {\n bottomGroup.resetOutput();\n },\n success: function (result) {\n }\n });\n\n // refresh outline\n wide.refreshOutline();\n\n return;\n }\n\n wide._save(path, wide.curEditor);\n },\n stop: function () {\n if ($(\"#buildRun\").hasClass(\"ico-buildrun\")) {\n menu.run();\n return false;\n }\n\n if (!wide.curProcessId) {\n return false;\n }\n\n var request = newWideRequest();\n request.pid = wide.curProcessId;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/stop',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n $(\"#buildRun\").removeClass(\"ico-stop\")\n .addClass(\"ico-buildrun\").attr(\"title\", config.label.build_n_run);\n }\n });\n },\n gofmt: function (path, editor) {\n var cursor = editor.getCursor();\n var scrollInfo = editor.getScrollInfo();\n\n var request = newWideRequest();\n request.file = path;\n request.code = editor.getValue();\n request.cursorLine = cursor.line;\n request.cursorCh = cursor.ch;\n\n $.ajax({\n async: false, // sync\n type: 'POST',\n url: config.context + '/go/fmt',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (result.succ) {\n editor.setValue(result.data.code);\n editor.setCursor(cursor);\n editor.scrollTo(null, scrollInfo.top);\n\n wide._save(path, editor);\n }\n }\n });\n },\n fmt: function (path, editor) {\n var mode = editor.getOption(\"mode\");\n\n var cursor = editor.getCursor();\n var scrollInfo = editor.getScrollInfo();\n\n var request = newWideRequest();\n request.file = path;\n request.code = editor.getValue();\n request.cursorLine = cursor.line;\n request.cursorCh = cursor.ch;\n\n var formatted = null;\n\n switch (mode) {\n case \"text/x-go\":\n $.ajax({\n async: false, // sync\n type: 'POST',\n url: config.context + '/go/fmt',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (result.succ) {\n formatted = result.data.code;\n }\n }\n });\n\n break;\n case \"text/html\":\n formatted = html_beautify(editor.getValue());\n break;\n case \"text/javascript\":\n case \"application/json\":\n formatted = js_beautify(editor.getValue());\n break;\n case \"text/css\":\n formatted = css_beautify(editor.getValue());\n break;\n default :\n break;\n }\n\n if (formatted) {\n editor.setValue(formatted);\n editor.setCursor(cursor);\n editor.scrollTo(null, scrollInfo.top);\n\n wide._save(path, editor);\n }\n },\n getClassBySuffix: function (suffix) {\n var iconSkin = \"ico-ztree-other \";\n switch (suffix) {\n case \"html\":\n case \"htm\":\n iconSkin = \"ico-ztree-html \";\n break;\n case \"go\":\n iconSkin = \"ico-ztree-go \";\n break;\n case \"css\":\n iconSkin = \"ico-ztree-css \";\n break;\n case \"txt\":\n iconSkin = \"ico-ztree-text \";\n break;\n case \"sql\":\n iconSkin = \"ico-ztree-sql \";\n break;\n case \"properties\":\n iconSkin = \"ico-ztree-pro \";\n break;\n case \"md\":\n iconSkin = \"ico-ztree-md \";\n break;\n case \"js\", \"json\":\n iconSkin = \"ico-ztree-js \";\n break;\n case \"xml\":\n iconSkin = \"ico-ztree-xml \";\n break;\n case \"jpg\":\n case \"jpeg\":\n case \"bmp\":\n case \"gif\":\n case \"png\":\n case \"svg\":\n case \"ico\":\n iconSkin = \"ico-ztree-img \";\n break;\n }\n\n return iconSkin;\n }\n};\n\n$(document).ready(function () {\n wide.init();\n tree.init();\n menu.init();\n hotkeys.init();\n session.init();\n notification.init();\n editors.init();\n windows.init();\n bottomGroup.init();\n});\n","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file session.js\n *\n * @author Liyuan Li\n * @version 1.1.0.1, Dec 8, 2015\n */\nvar session = {\n init: function () {\n this._initWS();\n\n var getLayoutState = function (paneState) {\n var state = 'normal';\n if (paneState.isClosed) {\n state = 'min';\n } else if (paneState.size >= $('body').width()) {\n state = 'max';\n }\n\n return state;\n };\n\n // save session content every 30 seconds\n setInterval(function () {\n var request = newWideRequest(),\n filse = [],\n fileTree = [],\n currentId = editors.getCurrentId(),\n currentFile = currentId ? editors.getCurrentPath() : \"\";\n\n editors.tabs.obj._$tabs.find(\"div\").each(function () {\n var $it = $(this);\n if ($it.find(\"span:eq(0)\").attr(\"title\") !== config.label.start_page) {\n filse.push($it.find(\"span:eq(0)\").attr(\"title\"));\n }\n });\n\n fileTree = tree.getOpenPaths();\n\n request.currentFile = currentFile; // current editor file\n request.fileTree = fileTree; // file tree expansion state\n request.files = filse; // editor tabs\n\n\n request.layout = {\n \"side\": {\n \"size\": windows.outerLayout.west.state.size,\n \"state\": getLayoutState(windows.outerLayout.west.state)\n },\n \"sideRight\": {\n \"size\": windows.innerLayout.east.state.size,\n \"state\": getLayoutState(windows.innerLayout.east.state)\n },\n \"bottom\": {\n \"size\": windows.innerLayout.south.state.size,\n \"state\": getLayoutState(windows.innerLayout.south.state)\n }\n };\n\n $.ajax({\n type: 'POST',\n url: config.context + '/session/save',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n }\n });\n }, 30000);\n },\n restore: function () {\n if (!config.latestSessionContent) {\n return;\n }\n\n var fileTree = config.latestSessionContent.fileTree,\n files = config.latestSessionContent.files,\n currentFile = config.latestSessionContent.currentFile,\n id = \"\",\n nodesToOpen = [];\n\n var nodes = tree.fileTree.transformToArray(tree.fileTree.getNodes());\n\n for (var i = 0, ii = nodes.length; i < ii; i++) {\n // expand tree\n for (var j = 0, jj = fileTree.length; j < jj; j++) {\n if (nodes[i].path === fileTree[j]) {\n // expand this node only if its parents are open\n var parents = tree.getAllParents(tree.fileTree.getNodeByTId(nodes[i].tId)),\n isOpen = true;\n for (var l = 0, max = parents.length; l < max; l++) {\n if (parents[l].open === false) {\n isOpen = false;\n }\n }\n if (isOpen) {\n tree.fileTree.expandNode(nodes[i], true, false, true);\n } else {\n // flag it is open\n nodes[i].open = true;\n }\n break;\n }\n }\n\n // open editors\n for (var k = 0, kk = files.length; k < kk; k++) {\n if (nodes[i].path === files[k]) {\n nodesToOpen.push(nodes[i]);\n break;\n }\n }\n\n if (nodes[i].path === currentFile) {\n id = nodes[i].path;\n\n // FIXME: 上面的展开是异步进行的,所以执行到这里的时候可能还没有展开完,导致定位不了可视区域\n tree.fileTree.selectNode(nodes[i]);\n wide.curNode = nodes[i];\n }\n }\n\n // handle the open sequence of editors\n for (var m = 0, mm = files.length; m < mm; m++) {\n for (var n = 0, nn = nodesToOpen.length; n < nn; n++) {\n if (nodesToOpen[n].path === files[m]) {\n tree.openFile(nodesToOpen[n]);\n break;\n }\n }\n }\n\n // set the current editor\n editors.tabs.setCurrent(id);\n for (var c = 0, max = editors.data.length; c < max; c++) {\n if (id === editors.data[c].id) {\n wide.curEditor = editors.data[c].editor;\n break;\n }\n } \n },\n _initWS: function () {\n // Used for session retention, server will release all resources of the session if this channel closed\n var sessionWS = new ReconnectingWebSocket(config.channel + '/session/ws?sid=' + config.wideSessionId);\n\n sessionWS.onopen = function () {\n console.log('[session onopen] connected');\n\n var dateFormat = function (time, fmt) {\n var date = new Date(time);\n var dateObj = {\n \"M+\": date.getMonth() + 1,\n \"d+\": date.getDate(),\n \"h+\": date.getHours(),\n \"m+\": date.getMinutes(),\n \"s+\": date.getSeconds(),\n \"q+\": Math.floor((date.getMonth() + 3) / 3),\n \"S\": date.getMilliseconds()\n };\n if (/(y+)/.test(fmt))\n fmt = fmt.replace(RegExp.$1, (date.getFullYear() + \"\").substr(4 - RegExp.$1.length));\n for (var k in dateObj)\n if (new RegExp(\"(\" + k + \")\").test(fmt)) {\n fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1)\n ? (dateObj[k]) : ((\"00\" + dateObj[k]).substr((\"\" + dateObj[k]).length)));\n }\n return fmt;\n };\n\n var data = {type: \"Network\", severity: \"INFO\",\n message: \"Connected to server [sid=\" + config.wideSessionId + \"], \" + dateFormat(new Date().getTime(), 'yyyy-MM-dd hh:mm:ss')},\n $notification = $('.bottom-window-group .notification > table'),\n notificationHTML = '';\n\n notificationHTML += '' + data.severity\n + '' + data.message\n + '' + data.type + '';\n $notification.append(notificationHTML);\n };\n\n sessionWS.onmessage = function (e) {\n var data = JSON.parse(e.data);\n switch (data.cmd) {\n case 'create-file':\n var node = tree.fileTree.getNodeByTId(tree.getTIdByPath(data.dir)),\n name = data.path.replace(data.dir + '/', ''),\n mode = CodeMirror.findModeByFileName(name),\n iconSkin = wide.getClassBySuffix(name.split(\".\")[1]);\n\n if (data.type && data.type === 'f') {\n tree.fileTree.addNodes(node, [{\n \"id\": data.path,\n \"name\": name,\n \"iconSkin\": iconSkin,\n \"path\": data.path,\n \"mode\": mode,\n \"removable\": true,\n \"creatable\": true\n }]);\n\n } else {\n tree.fileTree.addNodes(node, [{\n \"id\": data.path,\n \"name\": name,\n \"iconSkin\": \"ico-ztree-dir \",\n \"path\": data.path,\n \"removable\": true,\n \"creatable\": true,\n \"isParent\": true\n }]);\n }\n break;\n case 'remove-file':\n case 'rename-file':\n var node = tree.fileTree.getNodeByTId(tree.getTIdByPath(data.path));\n tree.fileTree.removeNode(node);\n\n var nodes = tree.fileTree.transformToArray(node);\n for (var i = 0, ii = nodes.length; i < ii; i++) {\n editors.tabs.del(nodes[i].path);\n }\n\n break;\n }\n };\n sessionWS.onclose = function (e) {\n console.log('[session onclose] disconnected (' + e.code + ')');\n\n var data = {type: \"Network\", severity: \"ERROR\",\n message: \"Disconnected from server, trying to reconnect it [sid=\" + config.wideSessionId + \"]\"},\n $notification = $('.bottom-window-group .notification > table'),\n notificationHTML = '';\n\n notificationHTML += '' + data.severity\n + '' + data.message\n + '' + data.type + '';\n $notification.append(notificationHTML);\n\n $(\".notification-count\").show();\n };\n sessionWS.onerror = function (e) {\n console.log('[session onerror]');\n };\n }\n};","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file menu.js\n *\n * @author Liyuan Li\n * @author Liang Ding\n * @version 1.0.1.2, Mar 27, 2017\n */\nvar menu = {\n init: function () {\n this.subMenu();\n this._initPreference();\n this._initAbout();\n this._initShare();\n\n // 点击子菜单后消失\n $(\".menu .frame li\").click(function () {\n $(\".menu > ul > li\").unbind().removeClass(\"selected\");\n menu.subMenu();\n });\n },\n _initShare: function () {\n $(\".menu .ico-share\").hover(function () {\n $(\".menu .share-panel\").show();\n });\n\n $(\".share-panel .font-ico\").click(function () {\n var key = $(this).attr('class').split('-')[2];\n var url = \"https://wide.b3log.org\", pic = 'https://wide.b3log.org/static/images/wide-logo.png';\n var urls = {};\n urls.email = \"mailto:?subject=\" + $('title').text()\n + \"&body=\" + $('meta[name=description]').attr('content') + ' ' + url;\n\n var twitterShare = encodeURIComponent($('meta[name=description]').attr('content') + \" \" + url + \" #golang\");\n urls.twitter = \"https://twitter.com/intent/tweet?status=\" + twitterShare;\n\n urls.facebook = \"https://www.facebook.com/sharer/sharer.php?u=\" + url;\n urls.googleplus = \"https://plus.google.com/share?url=\" + url;\n\n var title = encodeURIComponent($('title').text() + '. \\n' + $('meta[name=description]').attr('content')\n + \" #golang#\");\n urls.weibo = \"http://v.t.sina.com.cn/share/share.php?title=\" + title + \"&url=\" + url + \"&pic=\" + pic;\n urls.tencent = \"http://share.v.t.qq.com/index.php?c=share&a=index&title=\" + title +\n \"&url=\" + url + \"&pic=\" + pic;\n\n window.open(urls[key], \"_blank\", \"top=100,left=200,width=648,height=618\");\n });\n },\n _initAbout: function () {\n $(\"#dialogAbout\").load(config.context + '/about', function () {\n $(\"#dialogAbout\").dialog({\n \"modal\": true,\n \"title\": config.label.about,\n \"hideFooter\": true,\n \"afterOpen\": function () {\n $.ajax({\n url: \"https://rhythm.b3log.org/version/wide/latest\",\n type: \"GET\",\n dataType: \"jsonp\",\n jsonp: \"callback\",\n success: function (data, textStatus) {\n if ($(\"#dialogAbout .version\").text() === data.wideVersion) {\n $(\".upgrade\").text(config.label.uptodate);\n } else {\n $(\".upgrade\").html(config.label.new_version_available + config.label.colon\n + \"\" + data.wideVersion + \"\");\n }\n }\n });\n }\n });\n });\n },\n disabled: function (list) {\n for (var i = 0, max = list.length; i < max; i++) {\n $(\".menu li.\" + list[i]).addClass(\"disabled\");\n }\n },\n undisabled: function (list) {\n for (var i = 0, max = list.length; i < max; i++) {\n $(\".menu li.\" + list[i]).removeClass(\"disabled\");\n }\n },\n // 焦点不在菜单上时需点击展开子菜单,否则为鼠标移动展开\n subMenu: function () {\n $(\".menu > ul > li\").click(function (event) {\n if ($(event.target).closest(\".frame\").length === 1) {\n return;\n }\n var $it = $(this);\n $it.find('.frame').show();\n $(\".menu > ul > li\").removeClass(\"selected\");\n $(this).addClass(\"selected\");\n\n $(\".menu > ul > li\").unbind();\n\n $(\".menu > ul > li\").mouseover(function () {\n if ($(event.target).closest(\".frame\").length === 1) {\n return;\n }\n $(\".menu .frame\").hide();\n $(this).find('.frame').show();\n $(\".menu > ul > li\").removeClass(\"selected\");\n $(this).addClass(\"selected\");\n });\n });\n },\n openPreference: function () {\n $(\"#dialogPreference\").dialog(\"open\");\n },\n saveAllFiles: function () {\n if ($(\".menu li.save-all\").hasClass(\"disabled\")) {\n return false;\n }\n for (var i = 0, ii = editors.data.length; i < ii; i++) {\n var path = editors.data[i].id;\n var editor = editors.data[i].editor;\n\n if (\"text/x-go\" === editor.getOption(\"mode\")) {\n wide.fmt(path, editor);\n } else {\n wide._save(path, editor);\n }\n }\n },\n closeAllFiles: function () {\n if ($(\".menu li.close-all\").hasClass(\"disabled\")) {\n return false;\n }\n\n // 设置全部关闭标识\n var removeData = [];\n $(\".edit-panel .tabs > div\").each(function (i) {\n if (i !== 0) {\n removeData.push($(this).data(\"index\"));\n }\n });\n $(\"#dialogCloseEditor\").data(\"removeData\", removeData);\n // 开始关闭\n $(\".edit-panel .tabs .ico-close:eq(0)\").click();\n },\n exit: function () {\n var request = newWideRequest();\n\n $.ajax({\n type: 'POST',\n url: config.context + '/logout',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (result.succ) {\n window.location.href = config.context + \"/login\";\n }\n }\n });\n },\n openAbout: function () {\n $(\"#dialogAbout\").dialog(\"open\");\n },\n goget: function () {\n menu.saveAllFiles();\n\n var currentPath = editors.getCurrentPath();\n if (!currentPath) {\n return false;\n }\n\n if ($(\".menu li.go-get\").hasClass(\"disabled\")) {\n return false;\n }\n\n var request = newWideRequest();\n request.file = currentPath;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/go/get',\n data: JSON.stringify(request),\n dataType: \"json\",\n beforeSend: function () {\n bottomGroup.resetOutput();\n },\n success: function (result) {\n }\n });\n },\n goinstall: function () {\n menu.saveAllFiles();\n\n var currentPath = editors.getCurrentPath();\n if (!currentPath) {\n return false;\n }\n\n if ($(\".menu li.go-install\").hasClass(\"disabled\")) {\n return false;\n }\n\n var request = newWideRequest();\n request.file = currentPath;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/go/install',\n data: JSON.stringify(request),\n dataType: \"json\",\n beforeSend: function () {\n bottomGroup.resetOutput();\n },\n success: function (result) {\n }\n });\n },\n // go test.\n test: function () {\n menu.saveAllFiles();\n\n var currentPath = editors.getCurrentPath();\n if (!currentPath) {\n return false;\n }\n\n if ($(\".menu li.go-test\").hasClass(\"disabled\")) {\n return false;\n }\n\n var request = newWideRequest();\n request.file = currentPath;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/go/test',\n data: JSON.stringify(request),\n dataType: \"json\",\n beforeSend: function () {\n bottomGroup.resetOutput();\n },\n success: function (result) {\n }\n });\n },\n // go vet.\n govet: function () {\n menu.saveAllFiles();\n\n var currentPath = editors.getCurrentPath();\n if (!currentPath) {\n return false;\n }\n\n if ($(\".menu li.go-vet\").hasClass(\"disabled\")) {\n return false;\n }\n\n var request = newWideRequest();\n request.file = currentPath;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/go/vet',\n data: JSON.stringify(request),\n dataType: \"json\",\n beforeSend: function () {\n bottomGroup.resetOutput();\n },\n success: function (result) {\n }\n });\n },\n // Build & Run.\n run: function () {\n menu.saveAllFiles();\n\n if ($(\"#buildRun\").hasClass(\"ico-stop\")) {\n wide.stop();\n return false;\n }\n\n var currentPath = editors.getCurrentPath();\n if (!currentPath) {\n return false;\n }\n\n if ($(\".menu li.run\").hasClass(\"disabled\")) {\n return false;\n }\n\n var request = newWideRequest();\n request.file = currentPath;\n request.code = wide.curEditor.getValue();\n request.nextCmd = \"run\";\n\n $.ajax({\n type: 'POST',\n url: config.context + '/build',\n data: JSON.stringify(request),\n dataType: \"json\",\n beforeSend: function () {\n bottomGroup.resetOutput();\n\n $(\"#buildRun\").addClass(\"ico-stop\")\n .removeClass(\"ico-buildrun\").attr(\"title\", config.label.stop);\n },\n success: function (result) {\n }\n });\n },\n // Build.\n build: function () {\n menu.saveAllFiles();\n\n var currentPath = editors.getCurrentPath();\n if (!currentPath) {\n return false;\n }\n\n if ($(\".menu li.build\").hasClass(\"disabled\")) {\n return false;\n }\n\n var request = newWideRequest();\n request.file = currentPath;\n request.code = wide.curEditor.getValue();\n request.nextCmd = \"\"; // build only, no following operation\n\n $.ajax({\n type: 'POST',\n url: config.context + '/build',\n data: JSON.stringify(request),\n dataType: \"json\",\n beforeSend: function () {\n bottomGroup.resetOutput();\n },\n success: function (result) {\n }\n });\n },\n _initPreference: function () {\n $(\"#dialogPreference\").load(config.context + '/preference', function () {\n $(\"#dialogPreference input\").keyup(function () {\n var isChange = false,\n emptys = [],\n emptysTip = '';\n $(\"#dialogPreference input\").each(function () {\n var $it = $(this);\n // data-value 如为数字,则不会和 value 一样转换为 String,再次不使用全等\n if ($it.val() != $it.data(\"value\")) {\n isChange = true;\n }\n\n if ($.trim($it.val()) === '') {\n emptys.push($it);\n }\n });\n\n var $okBtn = $(\"#dialogPreference\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\");\n if (isChange) {\n $okBtn.prop(\"disabled\", false);\n } else {\n $okBtn.prop(\"disabled\", true);\n }\n\n if (emptys.length === 0) {\n $(\"#dialogPreference\").find(\".tip\").html(\"\");\n $okBtn.prop(\"disabled\", false);\n } else {\n for (var i = 0, max = emptys.length; i < max; i++) {\n var tabIndex = emptys[i].closest('div').data(\"index\"),\n text = $.trim(emptys[i].parent().text());\n emptysTip += '[' + $('#dialogPreference .tabs > div[data-index=\"' + tabIndex + '\"]').text()\n + '] -> [' + text.substr(0, text.length - 1)\n + ']: ' + config.label.no_empty + \"
    \";\n }\n $(\"#dialogPreference\").find(\".tip\").html(emptysTip);\n $okBtn.prop(\"disabled\", true);\n }\n });\n\n $(\"#dialogPreference select\").on(\"change\", function () {\n var isChange = false;\n $(\"#dialogPreference select\").each(function () {\n if ($(this).val() !== $(this).data(\"value\")) {\n isChange = true;\n }\n });\n\n var $okBtn = $(\"#dialogPreference\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\");\n if (isChange) {\n $okBtn.prop(\"disabled\", false);\n } else {\n $okBtn.prop(\"disabled\", true);\n }\n });\n\n $(\"#dialogPreference\").dialog({\n \"modal\": true,\n \"height\": 280,\n \"width\": 800,\n \"title\": config.label.preference,\n \"okText\": config.label.apply,\n \"cancelText\": config.label.cancel,\n \"afterOpen\": function () {\n var $okBtn = $(\"#dialogPreference\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\");\n $okBtn.prop(\"disabled\", true);\n },\n \"ok\": function () {\n var request = newWideRequest(),\n $dialogPreference = $(\"#dialogPreference\"),\n $fontFamily = $dialogPreference.find(\"input[name=fontFamily]\"),\n $fontSize = $dialogPreference.find(\"input[name=fontSize]\"),\n $goFmt = $dialogPreference.find(\"select[name=goFmt]\"),\n $GoBuildArgsForLinux = $dialogPreference.find(\"input[name=GoBuildArgsForLinux]\"),\n $GoBuildArgsForWindows = $dialogPreference.find(\"input[name=GoBuildArgsForWindows]\"),\n $GoBuildArgsForDarwin = $dialogPreference.find(\"input[name=GoBuildArgsForDarwin]\"),\n $workspace = $dialogPreference.find(\"input[name=workspace]\"),\n $password = $dialogPreference.find(\"input[name=password]\"),\n $email = $dialogPreference.find(\"input[name=email]\"),\n $locale = $dialogPreference.find(\"select[name=locale]\"),\n $theme = $dialogPreference.find(\"select[name=theme]\"),\n $editorFontFamily = $dialogPreference.find(\"input[name=editorFontFamily]\"),\n $editorFontSize = $dialogPreference.find(\"input[name=editorFontSize]\"),\n $editorLineHeight = $dialogPreference.find(\"input[name=editorLineHeight]\"),\n $editorTheme = $dialogPreference.find(\"select[name=editorTheme]\"),\n $editorTabSize = $dialogPreference.find(\"input[name=editorTabSize]\"),\n $keymap = $dialogPreference.find(\"select[name=keymap]\");\n\n $.extend(request, {\n \"fontFamily\": $fontFamily.val(),\n \"fontSize\": $fontSize.val(),\n \"goFmt\": $goFmt.val(),\n \"GoBuildArgsForLinux\": $GoBuildArgsForLinux.val(),\n \"GoBuildArgsForWindows\": $GoBuildArgsForWindows.val(),\n \"GoBuildArgsForDarwin\": $GoBuildArgsForDarwin.val(),\n \"workspace\": $workspace.val(),\n \"password\": $password.val(),\n \"email\": $email.val(),\n \"locale\": $locale.val(),\n \"theme\": $theme.val(),\n \"editorFontFamily\": $editorFontFamily.val(),\n \"editorFontSize\": $editorFontSize.val(),\n \"editorLineHeight\": $editorLineHeight.val(),\n \"editorTheme\": $editorTheme.val(),\n \"editorTabSize\": $editorTabSize.val(),\n \"keymap\": $keymap.val()\n });\n\n if (config.keymap !== $keymap.val()) {\n window.location.reload();\n }\n\n $.ajax({\n type: 'POST',\n url: config.context + '/preference',\n data: JSON.stringify(request),\n success: function (result, textStatus, jqXHR) {\n if (!result.succ) {\n return false;\n }\n\n $fontFamily.data(\"value\", $fontFamily.val());\n $fontSize.data(\"value\", $fontSize.val());\n $goFmt.data(\"value\", $goFmt.val());\n $GoBuildArgsForLinux.data(\"value\", $GoBuildArgsForLinux.val());\n $GoBuildArgsForWindows.data(\"value\", $GoBuildArgsForWindows.val());\n $GoBuildArgsForDarwin.data(\"value\", $GoBuildArgsForDarwin.val());\n $workspace.data(\"value\", $workspace.val());\n $password.data(\"value\", $password.val());\n $email.data(\"value\", $email.val());\n $locale.data(\"value\", $locale.val());\n $theme.data(\"value\", $theme.val());\n $editorFontFamily.data(\"value\", $editorFontFamily.val());\n $editorFontSize.data(\"value\", $editorFontSize.val());\n $editorLineHeight.data(\"value\", $editorLineHeight.val());\n $editorTheme.data(\"value\", $editorTheme.val());\n $editorTabSize.data(\"value\", $editorTabSize.val());\n $keymap.data(\"value\", $keymap.val());\n\n // update the config\n config.keymap = $keymap.val();\n\n var $okBtn = $(\"#dialogPreference\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\");\n $okBtn.prop(\"disabled\", true);\n\n $(\"#themesLink\").attr(\"href\", config.staticServer + '/static/css/themes/' + $theme.val() + '.css');\n\n config.editorTheme = $editorTheme.val();\n for (var i = 0, ii = editors.data.length; i < ii; i++) {\n editors.data[i].editor.setOption(\"theme\", $editorTheme.val());\n }\n }\n });\n }\n });\n\n new Tabs({\n id: \".preference\"\n });\n });\n }\n};\n","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file windows.js\n *\n * @author Liyuan Li\n * @author Liang Ding\n * @version 1.1.2.2, Feb 16, 2016\n */\nvar windows = {\n isMaxEditor: false,\n outerLayout: {},\n innerLayout: {},\n init: function () {\n if (!config.latestSessionContent) {\n config.latestSessionContent = {\n \"fileTree\": [],\n \"files\": [],\n \"currentFile\": \"\",\n };\n }\n \n if (!config.latestSessionContent.layout) {\n config.latestSessionContent.layout = {\n \"side\": {\n \"size\": 200,\n \"state\": 'normal'\n },\n \"sideRight\": {\n \"size\": 200,\n \"state\": 'normal'\n },\n \"bottom\": {\n \"size\": 100,\n \"state\": 'normal'\n }\n };\n }\n\n var layout = config.latestSessionContent.layout;\n\n this.outerLayout = $('body').layout({\n north__paneSelector: \".menu\",\n center__paneSelector: \".content\",\n south__paneSelector: \".footer\",\n north__size: 22,\n south__size: 19,\n spacing_open: 2,\n north__spacing_open: 0,\n south__spacing_open: 0,\n defaults: {\n fxSpeed_open: 300,\n fxSpeed_close: 100,\n fxSettings_close: {\n easing: \"easeOutQuint\"\n },\n fxSettings_open: {\n easing: \"easeInQuint\"\n }\n },\n west: {\n size: layout.side.size,\n paneSelector: \".side\",\n togglerLength_open: 0,\n togglerLength_closed: 15,\n togglerAlign_closed: \"top\",\n slideTrigger_open: \"mouseover\",\n spacing_closed: 15,\n minSize: 100,\n togglerClass: \"ico-restore\",\n togglerTip_open: config.label.min,\n togglerTip_closed: config.label.restore_side,\n resizerTip: config.label.resize,\n initClosed: (layout.side.state === 'min')\n }\n });\n\n this.innerLayout = $('div.content').layout({\n spacing_open: 2,\n defaults: {\n fxSpeed_open: 300,\n fxSpeed_close: 100,\n fxSettings_close: {\n easing: \"easeOutQuint\"\n },\n fxSettings_open: {\n easing: \"easeInQuint\"\n }\n },\n center: {\n paneSelector: \".edit-panel\"\n },\n east: {\n size: layout.sideRight.size,\n paneSelector: \".side-right\",\n togglerLength_open: 0,\n togglerLength_closed: 15,\n togglerAlign_closed: \"top\",\n slideTrigger_open: \"mouseover\",\n spacing_closed: 15,\n minSize: 100,\n togglerClass: \"ico-restore\",\n togglerTip_open: config.label.min,\n togglerTip_closed: config.label.restore_outline,\n resizerTip: config.label.resize,\n initClosed: (layout.sideRight.state === 'min')\n },\n south: {\n size: layout.bottom.size,\n paneSelector: \".bottom-window-group\",\n togglerLength_open: 0,\n togglerLength_closed: 15,\n togglerAlign_closed: \"top\",\n slideTrigger_open: \"mouseover\",\n spacing_closed: 16,\n minSize: 100,\n togglerClass: \"ico-restore\",\n togglerTip_open: config.label.min,\n togglerTip_closed: config.label.restore_bottom,\n resizerTip: config.label.resize,\n initClosed: (layout.bottom.state === 'min'),\n ondrag_end: function (type, pane) {\n windows.refreshEditor(pane, 'drag');\n },\n onresize_end: function (type, pane) {\n windows.refreshEditor(pane, 'resize');\n },\n onclose_end: function (type, pane) {\n windows.refreshEditor(pane, 'close');\n },\n onopen_end: function (type, pane) {\n windows.refreshEditor(pane, 'open');\n },\n onshow_end: function (type, pane) {\n windows.refreshEditor(pane, 'show');\n }\n }\n });\n\n this.outerLayout.addCloseBtn(\".side .ico-min\", \"west\");\n this.innerLayout.addCloseBtn(\".side-right .ico-min\", \"east\");\n this.innerLayout.addCloseBtn(\".bottom-window-group .ico-min\", \"south\");\n\n if (layout.side.state === 'max') {\n windows.maxSide();\n }\n if (layout.sideRight.state === 'max') {\n windows.maxSideRight();\n }\n if (layout.bottom.state === 'max') {\n windows.maxBottom();\n }\n\n $(\".toolbars .ico-max\").click(function () {\n windows.toggleEditor();\n });\n\n $(\".edit-panel .tabs\").on(\"dblclick\", function () {\n windows.toggleEditor();\n });\n\n $(\".bottom-window-group .tabs\").dblclick(function () {\n var $it = $(\".bottom-window-group\");\n if ($it.hasClass(\"bottom-window-group-max\")) {\n windows.restoreBottom();\n } else {\n windows.maxBottom($it);\n }\n });\n\n $(\".side .tabs\").dblclick(function () {\n var $it = $(\".side\");\n if ($it.hasClass(\"side-max\")) {\n windows.restoreSide();\n } else {\n windows.restoreSide($it);\n }\n });\n\n $(\".side-right .tabs\").dblclick(function () {\n var $it = $(\".side-right\");\n if ($it.hasClass(\"side-right-max\")) {\n windows.restoreSideRight();\n } else {\n windows.maxSideRight($it);\n }\n });\n\n $('.bottom-window-group .search').height($('.bottom-window-group .tabs-panel').height());\n $(window).resize(function () {\n windows.refreshEditor($('.bottom-window-group'));\n });\n\n },\n maxEditor: function () {\n var $it = $(\".toolbars .font-ico\");\n windows.outerLayout.close('west');\n windows.innerLayout.close('south');\n windows.innerLayout.close('east');\n $it.removeClass('ico-max').addClass('ico-restore').attr('title', config.label.min);\n windows.isMaxEditor = true;\n },\n maxBottom: function ($it) {\n $it.data('height', $it.height()).addClass(\"bottom-window-group-max\").find('.ico-min').hide();\n windows.outerLayout.hide('west');\n windows.innerLayout.hide('east');\n windows.innerLayout.sizePane('south', $('.content').height());\n },\n maxSide: function ($it) {\n $it.data('width', $it.width()).addClass(\"side-max\").find('.ico-min').hide();\n $('.content').hide();\n windows.outerLayout.sizePane('west', $('body').width());\n },\n maxSideRight: function ($it) {\n $it.addClass(\"side-right-max\").data('width', $it.width()).find('.ico-min').hide();\n windows.outerLayout.hide('west');\n windows.innerLayout.hide('south');\n windows.innerLayout.sizePane('east', $('body').width());\n },\n toggleEditor: function () {\n var $it = $(\".toolbars .font-ico\");\n if ($it.hasClass('ico-restore')) {\n windows.restoreEditor();\n } else {\n windows.maxEditor();\n }\n },\n restoreBottom: function () {\n var $it = $(\".bottom-window-group\");\n $it.removeClass(\"bottom-window-group-max\").find('.ico-min').show();\n windows.outerLayout.show('west');\n windows.innerLayout.show('east');\n windows.innerLayout.sizePane('south', $it.data('height'));\n },\n restoreSide: function () {\n var $it = $(\".side\");\n $it.removeClass(\"side-max\").find('.ico-min').show();\n $('.content').show();\n windows.outerLayout.sizePane('west', $it.data('width'));\n },\n restoreSideRight: function () {\n var $it = $(\".side-right\");\n $it.removeClass(\"side-right-max\").find('.ico-min').show();\n windows.outerLayout.show('west');\n windows.innerLayout.show('south');\n windows.innerLayout.sizePane('east', $it.data('width'));\n },\n restoreEditor: function () {\n windows.outerLayout.open('west');\n windows.innerLayout.open('south');\n windows.innerLayout.open('east');\n windows.isMaxEditor = false;\n $(\".toolbars .font-ico\").addClass('ico-max').removeClass('ico-restore').attr('title', config.label.max_editor);\n },\n refreshEditor: function (pane, type) {\n var editorDatas = editors.data,\n height = $('.content').height() - pane.height() - 24;\n switch (type) {\n case 'close':\n height = $('.content').height() - 40;\n break;\n default:\n break;\n }\n for (var i = 0, ii = editorDatas.length; i < ii; i++) {\n editorDatas[i].editor.setSize(\"100%\", height);\n }\n\n $('.bottom-window-group .search').height($('.bottom-window-group .tabs-panel').height());\n },\n flowBottom: function () {\n if (windows.innerLayout.south.state.isClosed) {\n windows.innerLayout.slideOpen('south');\n }\n }\n};","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file hotkeys.js\n *\n * @author Liyuan Li\n * @author Liang Ding\n * @version 1.0.0.2, Dec 15, 2015\n */\nvar hotkeys = {\n defaultKeyMap: {\n // Ctrl-0\n goEditor: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 48,\n fun: function () {\n if (wide.curEditor) {\n wide.curEditor.focus();\n }\n }\n },\n // Ctrl-1\n goFileTree: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 49,\n fun: function () {\n // 有些元素需设置 tabindex 为 -1 时才可以 focus\n if (windows.outerLayout.west.state.isClosed) {\n windows.outerLayout.slideOpen('west');\n }\n $(\"#files\").focus();\n }\n },\n // Ctrl-2\n goOutline: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 50,\n fun: function () {\n if (windows.innerLayout.east.state.isClosed) {\n windows.innerLayout.slideOpen('east');\n }\n\n $(\"#outline\").focus();\n }\n },\n // Ctrl-4\n goOutput: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 52,\n fun: function () {\n bottomGroup.tabs.setCurrent(\"output\");\n windows.flowBottom();\n $(\".bottom-window-group .output\").focus();\n }\n },\n // Ctrl-5\n goSearch: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 53,\n fun: function () {\n bottomGroup.tabs.setCurrent(\"search\");\n windows.flowBottom();\n $(\".bottom-window-group .search\").focus();\n }\n },\n // Ctrl-6\n goNotification: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 54,\n fun: function () {\n bottomGroup.tabs.setCurrent(\"notification\");\n windows.flowBottom();\n $(\".bottom-window-group .notification\").focus();\n }\n },\n // Alt-C\n clearWindow: {\n ctrlKey: false,\n altKey: true,\n shiftKey: false,\n which: 67\n },\n // Ctrl-D 窗口组切换 \n changeEditor: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 68\n },\n // Ctrl-F search \n search: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 70\n },\n // Ctrl-Q close current editor \n closeCurEditor: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 81\n },\n // Ctrl-R\n rename: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 82\n },\n // Shift-Alt-O 跳转到文件\n goFile: {\n ctrlKey: false,\n altKey: true,\n shiftKey: true,\n which: 79\n },\n // F5 Build\n build: {\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n which: 116\n },\n // F6 Build & Run\n buildRun: {\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n which: 117\n }\n },\n bindList: function ($source, $list, enterFun) {\n $list.data(\"index\", 0);\n $source.keydown(function (event) {\n var index = $list.data(\"index\"),\n count = $list.find(\"li\").length;\n\n if (count === 0) {\n return true;\n }\n\n if (event.which === 38) { // up\n index--;\n if (index < 0) {\n index = count - 1;\n }\n }\n\n if (event.which === 40) { // down\n index++;\n if (index > count - 1) {\n index = 0;\n }\n }\n\n var $selected = $list.find(\"li:eq(\" + index + \")\");\n\n if (event.which === 13) { // enter\n enterFun($selected);\n }\n\n $list.find(\"li\").removeClass(\"selected\");\n $list.data(\"index\", index);\n $selected.addClass(\"selected\");\n\n if (index === 0) {\n $list.scrollTop(0);\n } else {\n if ($selected[0].offsetTop + $list.scrollTop() > $list.height()) {\n if (event.which === 40) {\n $list.scrollTop($list.scrollTop() + $selected.height());\n } else {\n $list.scrollTop($selected[0].offsetTop);\n }\n } else {\n $list.scrollTop(0);\n }\n }\n\n // 阻止上下键改变光标位置\n if (event.which === 38 || event.which === 40 || event.which === 13) {\n return false;\n }\n });\n },\n _bindOutput: function () {\n $(\".bottom-window-group .output\").keydown(function (event) {\n var hotKeys = hotkeys.defaultKeyMap;\n if (event.altKey === hotKeys.clearWindow.altKey\n && event.which === hotKeys.clearWindow.which) { // Alt-C clear output\n bottomGroup.clear('output');\n\n event.preventDefault();\n\n return;\n }\n });\n },\n _bindFileTree: function () {\n $(\"#files\").keydown(function (event) {\n event.preventDefault();\n\n var hotKeys = hotkeys.defaultKeyMap;\n if (event.ctrlKey === hotKeys.search.ctrlKey\n && event.which === hotKeys.search.which) { // Ctrl-F 搜索\n $(\"#dialogSearchForm\").dialog(\"open\");\n return;\n }\n\n if (event.ctrlKey === hotKeys.rename.ctrlKey\n && event.which === hotKeys.rename.which) { // Ctrl-R 重命名\n if (wide.curNode.removable) {\n $(\"#dialogRenamePrompt\").dialog(\"open\");\n }\n return;\n }\n\n switch (event.which) {\n case 46: // delete\n tree.removeIt();\n break;\n case 13: // enter\n if (!wide.curNode) {\n return false;\n }\n\n if (tree.isDir()) {\n if (wide.curNode.open) {\n return false;\n }\n\n tree.fileTree.expandNode(wide.curNode, true, false, true);\n $(\"#files\").focus();\n\n break;\n }\n\n tree.openFile(wide.curNode);\n\n break;\n case 38: // up\n var node = {};\n\n if (!wide.curNode) { // select the first one if no node been selected\n node = tree.fileTree.getNodeByTId(\"files_1\");\n } else {\n if (wide.curNode && wide.curNode.isFirstNode && wide.curNode.level === 0) {\n return false;\n }\n\n node = wide.curNode.getPreNode();\n if (wide.curNode.isFirstNode && wide.curNode.getParentNode()) {\n node = wide.curNode.getParentNode();\n }\n\n var preNode = wide.curNode.getPreNode();\n if (preNode && tree.isDir() && preNode.open) {\n node = tree.getCurrentNodeLastNode(preNode);\n }\n }\n\n wide.curNode = node;\n tree.fileTree.selectNode(node);\n $(\"#files\").focus();\n break;\n case 40: // down\n var node = {};\n\n if (!wide.curNode) { // select the first one if no node been selected \n node = tree.fileTree.getNodeByTId(\"files_1\");\n } else {\n if (wide.curNode && tree.isBottomNode(wide.curNode)) {\n return false;\n }\n\n node = wide.curNode.getNextNode();\n if (tree.isDir() && wide.curNode.open) {\n node = wide.curNode.children[0];\n }\n\n var nextShowNode = tree.getNextShowNode(wide.curNode);\n if (wide.curNode.isLastNode && wide.curNode.level !== 0 && !wide.curNode.open && nextShowNode) {\n node = nextShowNode;\n }\n }\n\n if (node) {\n wide.curNode = node;\n tree.fileTree.selectNode(node);\n }\n\n $(\"#files\").focus();\n break;\n case 37: // left\n if (!wide.curNode) {\n wide.curNode = tree.fileTree.getNodeByTId(\"files_1\");\n tree.fileTree.selectNode(wide.curNode);\n $(\"#files\").focus();\n return false;\n }\n\n if (!tree.isDir() || !wide.curNode.open) {\n return false;\n }\n\n tree.fileTree.expandNode(wide.curNode, false, false, true);\n $(\"#files\").focus();\n break;\n case 39: // right\n if (!wide.curNode) {\n wide.curNode = tree.fileTree.getNodeByTId(\"files_1\");\n tree.fileTree.selectNode(wide.curNode);\n $(\"#files\").focus();\n return false;\n }\n\n if (!tree.isDir() || wide.curNode.open) {\n return false;\n }\n\n tree.fileTree.expandNode(wide.curNode, true, false, true);\n $(\"#files\").focus();\n\n break;\n case 116: // F5\n if (!wide.curNode || !tree.isDir()) {\n return false;\n }\n\n tree.refresh(wide.curNode);\n\n break;\n }\n });\n },\n _bindDocument: function () {\n var hotKeys = this.defaultKeyMap;\n $(document).keydown(function (event) {\n if (event.ctrlKey === hotKeys.goEditor.ctrlKey\n && event.which === hotKeys.goEditor.which) { // Ctrl-0 焦点切换到当前编辑器\n hotKeys.goEditor.fun();\n event.preventDefault();\n\n return;\n }\n\n if (event.ctrlKey === hotKeys.goFileTree.ctrlKey\n && event.which === hotKeys.goFileTree.which) { // Ctrl-1 焦点切换到文件树\n hotKeys.goFileTree.fun();\n event.preventDefault();\n\n return;\n }\n\n if (event.ctrlKey === hotKeys.goOutline.ctrlKey\n && event.which === hotKeys.goOutline.which) { // Ctrl-2 焦点切换到大纲\n hotKeys.goOutline.fun();\n event.preventDefault();\n\n return;\n }\n\n if (event.ctrlKey === hotKeys.goOutput.ctrlKey\n && event.which === hotKeys.goOutput.which) { // Ctrl-4 焦点切换到输出窗口 \n hotKeys.goOutput.fun();\n event.preventDefault();\n\n return;\n }\n\n if (event.ctrlKey === hotKeys.goSearch.ctrlKey\n && event.which === hotKeys.goSearch.which) { // Ctrl-5 焦点切换到搜索窗口 \n hotKeys.goSearch.fun();\n event.preventDefault();\n\n return;\n }\n\n if (event.ctrlKey === hotKeys.goNotification.ctrlKey\n && event.which === hotKeys.goNotification.which) { // Ctrl-6 焦点切换到通知窗口 \n hotKeys.goNotification.fun();\n event.preventDefault();\n\n return;\n }\n\n if (event.ctrlKey === hotKeys.closeCurEditor.ctrlKey\n && event.which === hotKeys.closeCurEditor.which) { // Ctrl-Q 关闭当前编辑器 \n $(\".edit-panel .tabs > div.current\").find(\".ico-close\").click();\n event.preventDefault();\n\n return;\n }\n\n if (event.ctrlKey === hotKeys.changeEditor.ctrlKey\n && event.which === hotKeys.changeEditor.which) { // Ctrl-D 窗口组切换\n if (document.activeElement.className === \"notification\"\n || document.activeElement.className === \"output\"\n || document.activeElement.className === \"search\") {\n // 焦点在底部窗口组时,对底部进行切换\n var tabs = [\"output\", \"search\", \"notification\"],\n nextPath = \"\";\n for (var i = 0, ii = tabs.length; i < ii; i++) {\n if (bottomGroup.tabs.getCurrentId() === tabs[i]) {\n if (i < ii - 1) {\n nextPath = tabs[i + 1];\n } else {\n nextPath = tabs[0];\n }\n break;\n }\n }\n bottomGroup.tabs.setCurrent(nextPath);\n $(\".bottom-window-group .\" + nextPath).focus();\n\n event.preventDefault();\n\n return false;\n }\n\n if (editors.data.length > 1) {\n var nextPath = \"\";\n for (var i = 0, ii = editors.data.length; i < ii; i++) {\n var currentId = editors.getCurrentId();\n if (currentId) {\n if (currentId === editors.data[i].id) {\n if (i < ii - 1) {\n nextPath = editors.data[i + 1].id;\n wide.curEditor = editors.data[i + 1].editor;\n } else {\n nextPath = editors.data[0].id;\n wide.curEditor = editors.data[0].editor;\n }\n break;\n }\n }\n }\n\n editors.tabs.setCurrent(nextPath);\n var nextTId = tree.getTIdByPath(nextPath);\n wide.curNode = tree.fileTree.getNodeByTId(nextTId);\n\n tree.fileTree.selectNode(wide.curNode);\n wide.refreshOutline();\n var cursor = wide.curEditor.getCursor();\n $(\".footer .cursor\").text('| ' + (cursor.line + 1) + ':' + (cursor.ch + 1) + ' |');\n wide.curEditor.focus();\n }\n\n event.preventDefault();\n\n return false;\n }\n\n if (event.which === hotKeys.build.which) { // F5 Build\n menu.build();\n event.preventDefault();\n\n return;\n }\n\n if (event.which === hotKeys.buildRun.which) { // F6 Build & Run\n menu.run();\n event.preventDefault();\n\n return;\n }\n\n if (event.ctrlKey === hotKeys.goFile.ctrlKey\n && event.altKey === hotKeys.goFile.altKey\n && event.shiftKey === hotKeys.goFile.shiftKey\n && event.which === hotKeys.goFile.which) { // Shift-Alt-O 跳转到文件\n $(\"#dialogGoFilePrompt\").dialog(\"open\");\n }\n });\n },\n init: function () {\n this._bindFileTree();\n this._bindOutput();\n this._bindDocument();\n }\n};","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file bottomGroup.js\n *\n * @author Liyuan Li\n * @author Liang Ding\n * @version 1.1.1.1, Mar 15, 2017\n */\nvar bottomGroup = {\n tabs: undefined,\n searchTab: undefined,\n init: function () {\n this._initTabs();\n this._initFrame();\n\n $('.bottom-window-group .output').click(function () {\n $(this).focus();\n });\n\n $('.bottom-window-group .output').on('click', '.path', function (event) {\n var $path = $(this),\n tId = tree.getTIdByPath($path.data(\"path\"));\n tree.openFile(tree.fileTree.getNodeByTId(tId),\n CodeMirror.Pos($path.data(\"line\") - 1, $path.data(\"column\") - 1));\n event.preventDefault();\n return false;\n });\n },\n _initFrame: function () {\n $(\".bottom-window-group .output\").parent().mouseup(function (event) {\n event.stopPropagation();\n\n if (event.button === 0) { // 左键\n $(\".bottom-window-group .frame\").hide();\n return;\n }\n\n // event.button === 2 右键\n var left = event.screenX,\n $it = $(this);\n if ($(\".side\").css(\"left\") === \"auto\" || $(\".side\").css(\"left\") === \"0px\") {\n left = event.screenX - $(\".side\").width();\n }\n $(\".bottom-window-group .frame\").show().css({\n \"left\": left + \"px\",\n \"top\": (event.offsetY + event.target.offsetTop - $it.scrollTop() - 10) + \"px\"\n });\n return;\n });\n },\n clear: function (id) {\n $('.bottom-window-group .' + id + ' > div').text('');\n },\n resetOutput: function () {\n this.clear('output');\n bottomGroup.tabs.setCurrent(\"output\");\n windows.flowBottom();\n },\n _initTabs: function () {\n this.tabs = new Tabs({\n id: \".bottom-window-group\",\n clickAfter: function (id) {\n this._$tabsPanel.find(\".\" + id).focus();\n }\n });\n },\n fillOutput: function (data) {\n var $output = $('.bottom-window-group .output');\n\n data = data.replace(/\\r/g, '');\n data = data.replace(/\\n/g, '
    ');\n\n if (-1 !== data.indexOf(\"
    \")) {\n data = Autolinker.link(data);\n }\n\n $output.find(\"div\").html(data);\n $output.parent().scrollTop($output[0].scrollHeight);\n }\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["tabs.js","dialog.js","editors.js","notification.js","tree.js","wide.js","session.js","menu.js","windows.js","hotkeys.js","bottomGroup.js"],"names":["Tabs","obj","_$tabsPanel","$","id","_$tabs","_stack","this","STACKSIZE","_init","_it","each","data","length","splice","push","extend","prototype","_that","on","event","hasClass","setCurrent","clickAfter","parent","isRemove","removeBefore","del","stopPropagation","_hasId","$tabs","find","add","getCurrentId","$tabsPanel","append","title","content","after","stack","prevId","children","remove","i","removeAfter","path","$currentTab","removeClass","hide","addClass","show","setAfter","tId","tree","getTIdByPath","node","fileTree","getNodeByTId","selectNode","wide","curNode","ii","editors","curEditor","editor","cursor","getCursor","setCursor","focus","refreshOutline","text","line","ch","fn","dialog","version","author","dpuuid","Date","getTime","PROP_NAME","Dialog","_defaults","styleClass","background","panel","main","footer","headerMiddle","headerBg","closeIcon","closeIconHover","_attach","target","settings","uuid","inst","_newInst","replace","_getInst","err","_destroyDialog","removeData","prependTo","unwrap","removeAttr","_getDefaults","windowH","window","height","windowW","width","dialogH","parseInt","dialogW","okText","cancelText","footerHTML","headerHTML","hideFooter","hiddenOk","dialogHTML","bgHTML","modal","bgHeight","document","documentElement","scrollHeight","wrap","cloneObj","clone","get","bind","_close","$buttons","undefined","ok","_bindMove","keyup","keyCode","resize","afterInit","className","mousedown","_document","getElementById","x","clientX","style","left","y","clientY","top","ondragstart","onselectstart","onselect","setCapture","captureEvents","Event","MOUSEMOVE","MOUSEUP","onmousemove","positionX","positionY","onmouseup","releaseCapture","css","close","_closeDialog","_openDialog","msg","$dialog","position","afterOpen","_updateDialog","html","defaults","key","theme","styleName","options","otherArgs","Array","slice","call","arguments","shift","apply","concat","jQuery","autocompleteMutex","tabs","getEditorByPath","click","closeOther","currentIndex","firstIndex","_removeAllMarker","removeIndex","_initClose","ZeroClipboard","button","screenX","attr","init","config","label","tip","fileName","file","confirm_save","fmt","doc","isClean","nextId","menu","disabled","cancelSelectedNode","_initCodeMirrorHotKeys","openStartPage","dateFormat","time","date","dateObj","M+","getMonth","d+","getDate","h+","getHours","m+","getMinutes","s+","getSeconds","q+","Math","floor","S","getMilliseconds","test","RegExp","$1","getFullYear","substr","k","start_page","load","context","wideSessionId","ajax","url","type","dataType","jsonp","success","textStatus","articles","listHTML","community","article","articlePermalink","articleTitle","articleCreateTime","ret","getCurrentPath","currentPath","CodeMirror","registerHelper","word","cur","curLine","getLine","start","end","charAt","request","newWideRequest","code","getValue","cursorLine","cursorCh","autocompleteHints","state","completionActive","async","JSON","stringify","autocompleteArray","displayText","name","substring","console","warn","markClean","setTimeout","list","from","Pos","to","commands","autocompleteAfterDot","cm","mode","getMode","Pass","token","getTokenAt","showHint","hint","go","completeSingle","autocompleteAnyWord","auto","gotoLine","doNothing","exprInfo","result","succ","cursorCoords","copyLinesDown","selectoion","listSelections","anchor","head","max","replaceToLine","replaceRange","offset","setSelection","copyLinesUp","moveLinesUp","moveLinesDown","lastLine","jumpToDecl","openFile","findUsages","appendSearch","selectIdentifier","findWordAt","extendSelection","searcHTML","toLowerCase","contents","lowerCaseContents","matches","split","startIndex","endIndex","j","keyWord","search_no_match","$search","find_usages","search_text","bottomGroup","searchTab","$it","half","getScrollInfo","clientHeight","defaultTextHeight","scrollTo","windows","flowBottom","newEditor","iconSkin","undisabled","textArea","value","fromTextArea","lineNumbers","autofocus","autoCloseBrackets","matchBrackets","highlightSelectionMatches","showToken","rulers","color","column","lineStyle","styleActiveLine","editorTheme","tabSize","editorTabSize","indentUnit","indentWithTabs","foldGutter","cursorHeight","readOnly","isGOAPI","profile","extraKeys","Ctrl-\\",".","Ctrl-/","Ctrl-I","Ctrl-L","Ctrl-E","Ctrl-D","Ctrl-B","Ctrl-S","saveFile","Shift-Ctrl-S","saveAllFiles","Shift-Alt-F","Alt-F7","Shift-Alt-Enter","isMaxEditor","restoreEditor","maxEditor","Shift-Ctrl-Up","Shift-Ctrl-Down","Shift-Alt-Up","Shift-Alt-Down","Shift-Alt-J","emmetCodeMirror","$span","evt","altKey","ctrlKey","shiftKey","which","autocomplete","random","setSize","setOption","keymap","notification","_initWS","notificationWS","ReconnectingWebSocket","channel","onopen","log","onmessage","e","parse","$notification","notificationHTML","cmd","severity","message","onclose","onerror","getCurrentNodeLastNode","returnNode","open","getNextShowNode","level","getParentNode","getNextNode","isBottomNode","isLastNode","nodes","transformToArray","getNodes","getOpenPaths","paths","getAllParents","parents","parentTId","isParents","parentPath","parentNode","isDir","indexOf","newFile","it","newDir","removeIt","removable","rename","export","isSucc","crossCompile","platform","decompress","dir","reAsyncChildNodes","refresh","gitClone","import","fileupload","formData","done","fail","$dirRMenu","$fileRMenu","setting","view","showTitle","selectedMulti","enable","autoParam","callback","onDblClick","treeId","treeNode","onRightClick","creatable","display","onClick","clickFlag","zTree","session","restore","_initSearch","_initRename","tempCursor","findModeByFileName","mime","error","$okBtn","closest","prop","trim","val","search","cancel","extension","select","oldPath","newPath","lastIndexOf","curProcessId","outlineHTML","decls","maxj","Ch","Line","Name","dblclick","_initDialog","confirm","create_file","create","fileType","create_dir","goto_file","$list","hotkeys","bindList","$selected","goFileHTML","icoSkin","getClassBySuffix","goto_line","git_clone","repository","outputWS","goLintFound","nextCmd","executable","fillOutput","output","pid","build_n_run","lints","files","lint","lineNo","signal","_initFooter","unbind","subMenu","onbeforeunload","oncontextmenu","_save","getOption","gofmt","beforeSend","resetOutput","stop","run","scrollInfo","setValue","formatted","html_beautify","js_beautify","css_beautify","suffix","ready","getLayoutState","paneState","isClosed","size","setInterval","filse","currentId","currentFile","layout","side","outerLayout","west","sideRight","innerLayout","east","bottom","south","latestSessionContent","nodesToOpen","jj","isOpen","l","expandNode","kk","m","mm","n","nn","c","sessionWS","addNodes","isParent","removeNode","_initPreference","_initAbout","_initShare","hover","pic","urls","email","twitterShare","encodeURIComponent","twitter","facebook","googleplus","weibo","tencent","about","wideVersion","uptodate","new_version_available","colon","wideDownload","mouseover","openPreference","closeAllFiles","exit","location","href","openAbout","goget","goinstall","govet","build","isChange","emptys","emptysTip","tabIndex","no_empty","preference","$dialogPreference","$fontFamily","$fontSize","$goFmt","$GoBuildArgsForLinux","$GoBuildArgsForWindows","$GoBuildArgsForDarwin","$workspace","$password","$email","$locale","$theme","$editorFontFamily","$editorFontSize","$editorLineHeight","$editorTheme","$editorTabSize","$keymap","fontFamily","fontSize","goFmt","GoBuildArgsForLinux","GoBuildArgsForWindows","GoBuildArgsForDarwin","workspace","password","locale","editorFontFamily","editorFontSize","editorLineHeight","reload","jqXHR","staticServer","north__paneSelector","center__paneSelector","south__paneSelector","north__size","south__size","spacing_open","north__spacing_open","south__spacing_open","fxSpeed_open","fxSpeed_close","fxSettings_close","easing","fxSettings_open","paneSelector","togglerLength_open","togglerLength_closed","togglerAlign_closed","slideTrigger_open","spacing_closed","minSize","togglerClass","togglerTip_open","min","togglerTip_closed","restore_side","resizerTip","initClosed","center","restore_outline","restore_bottom","ondrag_end","pane","refreshEditor","onresize_end","onclose_end","onopen_end","onshow_end","addCloseBtn","maxSide","maxSideRight","maxBottom","toggleEditor","restoreBottom","restoreSide","restoreSideRight","sizePane","max_editor","editorDatas","slideOpen","defaultKeyMap","goEditor","fun","goFileTree","goOutline","goOutput","goSearch","goNotification","clearWindow","changeEditor","closeCurEditor","goFile","buildRun","$source","enterFun","keydown","index","count","scrollTop","offsetTop","_bindOutput","hotKeys","clear","preventDefault","_bindFileTree","isFirstNode","getPreNode","preNode","nextShowNode","_bindDocument","activeElement","nextPath","nextTId","_initTabs","_initFrame","$path","mouseup","offsetY","$output","Autolinker","link"],"mappings":"AAsBA,GAAIA,MAAO,SAAUC,GACjBA,EAAIC,YAAcC,EAAEF,EAAIG,GAAK,kBAC7BH,EAAII,OAASF,EAAEF,EAAIG,GAAK,YACxBH,EAAIK,UAEJC,KAAKN,IAAMA,EACXM,KAAKN,IAAIO,UAAY,GAErBD,KAAKE,MAAMR,EAGX,IAAIS,GAAMH,IACVJ,GAAEF,EAAIG,GAAK,kBAAkBO,KAAK,WAC9B,GAAIP,GAAKD,EAAEI,MAAMK,KAAK,QAClBX,GAAIK,OAAOO,SAAWH,EAAIT,IAAIO,WAC9BP,EAAIK,OAAOQ,OAAO,EAAG,GAErBb,EAAIK,OAAOL,EAAIK,OAAOO,OAAS,KAAOT,GACtCM,EAAIT,IAAIK,OAAOS,KAAKX,KAMhCD,GAAEa,OAAOhB,KAAKiB,WACVR,MAAO,SAAUR,GACb,GAAIiB,GAAQX,IAEZN,GAAII,OAAOc,GAAG,QAAS,MAAO,SAAUC,GACpC,GAAIjB,EAAEI,MAAMc,SAAS,WACjB,OAAO,CAGX,IAAIjB,GAAKD,EAAEI,MAA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7hB,GAClB,GAAIwvB,GAAUjwB,EAAE,+BAEhBS,GAAOA,EAAKsF,QAAQ,MAAO,IAC3BtF,EAAOA,EAAKsF,QAAQ,MAAO,SAEvB,KAAOtF,EAAKqc,QAAQ,WACpBrc,EAAOyvB,WAAWC,KAAK1vB,IAG3BwvB,EAAQruB,KAAK,OAAOgJ,KAAKnK,GACzBwvB,EAAQ5uB,SAASwtB,UAAUoB,EAAQ,GAAGroB","file":"wide.min.js","sourcesContent":["/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file tabs.js\n *\n * @author Liyuan Li\n * @version 1.0.0.1, Dec 8, 2015\n */\nvar Tabs = function (obj) {\n obj._$tabsPanel = $(obj.id + \" > .tabs-panel\");\n obj._$tabs = $(obj.id + \" > .tabs\");\n obj._stack = [];\n\n this.obj = obj;\n this.obj.STACKSIZE = 64;\n\n this._init(obj);\n\n // DOM 元素存在时,应顺序入栈\n var _it = this;\n $(obj.id + \" > .tabs > div\").each(function () {\n var id = $(this).data(\"index\");\n if (obj._stack.length === _it.obj.STACKSIZE) {\n obj._stack.splice(0, 1);\n }\n if (obj._stack[obj._stack.length - 1] !== id) {\n _it.obj._stack.push(id);\n }\n });\n\n};\n\n$.extend(Tabs.prototype, {\n _init: function (obj) {\n var _that = this;\n\n obj._$tabs.on(\"click\", \"div\", function (event) {\n if ($(this).hasClass('current')) {\n return false;\n }\n\n var id = $(this).data(\"index\");\n _that.setCurrent(id);\n if (typeof (obj.clickAfter) === \"function\") {\n obj.clickAfter(id);\n }\n });\n\n obj._$tabs.on(\"click\", \".ico-close\", function (event) {\n var id = $(this).parent().data(\"index\"),\n isRemove = true;\n\n if (typeof obj.removeBefore === 'function') {\n isRemove = obj.removeBefore(id);\n }\n\n if (isRemove) {\n _that.del(id);\n }\n event.stopPropagation();\n });\n },\n _hasId: function (id) {\n var $tabs = this.obj._$tabs;\n if ($tabs.find('div[data-index=\"' + id + '\"]').length === 0) {\n return false;\n }\n return true;\n },\n add: function (data) {\n // 添加当前 tab\n if (this.getCurrentId() === data.id) {\n return false;\n }\n\n // 当前 tab 已经存在\n if (this._hasId(data.id)) {\n this.setCurrent(data.id);\n return false;\n }\n\n var $tabsPanel = this.obj._$tabsPanel,\n $tabs = this.obj._$tabs;\n\n $tabs.append('
    '\n + data.title + '
    ');\n $tabsPanel.append('
    ' + data.content\n + '
    ');\n\n this.setCurrent(data.id);\n\n if (typeof data.after === 'function') {\n data.after();\n }\n },\n del: function (id) {\n var $tabsPanel = this.obj._$tabsPanel,\n $tabs = this.obj._$tabs,\n stack = this.obj._stack,\n prevId = null;\n\n $tabs.children(\"div[data-index='\" + id + \"']\").remove();\n $tabsPanel.children(\"div[data-index='\" + id + \"']\").remove();\n\n // 移除堆栈中该 id\n for (var i = 0; i < stack.length; i++) {\n if (id === stack[i]) {\n stack.splice(i, 1);\n i--;\n }\n }\n\n prevId = stack[stack.length - 1];\n\n if (typeof this.obj.removeAfter === 'function') {\n this.obj.removeAfter(id, prevId);\n }\n\n this.setCurrent(prevId);\n },\n getCurrentId: function () {\n var $tabs = this.obj._$tabs;\n return $tabs.children(\".current\").data(\"index\");\n },\n setCurrent: function (path) {\n if (!path) {\n return false;\n }\n\n var $tabsPanel = this.obj._$tabsPanel,\n $tabs = this.obj._$tabs;\n\n var $currentTab = $tabs.children(\".current\");\n if ($currentTab.data(\"index\") === path) {\n return false;\n }\n\n // tab 顺序入栈,如栈满则清除\n var stack = this.obj._stack;\n if (stack.length === this.obj.STACKSIZE) {\n stack.splice(0, 1);\n }\n if (stack[stack.length - 1] !== path) {\n this.obj._stack.push(path);\n }\n\n $tabs.children(\"div\").removeClass(\"current\");\n $tabsPanel.children(\"div\").hide();\n\n $tabs.children('div[data-index=\"' + path + '\"]').addClass(\"current\");\n $tabsPanel.children('div[data-index=\"' + path + '\"]').show();\n\n if (typeof this.obj.setAfter === 'function') {\n this.obj.setAfter();\n }\n\n var id = this.getCurrentId();\n if (\"startPage\" === id) {\n return;\n }\n\n // set tree node selected\n var tId = tree.getTIdByPath(id);\n var node = tree.fileTree.getNodeByTId(tId);\n tree.fileTree.selectNode(node);\n wide.curNode = node;\n\n for (var i = 0, ii = editors.data.length; i < ii; i++) {\n if (editors.data[i].id === id) {\n wide.curEditor = editors.data[i].editor;\n break;\n }\n }\n\n if (wide.curEditor) {\n var cursor = wide.curEditor.getCursor();\n wide.curEditor.setCursor(cursor);\n wide.curEditor.focus();\n wide.refreshOutline();\n\n $(\".footer .cursor\").text('| ' + (cursor.line + 1) + ':' + (cursor.ch + 1) + ' |');\n }\n }\n});","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file dialog.js\n *\n * @author Liyuan Li\n * @version 1.0.0.1, Dec 8, 2015\n */\n(function ($) {\n $.fn.extend({\n dialog: {\n version: \"0.0.1.7\",\n author: \"lly219@gmail.com\"\n }\n });\n\n var dpuuid = new Date().getTime();\n var PROP_NAME = 'dialog';\n\n var Dialog = function () {\n this._defaults = {\n \"styleClass\": {\n \"background\": \"dialog-background\",\n \"panel\": \"dialog-panel\",\n \"main\": \"dialog-main\",\n \"footer\": \"dialog-footer\",\n \"headerMiddle\": \"dialog-header-middle\",\n \"headerBg\": \"dialog-header-bg\",\n \"closeIcon\": \"dialog-close-icon\",\n \"closeIconHover\": \"dialog-close-icon-hover\",\n \"title\": \"dialog-title\"\n }\n };\n };\n\n $.extend(Dialog.prototype, {\n _attach: function (target, settings) {\n if (!target.id) {\n this.uuid++;\n target.id = 'dp' + this.uuid;\n }\n var inst = this._newInst($(target));\n\n inst.settings = $.extend({}, settings || {});\n $.data(target, PROP_NAME, inst);\n this._init(target);\n },\n /* Create a new instance object. */\n _newInst: function (target) {\n // escape jQuery meta chars\n var id = target[0].id.replace(/([^A-Za-z0-9_])/g, '\\\\\\\\$1');\n return {\n id: id\n };\n },\n _getInst: function (target) {\n try {\n return $.data(target, PROP_NAME);\n } catch (err) {\n throw 'Missing instance data for this dialog';\n }\n },\n _destroyDialog: function (target) {\n var inst = $.dialog._getInst(target);\n var id = inst.id;\n $.removeData(target, PROP_NAME);\n\n $(target).prependTo(\"#\" + id + \"Wrap\").unwrap();\n $(target).removeAttr(\"style\");\n\n var styleClass = this._getDefaults($.dialog._defaults, inst.settings, \"styleClass\");\n $(\".\" + styleClass.background).remove();\n $(\"#\" + id + \"Dialog\").remove();\n },\n _init: function (target) {\n var inst = this._getInst(target);\n var id = inst.id,\n settings = inst.settings;\n var windowH = $(window).height(),\n windowW = $(window).width();\n var styleClass = this._getDefaults($.dialog._defaults, settings, \"styleClass\"),\n dialogH = settings.height ? settings.height : parseInt(windowH * 0.6),\n dialogW = settings.width ? settings.width : parseInt(windowW * 0.6);\n\n // get settings or default value.\n settings.title = settings.title ? settings.title : \"\";\n settings.okText = settings.okText ? settings.okText : \"Ok\";\n settings.cancelText = settings.cancelText ? settings.cancelText : \"Cancel\";\n\n // build HTML.\n var footerHTML = \"\",\n headerHTML = \"
    \"\n + settings.title + \"
    \";\n\n // Sets footerHTML.\n if (!settings.hideFooter) {\n if (!settings.hiddenOk) {\n footerHTML = \"\";\n }\n footerHTML += \"\";\n }\n\n var dialogHTML = \"
    \" + headerHTML\n + \"
    \"\n + footerHTML + \"
    \";\n\n var bgHTML = \"\";\n if (settings.modal && $(\".\" + styleClass.background).length === 0) {\n var bgHeight = windowH < document.documentElement.scrollHeight\n ? document.documentElement.scrollHeight : windowH;\n bgHTML = \"
    \";\n }\n\n // Package dialog.\n $(\"#\" + id).wrap(\"
    \");\n var cloneObj = $(target).clone(true);\n $(target).remove();\n $('body').append(bgHTML + dialogHTML);\n $($(\"#\" + id + \"Dialog .\" + styleClass.main + \" div\").get(0)).append(cloneObj);\n $(cloneObj).show();\n\n // Bind event.\n $(\"#\" + id + \"Dialog .\" + styleClass.closeIcon).bind(\"click\", function () {\n $.dialog._close(id, settings);\n });\n\n var $buttons = $(\"#\" + id + \"Dialog .\" + styleClass.footer + \" button\");\n $($buttons.get(1)).bind(\"click\", function () {\n $.dialog._close(id, settings);\n });\n\n $($buttons.get(0)).bind(\"click\", function () {\n if (settings.ok === undefined || settings.ok()) {\n $.dialog._close(id, settings);\n }\n });\n\n this._bindMove(id, styleClass.headerBg, dialogH, dialogW);\n\n // esc exit\n $(window).keyup(function (event) {\n if (event.keyCode === 27) {\n $.dialog._close(id, settings);\n }\n });\n\n $(window).resize(function () {\n var height = $(\"body\").height() > $(window).height() ? $(\"body\").height() : $(window).height();\n $(\".dialog-background\").height(height);\n });\n\n if (typeof settings.afterInit === \"function\") {\n settings.afterInit();\n }\n },\n _bindMove: function (id, className) {\n $(\"#\" + id + \"Dialog .\" + className).mousedown(function (event) {\n var _document = document;\n if (!event) {\n event = window.event;\n }\n var dialog = document.getElementById(id + \"Dialog\");\n var x = event.clientX - parseInt(dialog.style.left),\n y = event.clientY - parseInt(dialog.style.top);\n _document.ondragstart = \"return false;\";\n _document.onselectstart = \"return false;\";\n _document.onselect = \"document.selection.empty();\";\n\n if (this.setCapture) {\n this.setCapture();\n } else if (window.captureEvents) {\n window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP);\n }\n\n _document.onmousemove = function (event) {\n if (!event) {\n event = window.event;\n }\n var positionX = event.clientX - x,\n positionY = event.clientY - y;\n if (positionX < 0) {\n positionX = 0;\n }\n if (positionX > $(window).width() - $(dialog).width()) {\n positionX = $(window).width() - $(dialog).width();\n }\n if (positionY > $(window).height() - $(dialog).height()) {\n positionY = $(window).height() - $(dialog).height();\n }\n if (positionY < 0) {\n positionY = 0;\n }\n dialog.style.left = positionX + \"px\";\n dialog.style.top = positionY + \"px\";\n };\n\n _document.onmouseup = function () {\n if (this.releaseCapture) {\n this.releaseCapture();\n } else if (window.captureEvents) {\n window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP);\n }\n _document.onmousemove = null;\n _document.onmouseup = null;\n _document.ondragstart = null;\n _document.onselectstart = null;\n _document.onselect = null;\n };\n });\n },\n _close: function (id, settings) {\n if ($(\"#\" + id + \"Dialog\").css(\"display\") === \"none\") {\n return;\n }\n if (settings.close === undefined || settings.close()) {\n $(\"#\" + id + \"Dialog\").hide();\n if (settings.modal) {\n var styleClass = this._getDefaults($.dialog._defaults, settings, \"styleClass\");\n $(\".\" + styleClass.background).hide();\n }\n }\n },\n _closeDialog: function (target) {\n var inst = this._getInst(target);\n var id = inst.id,\n settings = inst.settings;\n $.dialog._close(id, settings);\n },\n _openDialog: function (target, msg) {\n var inst = this._getInst(target);\n var id = inst.id,\n settings = inst.settings,\n top = \"\", left = \"\",\n $dialog = $(\"#\" + id + \"Dialog\"),\n windowH = $(window).height(),\n windowW = $(window).width(),\n dialogH = settings.height ? settings.height : parseInt(windowH * 0.6),\n dialogW = settings.width ? settings.width : parseInt(windowW * 0.6);\n\n // Sets position.\n if (settings.position) {\n top = settings.position.top;\n left = settings.position.left;\n } else {\n // 20(footer) + 23(header)\n top = parseInt((windowH - dialogH - 43) / 2);\n if (top < 0) {\n top = 0;\n }\n left = parseInt((windowW - dialogW) / 2);\n }\n $dialog.css({\n \"top\": top + \"px\",\n \"left\": left + \"px\"\n }).show();\n\n if (settings.modal) {\n var styleClass = this._getDefaults($.dialog._defaults, settings, \"styleClass\");\n $(\".\" + styleClass.background).show();\n }\n\n if (typeof settings.afterOpen === \"function\") {\n settings.afterOpen(msg);\n }\n\n $(\"#\" + id + \"Dialog .dialog-footer button:eq(0)\").focus();\n },\n _updateDialog: function (target, data) {\n var inst = this._getInst(target);\n var id = inst.id,\n settings = inst.settings;\n var styleClass = this._getDefaults($.dialog._defaults, settings, \"styleClass\");\n $.extend(settings, data);\n var $dialog = $(\"#\" + id + \"Dialog\");\n if (data.position) {\n $dialog.css({\n \"top\": data.position.top,\n \"left\": data.position.left\n });\n }\n\n if (data.width) {\n $dialog.width(data.width + 26);\n $dialog.find(\".\" + styleClass.main + \" div\")[0].style.width = data.width + \"px\";\n $dialog.find(\".\" + styleClass.headerBg).width(data.width + 18);\n }\n\n if (data.height) {\n $dialog.find(\".\" + styleClass.main + \" div\")[0].style.height = data.height + \"px\";\n }\n\n if (data.title) {\n $dialog.find(\".\" + styleClass.title).html(data.title);\n }\n\n if (data.modal !== undefined) {\n if (data.modal) {\n $(\".\" + styleClass.background).show();\n } else {\n $(\".\" + styleClass.background).hide();\n }\n }\n\n if (data.hideFooter !== undefined) {\n if (data.hideFooter) {\n $dialog.find(\".\" + styleClass.footer).hide();\n } else {\n $dialog.find(\".\" + styleClass.footer).show();\n }\n }\n\n },\n _getDefaults: function (defaults, settings, key) {\n if (key === \"styleClass\") {\n if (settings.theme === \"default\" || settings.theme === undefined) {\n return defaults.styleClass;\n }\n settings.styleClass = {};\n for (var styleName in defaults[key]) {\n settings.styleClass[styleName] = settings.theme + \"-\" + defaults.styleClass[styleName];\n }\n } else if (key === \"height\" || key === \"width\") {\n if (settings[key] === null || settings[key] === undefined) {\n return \"auto\";\n } else {\n return settings[key] + \"px\";\n }\n } else {\n if (settings[key] === null || settings[key] === undefined) {\n return defaults[key];\n }\n }\n return settings[key];\n }\n });\n\n $.fn.dialog = function (options) {\n var otherArgs = Array.prototype.slice.call(arguments);\n\n if (typeof options === 'string') {\n otherArgs.shift();\n return $.dialog['_' + options + 'Dialog'].apply($.dialog, [this[0]].concat(otherArgs));\n }\n return this.each(function () {\n $.dialog._attach(this, options);\n });\n };\n\n $.dialog = new Dialog();\n\n // Add another global to avoid noConflict issues with inline event handlers\n window['DP_jQuery_' + dpuuid] = $;\n})(jQuery);","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file editor.js\n *\n * @author Liyuan Li\n * @author Liang Ding\n * @version 1.1.1.0, Jan 12, 2016\n */\nvar editors = {\n autocompleteMutex: false,\n data: [],\n tabs: {},\n getEditorByPath: function (path) {\n for (var i = 0, ii = editors.data.length; i < ii; i++) {\n if (editors.data[i].editor.options.path === path) {\n return editors.data[i].editor;\n }\n }\n },\n close: function () {\n $('.edit-panel .tabs > div[data-index=\"' + $('.edit-panel .frame').data('index') + ']').find('.ico-close').click();\n },\n closeOther: function () {\n var currentIndex = $(\".edit-panel .frame\").data(\"index\");\n\n // 设置全部关闭标识\n var removeData = [];\n $(\".edit-panel .tabs > div\").each(function (i) {\n if (currentIndex !== $(this).data(\"index\")) {\n removeData.push($(this).data(\"index\"));\n }\n });\n if (removeData.length === 0) {\n return false;\n }\n var firstIndex = removeData.splice(0, 1);\n $(\"#dialogCloseEditor\").data(\"removeData\", removeData);\n // 开始关闭\n $('.edit-panel .tabs > div[data-index=\"' + firstIndex + '\"]').find(\".ico-close\").click();\n },\n _removeAllMarker: function () {\n var removeData = $(\"#dialogCloseEditor\").data(\"removeData\");\n if (removeData && removeData.length > 0) {\n var removeIndex = removeData.splice(0, 1);\n $(\"#dialogCloseEditor\").data(\"removeData\", removeData);\n $('.edit-panel .tabs > div[data-index=\"' + removeIndex + '\"] .ico-close').click();\n }\n if (wide.curEditor) {\n wide.curEditor.focus();\n }\n },\n _initClose: function () {\n new ZeroClipboard($(\"#copyFilePath\"));\n\n // 关闭、关闭其他、关闭所有\n $(\".edit-panel\").on(\"mouseup\", '.tabs > div', function (event) {\n event.stopPropagation();\n\n if (event.button === 0) { // 左键\n $(\".edit-panel .frame\").hide();\n return false;\n }\n\n // event.button === 2 右键\n var left = event.screenX;\n if ($(\".side\").css(\"left\") === \"auto\" || $(\".side\").css(\"left\") === \"0px\") {\n left = event.screenX - $(\".side\").width();\n }\n $(\".edit-panel .frame\").show().css({\n \"left\": left + \"px\",\n \"top\": \"21px\"\n }).data('index', $(this).data(\"index\"));\n\n $(\"#copyFilePath\").attr('data-clipboard-text', $(this).find(\"span:eq(0)\").attr(\"title\"));\n return false;\n });\n },\n init: function () {\n $(\"#dialogCloseEditor\").dialog({\n \"modal\": true,\n \"height\": 90,\n \"width\": 260,\n \"title\": config.label.tip,\n \"hideFooter\": true,\n \"afterOpen\": function (fileName) {\n $(\"#dialogCloseEditor > div:eq(0)\").html(config.label.file\n + ' ' + fileName + '. ' + config.label.confirm_save + '?');\n $(\"#dialogCloseEditor button:eq(0)\").focus();\n },\n \"afterInit\": function () {\n $(\"#dialogCloseEditor button.save\").click(function () {\n var i = $(\"#dialogCloseEditor\").data(\"index\");\n wide.fmt(editors.data[i].id, editors.data[i].editor);\n editors.tabs.del(editors.data[i].id);\n $(\"#dialogCloseEditor\").dialog(\"close\");\n editors._removeAllMarker();\n });\n\n $(\"#dialogCloseEditor button.discard\").click(function () {\n var i = $(\"#dialogCloseEditor\").data(\"index\");\n editors.tabs.del(editors.data[i].id);\n $(\"#dialogCloseEditor\").dialog(\"close\");\n editors._removeAllMarker();\n });\n\n $(\"#dialogCloseEditor button.cancel\").click(function (event) {\n $(\"#dialogCloseEditor\").dialog(\"close\");\n editors._removeAllMarker();\n });\n }\n });\n\n editors.tabs = new Tabs({\n id: \".edit-panel\",\n setAfter: function () {\n if (wide.curEditor) {\n wide.curEditor.focus();\n }\n },\n clickAfter: function (id) {\n if (id === 'startPage') {\n wide.curEditor = undefined;\n $(\".footer .cursor\").text('');\n wide.refreshOutline();\n \n return false;\n }\n },\n removeBefore: function (id) {\n if (id === 'startPage') { // 当前关闭的 tab 是起始页\n editors._removeAllMarker();\n return true;\n }\n\n for (var i = 0, ii = editors.data.length; i < ii; i++) {\n if (editors.data[i].id === id) {\n if (editors.data[i].editor.doc.isClean()) {\n editors._removeAllMarker();\n return true;\n } else {\n $(\"#dialogCloseEditor\").dialog(\"open\", $('.edit-panel .tabs > div[data-index=\"'\n + editors.data[i].id + '\"] > span:eq(0)').text());\n $(\"#dialogCloseEditor\").data(\"index\", i);\n return false;\n }\n\n break;\n }\n }\n },\n removeAfter: function (id, nextId) {\n if ($(\".edit-panel .tabs > div\").length === 0) {\n // 全部 tab 都关闭时才 disables 菜单中“全部关闭”的按钮\n menu.disabled(['close-all']);\n }\n\n // 移除编辑器\n for (var i = 0, ii = editors.data.length; i < ii; i++) {\n if (editors.data[i].id === id) {\n editors.data.splice(i, 1);\n break;\n }\n }\n\n if (editors.data.length === 0) { // 起始页可能存在,所以用编辑器数据判断\n menu.disabled(['save-all', 'build', 'run', 'go-test', 'go-vet', 'go-get', 'go-install',\n 'find', 'find-next', 'find-previous', 'replace', 'replace-all',\n 'format', 'autocomplete', 'jump-to-decl', 'expr-info', 'find-usages', 'toggle-comment',\n 'edit']);\n\n // remove selected tree node\n tree.fileTree.cancelSelectedNode();\n wide.curNode = undefined;\n wide.curEditor = undefined;\n wide.refreshOutline();\n $(\".footer .cursor\").text('');\n return false;\n }\n\n if (!nextId) {\n // 编辑器区域不存在打开的 Tab\n // remove selected tree node\n tree.fileTree.cancelSelectedNode();\n wide.curNode = undefined;\n wide.curEditor = undefined;\n wide.refreshOutline();\n $(\".footer .cursor\").text('');\n return false;\n }\n\n if (nextId === editors.tabs.getCurrentId()) {\n // 关闭的不是当前编辑器\n return false;\n }\n }\n });\n\n this._initCodeMirrorHotKeys();\n this.openStartPage();\n this._initClose();\n },\n openStartPage: function () {\n wide.curEditor = undefined;\n wide.refreshOutline();\n $(\".footer .cursor\").text('');\n\n var dateFormat = function (time, fmt) {\n var date = new Date(time);\n var dateObj = {\n \"M+\": date.getMonth() + 1, //月份 \n \"d+\": date.getDate(), //日 \n \"h+\": date.getHours(), //小时 \n \"m+\": date.getMinutes(), //分 \n \"s+\": date.getSeconds(), //秒 \n \"q+\": Math.floor((date.getMonth() + 3) / 3), //季度 \n \"S\": date.getMilliseconds() //毫秒 \n };\n if (/(y+)/.test(fmt))\n fmt = fmt.replace(RegExp.$1, (date.getFullYear() + \"\").substr(4 - RegExp.$1.length));\n for (var k in dateObj)\n if (new RegExp(\"(\" + k + \")\").test(fmt)) {\n fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1)\n ? (dateObj[k]) : ((\"00\" + dateObj[k]).substr((\"\" + dateObj[k]).length)));\n }\n return fmt;\n };\n\n editors.tabs.add({\n id: \"startPage\",\n title: ' ' + config.label.start_page + '',\n content: '
    ',\n after: function () {\n $(\"#startPage\").load(config.context + '/start?sid=' + config.wideSessionId);\n $.ajax({\n url: \"https://hacpai.com/apis/articles?tags=wide,golang&p=1&size=20\",\n type: \"GET\",\n dataType: \"jsonp\",\n jsonp: \"callback\",\n success: function (data, textStatus) {\n var articles = data.articles;\n if (0 === articles.length) {\n return;\n }\n\n // 按 size = 20 取,但只保留最多 9 篇\n var length = articles.length;\n if (length > 9) {\n length = 9;\n }\n\n var listHTML = \"\");\n }\n });\n }\n });\n },\n getCurrentId: function () {\n var ret = editors.tabs.getCurrentId();\n if (ret === 'startPage') {\n ret = null;\n }\n \n return ret;\n },\n getCurrentPath: function () {\n var currentPath = $(\".edit-panel .tabs .current span:eq(0)\").attr(\"title\");\n if (currentPath === config.label.start_page) {\n currentPath = null;\n }\n return currentPath;\n },\n _initCodeMirrorHotKeys: function () {\n CodeMirror.registerHelper(\"hint\", \"go\", function (editor) {\n editor = wide.curEditor; // 使用当前编辑器覆盖实参,因为异步调用的原因,实参不一定正确\n var word = /[\\w$]+/;\n\n var cur = editor.getCursor(), curLine = editor.getLine(cur.line);\n\n var start = cur.ch, end = start;\n while (end < curLine.length && word.test(curLine.charAt(end))) {\n ++end;\n }\n while (start && word.test(curLine.charAt(start - 1))) {\n --start;\n }\n\n var request = newWideRequest();\n request.path = $(\".edit-panel .tabs .current > span:eq(0)\").attr(\"title\");\n request.code = editor.getValue();\n request.cursorLine = cur.line;\n request.cursorCh = cur.ch;\n\n var autocompleteHints = [];\n\n if (editors.autocompleteMutex && editor.state.completionActive) {\n return;\n }\n\n editors.autocompleteMutex = true;\n\n $.ajax({\n async: false, // 同步执行\n type: 'POST',\n url: config.context + '/autocomplete',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (data) {\n var autocompleteArray = data[1];\n\n if (autocompleteArray) {\n for (var i = 0; i < autocompleteArray.length; i++) {\n var displayText = '',\n text = autocompleteArray[i].name;\n\n switch (autocompleteArray[i].class) {\n case \"type\":\n displayText = ''// + autocompleteArray[i].class \n + '' + autocompleteArray[i].name + ' '\n + autocompleteArray[i].type + '';\n break;\n case \"const\":\n displayText = ''// + autocompleteArray[i].class \n + '' + autocompleteArray[i].name + ' '\n + autocompleteArray[i].type + '';\n break;\n case \"var\":\n displayText = ''// + autocompleteArray[i].class \n + '' + autocompleteArray[i].name + ' '\n + autocompleteArray[i].type + '';\n break;\n case \"package\":\n displayText = ''// + autocompleteArray[i].class \n + '' + autocompleteArray[i].name + ' '\n + autocompleteArray[i].type + '';\n break;\n case \"func\":\n displayText = ''// + autocompleteArray[i].class \n + '' + autocompleteArray[i].name + ''\n + autocompleteArray[i].type.substring(4) + '';\n text += '()';\n break;\n default:\n console.warn(\"Can't handle autocomplete [\" + autocompleteArray[i].class + \"]\");\n break;\n }\n\n autocompleteHints[i] = {\n displayText: displayText,\n text: text\n };\n }\n }\n\n editor.doc.markClean();\n $(\".edit-panel .tabs .current > span:eq(0)\").removeClass(\"changed\");\n }\n });\n\n setTimeout(function () {\n editors.autocompleteMutex = false;\n }, 20);\n\n return {list: autocompleteHints, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)};\n });\n\n CodeMirror.commands.autocompleteAfterDot = function (cm) {\n var mode = cm.getMode();\n if (mode && \"go\" !== mode.name) {\n return CodeMirror.Pass;\n }\n\n var token = cm.getTokenAt(cm.getCursor());\n\n if (\"comment\" === token.type || \"string\" === token.type) {\n return CodeMirror.Pass;\n }\n\n setTimeout(function () {\n if (!cm.state.completionActive) {\n cm.showHint({hint: CodeMirror.hint.go, completeSingle: false});\n }\n }, 50);\n\n return CodeMirror.Pass;\n };\n\n CodeMirror.commands.autocompleteAnyWord = function (cm) {\n cm.showHint({hint: CodeMirror.hint.auto});\n };\n\n CodeMirror.commands.gotoLine = function (cm) {\n $(\"#dialogGoLinePrompt\").dialog(\"open\");\n };\n\n // 用于覆盖 cm 默认绑定的某些快捷键功能.\n CodeMirror.commands.doNothing = function (cm) {\n };\n\n CodeMirror.commands.exprInfo = function (cm) {\n var cur = wide.curEditor.getCursor();\n\n var request = newWideRequest();\n request.path = $(\".edit-panel .tabs .current > span:eq(0)\").attr(\"title\");\n request.code = wide.curEditor.getValue();\n request.cursorLine = cur.line;\n request.cursorCh = cur.ch;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/exprinfo',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n return;\n }\n \n var position = wide.curEditor.cursorCoords();\n $(\"body\").append('
    ' + result.data + '
    ');\n }\n });\n };\n\n CodeMirror.commands.copyLinesDown = function (cm) {\n var content = '',\n selectoion = cm.listSelections()[0];\n\n var from = selectoion.anchor,\n to = selectoion.head;\n if (from.line > to.line) {\n from = selectoion.head;\n to = selectoion.anchor;\n }\n\n for (var i = from.line, max = to.line; i <= max; i++) {\n if (to.ch !== 0 || i !== max) { // 下一行选中为0时,不应添加内容\n content += '\\n' + cm.getLine(i);\n }\n }\n // 下一行选中为0时,应添加到上一行末\n var replaceToLine = to.line;\n if (to.ch === 0) {\n replaceToLine = to.line - 1;\n }\n cm.replaceRange(content, CodeMirror.Pos(replaceToLine));\n\n var offset = replaceToLine - from.line + 1;\n cm.setSelection(CodeMirror.Pos(from.line + offset, from.ch),\n CodeMirror.Pos(to.line + offset, to.ch));\n };\n\n CodeMirror.commands.copyLinesUp = function (cm) {\n var content = '',\n selectoion = cm.listSelections()[0];\n\n var from = selectoion.anchor,\n to = selectoion.head;\n if (from.line > to.line) {\n from = selectoion.head;\n to = selectoion.anchor;\n }\n\n for (var i = from.line, max = to.line; i <= max; i++) {\n if (to.ch !== 0 || i !== max) { // 下一行选中为0时,不应添加内容\n content += '\\n' + cm.getLine(i);\n }\n }\n\n // 下一行选中为0时,应添加到上一行末\n var replaceToLine = to.line;\n if (to.ch === 0) {\n replaceToLine = to.line - 1;\n }\n cm.replaceRange(content, CodeMirror.Pos(replaceToLine));\n\n cm.setSelection(CodeMirror.Pos(from.line, from.ch),\n CodeMirror.Pos(to.line, to.ch));\n };\n\n CodeMirror.commands.moveLinesUp = function (cm) {\n var selectoion = cm.listSelections()[0];\n\n var from = selectoion.anchor,\n to = selectoion.head;\n if (from.line > to.line) {\n from = selectoion.head;\n to = selectoion.anchor;\n }\n\n if (from.line === 0) {\n return false;\n }\n // 下一行选中为0时,应添加到上一行末\n var replaceToLine = to.line;\n if (to.ch === 0) {\n replaceToLine = to.line - 1;\n }\n cm.replaceRange('\\n' + cm.getLine(from.line - 1), CodeMirror.Pos(replaceToLine));\n if (from.line === 1) {\n // 移除第一行的换行\n cm.replaceRange('', CodeMirror.Pos(0, 0),\n CodeMirror.Pos(1, 0));\n } else {\n cm.replaceRange('', CodeMirror.Pos(from.line - 2, cm.getLine(from.line - 2).length),\n CodeMirror.Pos(from.line - 1, cm.getLine(from.line - 1).length));\n }\n\n cm.setSelection(CodeMirror.Pos(from.line - 1, from.ch),\n CodeMirror.Pos(to.line - 1, to.ch));\n };\n\n CodeMirror.commands.moveLinesDown = function (cm) {\n var selectoion = cm.listSelections()[0];\n\n var from = selectoion.anchor,\n to = selectoion.head;\n if (from.line > to.line) {\n from = selectoion.head;\n to = selectoion.anchor;\n }\n\n if (to.line === cm.lastLine()) {\n return false;\n }\n\n // 下一行选中为0时,应添加到上一行末\n var replaceToLine = to.line;\n if (to.ch === 0) {\n replaceToLine = to.line - 1;\n }\n // 把选中的下一行添加到选中区域的上一行\n if (from.line === 0) {\n cm.replaceRange(cm.getLine(replaceToLine + 1) + '\\n', CodeMirror.Pos(0, 0));\n } else {\n cm.replaceRange('\\n' + cm.getLine(replaceToLine + 1), CodeMirror.Pos(from.line - 1));\n }\n // 删除选中的下一行\n cm.replaceRange('', CodeMirror.Pos(replaceToLine + 1, cm.getLine(replaceToLine + 1).length),\n CodeMirror.Pos(replaceToLine + 2, cm.getLine(replaceToLine + 2).length));\n\n cm.setSelection(CodeMirror.Pos(from.line + 1, from.ch),\n CodeMirror.Pos(to.line + 1, to.ch));\n };\n\n CodeMirror.commands.jumpToDecl = function (cm) {\n var cur = wide.curEditor.getCursor();\n\n var request = newWideRequest();\n request.path = $(\".edit-panel .tabs .current > span:eq(0)\").attr(\"title\");\n request.code = wide.curEditor.getValue();\n request.cursorLine = cur.line;\n request.cursorCh = cur.ch;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/find/decl',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n return;\n }\n \n var data = result.data;\n\n var tId = tree.getTIdByPath(data.path);\n wide.curNode = tree.fileTree.getNodeByTId(tId);\n tree.fileTree.selectNode(wide.curNode);\n\n tree.openFile(wide.curNode, CodeMirror.Pos(data.cursorLine - 1, data.cursorCh - 1));\n }\n });\n };\n\n CodeMirror.commands.findUsages = function (cm) {\n var cur = wide.curEditor.getCursor();\n\n var request = newWideRequest();\n request.path = $(\".edit-panel .tabs .current > span:eq(0)\").attr(\"title\");\n request.code = wide.curEditor.getValue();\n request.cursorLine = cur.line;\n request.cursorCh = cur.ch;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/find/usages',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n return;\n }\n\n editors.appendSearch(result.data, 'usages', '');\n }\n });\n };\n\n CodeMirror.commands.selectIdentifier = function (cm) {\n var cur = cm.getCursor();\n var word = cm.findWordAt(cur);\n cm.extendSelection(word.anchor, word.head);\n };\n },\n appendSearch: function (data, type, key) {\n var searcHTML = '
      ',\n key = key.toLowerCase();\n\n for (var i = 0, ii = data.length; i < ii; i++) {\n var contents = '',\n lowerCaseContents = data[i].contents[0].toLowerCase(),\n matches = lowerCaseContents.split(key),\n startIndex = 0,\n endIndex = 0;\n for (var j = 0, max = matches.length; j < max; j++) {\n startIndex = endIndex + matches[j].length;\n endIndex = startIndex + key.length;\n var keyWord = data[i].contents[0].substring(startIndex, endIndex);\n if (keyWord !== '') {\n keyWord = '' + keyWord + '';\n }\n contents += data[i].contents[0].substring(startIndex - matches[j].length, startIndex) + keyWord;\n }\n\n searcHTML += '
    • '\n + contents + \"    \" + data[i].path\n + ' (' + data[i].line + ':'\n + data[i].ch + ')
    • ';\n }\n\n if (data.length === 0) {\n searcHTML += '
    • ' + config.label.search_no_match + '
    • ';\n }\n searcHTML += '
    ';\n\n var $search = $('.bottom-window-group .search'),\n title = config.label.find_usages;\n if (type === \"founds\") {\n title = config.label.search_text;\n }\n if ($search.find(\"ul\").length === 0) {\n bottomGroup.searchTab = new Tabs({\n id: \".bottom-window-group .search\",\n removeAfter: function (id, prevId) {\n if ($search.find(\"ul\").length === 1) {\n $search.find(\".tabs\").hide();\n }\n }\n });\n\n $search.on(\"click\", \"li\", function () {\n $search.find(\"li\").removeClass(\"selected\");\n $(this).addClass(\"selected\");\n });\n\n $search.on(\"dblclick\", \"li\", function () {\n var $it = $(this),\n tId = tree.getTIdByPath($it.attr(\"title\"));\n tree.openFile(tree.fileTree.getNodeByTId(tId));\n tree.fileTree.selectNode(wide.curNode);\n\n var line = $it.find(\".position\").data(\"line\") - 1;\n var cursor = CodeMirror.Pos(line, $it.find(\".position\").data(\"ch\") - 1);\n\n\n var editor = wide.curEditor;\n editor.setCursor(cursor);\n\n var half = Math.floor(editor.getScrollInfo().clientHeight / editor.defaultTextHeight() / 2);\n var cursorCoords = editor.cursorCoords({line: cursor.line - half, ch: 0}, \"local\");\n editor.scrollTo(0, cursorCoords.top);\n\n wide.curEditor.focus();\n });\n\n $search.find(\".tabs-panel > div\").append(searcHTML);\n\n $search.find(\".tabs .first\").text(title);\n } else {\n $search.find(\".tabs\").show();\n bottomGroup.searchTab.add({\n \"id\": \"search\" + (new Date()).getTime(),\n \"title\": title,\n \"content\": searcHTML\n });\n }\n\n // focus\n bottomGroup.tabs.setCurrent(\"search\");\n windows.flowBottom();\n $(\".bottom-window-group .search\").focus();\n },\n // 新建一个编辑器 Tab,如果已经存在 Tab 则切换到该 Tab.\n newEditor: function (data, cursor) {\n var id = wide.curNode.id;\n\n editors.tabs.add({\n id: id,\n title: '' + wide.curNode.name + '',\n content: ''\n });\n\n menu.undisabled(['save-all', 'close-all', 'build', 'run', 'go-test', 'go-vet', 'go-get', 'go-install',\n 'find', 'find-next', 'find-previous', 'replace', 'replace-all',\n 'format', 'autocomplete', 'jump-to-decl', 'expr-info', 'find-usages', 'toggle-comment',\n 'edit']);\n\n var textArea = document.getElementById(\"editor\" + id);\n textArea.value = data.content;\n\n var editor = CodeMirror.fromTextArea(textArea, {\n lineNumbers: true,\n autofocus: true,\n autoCloseBrackets: true,\n matchBrackets: true,\n highlightSelectionMatches: {showToken: /\\w/},\n rulers: [{color: \"#ccc\", column: 120, lineStyle: \"dashed\"}],\n styleActiveLine: true,\n theme: config.editorTheme,\n tabSize: config.editorTabSize,\n indentUnit: 4,\n indentWithTabs: true,\n foldGutter: true,\n cursorHeight: 1,\n path: data.path,\n readOnly: wide.curNode.isGOAPI,\n profile: 'xhtml', // define Emmet output profile\n extraKeys: {\n \"Ctrl-\\\\\": \"autocompleteAnyWord\",\n \".\": \"autocompleteAfterDot\",\n \"Ctrl-/\": 'toggleComment',\n \"Ctrl-I\": \"exprInfo\",\n \"Ctrl-L\": \"gotoLine\",\n \"Ctrl-E\": \"deleteLine\",\n \"Ctrl-D\": \"doNothing\", // 取消默认的 deleteLine\n \"Ctrl-B\": \"jumpToDecl\",\n \"Ctrl-S\": function () {\n wide.saveFile();\n },\n \"Shift-Ctrl-S\": function () {\n menu.saveAllFiles();\n },\n \"Shift-Alt-F\": function () {\n var currentPath = editors.getCurrentPath();\n if (!currentPath) {\n return false;\n }\n wide.fmt(currentPath, wide.curEditor);\n },\n \"Alt-F7\": \"findUsages\",\n \"Shift-Alt-Enter\": function () {\n if (windows.isMaxEditor) {\n windows.restoreEditor();\n } else {\n windows.maxEditor();\n }\n },\n \"Shift-Ctrl-Up\": \"copyLinesUp\",\n \"Shift-Ctrl-Down\": \"copyLinesDown\",\n \"Shift-Alt-Up\": \"moveLinesUp\",\n \"Shift-Alt-Down\": \"moveLinesDown\",\n \"Shift-Alt-J\": \"selectIdentifier\"\n }\n });\n\n if (\"text/html\" === data.mode) {\n emmetCodeMirror(editor);\n }\n\n editor.on('cursorActivity', function (cm) {\n $(\".edit-exprinfo\").remove();\n var cursor = cm.getCursor();\n\n $(\".footer .cursor\").text('| ' + (cursor.line + 1) + ':' + (cursor.ch + 1) + ' |');\n });\n\n editor.on('blur', function (cm) {\n $(\".edit-exprinfo\").remove();\n });\n\n editor.on('changes', function (cm) {\n if (cm.doc.isClean()) { // no modification\n $(\".edit-panel .tabs > div\").each(function () {\n var $span = $(this).find(\"span:eq(0)\");\n if ($span.attr(\"title\") === cm.options.path) {\n $span.removeClass(\"changed\");\n }\n });\n\n return;\n }\n\n // changed\n\n $(\".edit-panel .tabs > div\").each(function () {\n var $span = $(this).find(\"span:eq(0)\");\n if ($span.attr(\"title\") === cm.options.path) {\n $span.addClass(\"changed\");\n }\n });\n });\n\n editor.on('keydown', function (cm, evt) {\n if (evt.altKey || evt.ctrlKey || evt.shiftKey) {\n return;\n }\n\n var k = evt.which;\n\n if (k < 48) {\n return;\n }\n\n // hit [0-9]\n\n if (k > 57 && k < 65) {\n return;\n }\n\n // hit [a-z]\n\n if (k > 90) {\n return;\n }\n\n if (config.autocomplete) {\n if (0.5 <= Math.random()) {\n CodeMirror.commands.autocompleteAfterDot(cm);\n }\n }\n });\n\n editor.setSize('100%', $(\".edit-panel\").height() - $(\".edit-panel .tabs\").height());\n editor.setOption(\"mode\", data.mode);\n editor.setOption(\"gutters\", [\"CodeMirror-lint-markers\", \"CodeMirror-foldgutter\"]);\n\n if (\"wide\" !== config.keymap) {\n editor.setOption(\"keyMap\", config.keymap);\n }\n\n if (\"text/x-go\" === data.mode || \"application/json\" === data.mode) {\n editor.setOption(\"lint\", true);\n }\n\n if (\"application/xml\" === data.mode || \"text/html\" === data.mode) {\n editor.setOption(\"autoCloseTags\", true);\n }\n\n wide.curEditor = editor;\n editors.data.push({\n \"editor\": editor,\n \"id\": id\n });\n\n $(\".footer .cursor\").text('| ' + (cursor.line + 1) + ':' + (cursor.ch + 1) + ' |');\n\n var half = Math.floor(wide.curEditor.getScrollInfo().clientHeight / wide.curEditor.defaultTextHeight() / 2);\n var cursorCoords = wide.curEditor.cursorCoords({line: cursor.line - half, ch: 0}, \"local\");\n wide.curEditor.scrollTo(0, cursorCoords.top);\n\n editor.setCursor(cursor);\n editor.focus();\n }\n};","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file notification.js\n *\n * @author Liyuan Li\n * @author Liang Ding\n * @version 1.0.0.1, Dec 8, 2015\n */\nvar notification = {\n init: function () {\n $(\".notification-count\").click(function () {\n bottomGroup.tabs.setCurrent(\"notification\");\n $(\".bottom-window-group .notification\").focus();\n $(this).hide();\n });\n\n this._initWS();\n },\n _initWS: function () {\n var notificationWS = new ReconnectingWebSocket(config.channel + '/notification/ws?sid=' + config.wideSessionId);\n\n notificationWS.onopen = function () {\n console.log('[notification onopen] connected');\n };\n\n notificationWS.onmessage = function (e) {\n var data = JSON.parse(e.data),\n $notification = $('.bottom-window-group .notification > table'),\n notificationHTML = '';\n \n if (data.cmd && \"init-notification\" === data.cmd) {\n console.log('[notification onmessage]' + e.data);\n \n return;\n }\n\n notificationHTML += '' + data.severity\n + '' + data.message\n + '' + data.type + '';\n $notification.append(notificationHTML);\n\n $(\".notification-count\").show();\n };\n\n notificationWS.onclose = function (e) {\n console.log('[notification onclose] disconnected (' + e.code + ')');\n };\n\n notificationWS.onerror = function (e) {\n console.log('[notification onerror]');\n };\n }\n};","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file tree.js\n *\n * @author Liyuan Li\n * @author Liang Ding\n * @version 1.0.1.1, Dec 15, 2015\n */\nvar tree = {\n fileTree: undefined,\n // 递归获取当前节点展开中的最后一个节点\n getCurrentNodeLastNode: function (node) {\n var returnNode = node.children[node.children.length - 1];\n if (returnNode.open) {\n return tree.getCurrentNodeLastNode(returnNode);\n } else {\n return returnNode;\n }\n },\n // 按照树展现获取下一个节点\n getNextShowNode: function (node) {\n if (node.level !== 0) {\n if (node.getParentNode().getNextNode()) {\n return node.getParentNode().getNextNode();\n } else {\n return tree.getNextShowNode(node.getParentNode());\n }\n } else {\n return node.getNextNode();\n }\n },\n isBottomNode: function (node) {\n if (node.open) {\n return false;\n }\n\n if (node.getParentNode()) {\n if (node.getParentNode().isLastNode) {\n return tree.isBottomNode(node.getParentNode());\n } else {\n return false;\n }\n } else {\n if (node.isLastNode) {\n return true;\n } else {\n return false;\n }\n }\n },\n getTIdByPath: function (path) {\n var nodes = tree.fileTree.transformToArray(tree.fileTree.getNodes());\n for (var i = 0, ii = nodes.length; i < ii; i++) {\n if (nodes[i].path === path) {\n return nodes[i].tId;\n }\n }\n\n return undefined;\n },\n getOpenPaths: function () {\n var nodes = tree.fileTree.transformToArray(tree.fileTree.getNodes()),\n paths = [];\n for (var i = 0, ii = nodes.length; i < ii; i++) {\n if (nodes[i].open) {\n paths.push(nodes[i].path);\n }\n }\n\n return paths;\n },\n getAllParents: function (node, parents) {\n if (!parents) {\n parents = [];\n }\n\n if (!node || !node.parentTId) {\n return parents;\n } else {\n parents.push(node.getParentNode());\n return tree.getAllParents(node.getParentNode(), parents);\n }\n },\n isParents: function (tId, parentPath) {\n var node = tree.fileTree.getNodeByTId(tId);\n if (!node || !node.parentTId) {\n return false;\n } else {\n var parentNode = tree.fileTree.getNodeByTId(node.parentTId);\n if (node.path === parentPath) {\n return true;\n } else {\n return tree.isParents(parentNode.tId, parentPath);\n }\n }\n },\n isDir: function () {\n if (wide.curNode.iconSkin.indexOf(\"ico-ztree-dir\") === 0) {\n return true;\n }\n\n return false;\n },\n newFile: function (it) {\n if ($(it).hasClass(\"disabled\")) {\n return false;\n }\n\n $(\"#dialogNewFilePrompt\").dialog(\"open\");\n },\n newDir: function (it) {\n if ($(it).hasClass(\"disabled\")) {\n return false;\n }\n\n $(\"#dialogNewDirPrompt\").dialog(\"open\");\n },\n removeIt: function (it) {\n if (it) {\n if ($(it).hasClass(\"disabled\")) {\n return false;\n }\n } else {\n if (!wide.curNode.removable) {\n return false;\n }\n }\n\n $(\"#dialogRemoveConfirm\").dialog(\"open\");\n },\n rename: function (it) {\n if (it) {\n if ($(it).hasClass(\"disabled\")) {\n return false;\n }\n }\n\n $(\"#dialogRenamePrompt\").dialog(\"open\");\n },\n export: function () {\n var request = newWideRequest(),\n isSucc = false;\n request.path = wide.curNode.path;\n\n $.ajax({\n async: false,\n type: 'POST',\n url: config.context + '/file/zip/new',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n $(\"#dialogAlert\").dialog(\"open\", result.msg);\n\n return false;\n }\n\n isSucc = true;\n }\n });\n\n if (isSucc) {\n window.open(config.context + '/file/zip?path=' + wide.curNode.path + \".zip\");\n }\n },\n crossCompile: function (platform) {\n var request = newWideRequest();\n request.path = wide.curNode.path;\n request.platform = platform;\n\n $.ajax({\n async: false,\n type: 'POST',\n url: config.context + '/cross',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n $(\"#dialogAlert\").dialog(\"open\", result.msg);\n\n return false;\n }\n }\n });\n },\n decompress: function () {\n var request = newWideRequest();\n request.path = wide.curNode.path;\n\n $.ajax({\n async: false,\n type: 'POST',\n url: config.context + '/file/decompress',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n $(\"#dialogAlert\").dialog(\"open\", result.msg);\n\n return false;\n }\n\n var dir = wide.curNode.getParentNode();\n tree.fileTree.reAsyncChildNodes(dir, \"refresh\");\n }\n });\n },\n refresh: function (it) {\n if (it) {\n if ($(it).hasClass(\"disabled\")) {\n return false;\n }\n }\n\n tree.fileTree.reAsyncChildNodes(wide.curNode, \"refresh\", true);\n },\n gitClone: function (it) {\n if (it) {\n if ($(it).hasClass(\"disabled\")) {\n return false;\n }\n }\n\n $(\"#dialogGitClonePrompt\").dialog('open');\n },\n import: function () {\n var request = newWideRequest();\n request.path = wide.curNode.path;\n\n $('#importFileupload').fileupload({\n url: \"/file/upload?path=\" + request.path,\n dataType: 'json',\n formData: request,\n done: function (e, result) {\n tree.fileTree.reAsyncChildNodes(wide.curNode, \"refresh\");\n },\n fail: function () {\n console.log(arguments);\n }\n });\n },\n init: function () {\n $(\"#file\").click(function () {\n $(this).focus();\n });\n\n var request = newWideRequest();\n\n $.ajax({\n type: 'POST',\n url: config.context + '/files',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (result.succ) {\n var $dirRMenu = $(\"#dirRMenu\");\n var $fileRMenu = $(\"#fileRMenu\");\n var setting = {\n data: {\n key: {\n title: \"path\"\n }\n },\n view: {\n showTitle: true,\n selectedMulti: false\n },\n async: {\n enable: true,\n url: config.context + \"/file/refresh\",\n autoParam: [\"path\"]\n },\n callback: {\n onDblClick: function (event, treeId, treeNode) {\n if (treeNode) {\n tree.openFile(treeNode);\n }\n },\n onRightClick: function (event, treeId, treeNode) {\n if (treeNode && !treeNode.isGOAPI) {\n menu.undisabled(['import', 'export', 'git-clone']);\n\n wide.curNode = treeNode;\n tree.fileTree.selectNode(treeNode);\n\n if (!tree.isDir()) { // if right click on a file\n if (wide.curNode.removable) {\n $fileRMenu.find(\".remove\").removeClass(\"disabled\");\n } else {\n $fileRMenu.find(\".remove\").addClass(\"disabled\");\n }\n\n if (-1 === wide.curNode.path.indexOf(\"zip\", wide.curNode.path.length - \"zip\".length)) { // !path.endsWith(\"zip\")\n $fileRMenu.find(\".decompress\").hide();\n } else {\n $fileRMenu.find(\".decompress\").show();\n }\n\n if (-1 === wide.curNode.path.indexOf(\"go\", wide.curNode.path.length - \"go\".length)) { // !path.endsWith(\"go\")\n $fileRMenu.find(\".linux64\").hide();\n } else {\n $fileRMenu.find(\".linux64\").show();\n }\n\n var top = event.clientY - 10;\n if ($fileRMenu.height() + top > $('.content').height()) {\n top = top - $fileRMenu.height() - 25;\n }\n $fileRMenu.css({\n \"top\": top + \"px\",\n \"left\": event.clientX + \"px\",\n \"display\": \"block\"\n }).show();\n\n $dirRMenu.hide();\n\n menu.disabled(['import', 'git-clone']);\n } else { // 右击了目录\n if (wide.curNode.removable) {\n $dirRMenu.find(\".remove\").removeClass(\"disabled\");\n } else {\n $dirRMenu.find(\".remove\").addClass(\"disabled\");\n }\n\n if (wide.curNode.creatable) {\n $dirRMenu.find(\".create\").removeClass(\"disabled\");\n } else {\n $dirRMenu.find(\".create\").addClass(\"disabled\");\n }\n\n var top = event.clientY - 10;\n if ($dirRMenu.height() + top > $('.content').height()) {\n top = top - $dirRMenu.height() - 25;\n }\n\n $dirRMenu.css({\n \"top\": top + \"px\",\n \"left\": event.clientX + \"px\",\n \"display\": \"block\"\n }).show();\n\n $fileRMenu.hide();\n }\n $(\"#files\").focus();\n }\n },\n onClick: function (event, treeId, treeNode, clickFlag) {\n if (treeNode) {\n wide.curNode = treeNode;\n tree.fileTree.selectNode(treeNode);\n\n menu.undisabled(['import', 'export', 'git-clone']);\n if (!tree.isDir()) {\n menu.disabled(['import', 'git-clone']);\n }\n\n $(\"#files\").focus();\n }\n }\n }\n };\n tree.fileTree = $.fn.zTree.init($(\"#files\"), setting, result.data.children);\n\n session.restore();\n }\n }\n });\n\n this._initSearch();\n this._initRename();\n },\n openFile: function (treeNode, cursor) {\n wide.curNode = treeNode;\n var tempCursor = cursor;\n\n for (var i = 0, ii = editors.data.length; i < ii; i++) {\n // 该节点文件已经打开\n if (editors.data[i].id === treeNode.path) {\n editors.tabs.setCurrent(treeNode.path);\n wide.curEditor = editors.data[i].editor;\n\n if (!tempCursor) {\n tempCursor = wide.curEditor.getCursor();\n }\n $(\".footer .cursor\").text('| ' + (tempCursor.line + 1) + ':' + (tempCursor.ch + 1) + ' |');\n\n wide.curEditor.setCursor(tempCursor);\n var half = Math.floor(wide.curEditor.getScrollInfo().clientHeight / wide.curEditor.defaultTextHeight() / 2);\n var cursorCoords = wide.curEditor.cursorCoords({line: tempCursor.line - half, ch: 0}, \"local\");\n wide.curEditor.scrollTo(0, cursorCoords.top);\n wide.curEditor.focus();\n\n wide.refreshOutline();\n return false;\n }\n }\n\n if (!tree.isDir()) {\n var request = newWideRequest();\n request.path = treeNode.path;\n\n $.ajax({\n async: false,\n type: 'POST',\n url: config.context + '/file',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n $(\"#dialogAlert\").dialog(\"open\", result.msg);\n\n return false;\n }\n\n var data = result.data;\n\n if (!data.mode) {\n var mode = CodeMirror.findModeByFileName(treeNode.path);\n if (mode) {\n data.mode = mode.mime;\n } else {\n data.mode = 'text/plain';\n }\n }\n\n if (!data.mode) {\n console.error(\"Can't find mode by file name [\" + treeNode.path + \"]\");\n }\n\n if (\"img\" === data.mode) { // 是图片文件的话新建 tab 打开\n // 最好是开 tab,但这个最终取决于浏览器设置\n var w = window.open(config.context + data.path);\n return false;\n }\n\n if (!tempCursor) {\n tempCursor = CodeMirror.Pos(0, 0);\n }\n\n editors.newEditor(data, tempCursor);\n\n wide.refreshOutline();\n }\n });\n }\n },\n _initSearch: function () {\n $(\"#dialogSearchForm > input:eq(0)\").keyup(function (event) {\n var $okBtn = $(this).closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\");\n if (event.which === 13 && !$okBtn.prop(\"disabled\")) {\n $okBtn.click();\n }\n\n if ($.trim($(this).val()) === \"\") {\n $okBtn.prop(\"disabled\", true);\n } else {\n $okBtn.prop(\"disabled\", false);\n }\n });\n\n $(\"#dialogSearchForm > input:eq(1)\").keyup(function (event) {\n var $okBtn = $(this).closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\");\n if (event.which === 13 && !$okBtn.prop(\"disabled\")) {\n $okBtn.click();\n }\n });\n\n $(\"#dialogSearchForm\").dialog({\n \"modal\": true,\n \"height\": 80,\n \"width\": 260,\n \"title\": config.label.search,\n \"okText\": config.label.search,\n \"cancelText\": config.label.cancel,\n \"afterOpen\": function () {\n $(\"#dialogSearchForm > input:eq(0)\").val('').focus();\n $(\"#dialogSearchForm > input:eq(1)\").val('');\n $(\"#dialogSearchForm\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\").prop(\"disabled\", true);\n },\n \"ok\": function () {\n var request = newWideRequest();\n\n if (!wide.curNode) {\n request.dir = \"\";\n } else {\n request.dir = wide.curNode.path;\n }\n\n request.text = $(\"#dialogSearchForm > input:eq(0)\").val();\n request.extension = $(\"#dialogSearchForm > input:eq(1)\").val();\n\n $.ajax({\n type: 'POST',\n url: config.context + '/file/search/text',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n return;\n }\n\n $(\"#dialogSearchForm\").dialog(\"close\");\n editors.appendSearch(result.data, 'founds', request.text);\n }\n });\n }\n });\n },\n _initRename: function () {\n $(\"#dialogRenamePrompt\").dialog({\n \"modal\": true,\n \"height\": 52,\n \"width\": 260,\n \"title\": config.label.rename,\n \"okText\": config.label.rename,\n \"cancelText\": config.label.cancel,\n \"afterOpen\": function () {\n $(\"#dialogRenamePrompt\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\").prop(\"disabled\", true);\n $(\"#dialogRenamePrompt > input\").val(wide.curNode.name).select().focus();\n },\n \"ok\": function () {\n var name = $(\"#dialogRenamePrompt > input\").val(),\n request = newWideRequest();\n\n request.oldPath = wide.curNode.path;\n request.newPath = wide.curNode.path.substring(0, wide.curNode.path.lastIndexOf(\"/\") + 1) + name;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/file/rename',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n $(\"#dialogRenamePrompt\").dialog(\"close\");\n bottomGroup.tabs.setCurrent(\"notification\");\n windows.flowBottom();\n $(\".bottom-window-group .notification\").focus();\n return false;\n }\n\n $(\"#dialogRenamePrompt\").dialog(\"close\");\n }\n });\n }\n });\n }\n};","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file wide.js\n *\n * @author Liyuan Li\n * @author Liang Ding\n * @version 1.0.0.1, Dec 8, 2015\n */\nvar wide = {\n curNode: undefined,\n curEditor: undefined,\n curProcessId: undefined, // curent running process id (pid)\n refreshOutline: function () {\n if (!wide.curEditor ||\n (wide.curEditor && wide.curEditor.doc.getMode().name !== \"go\")) {\n $(\"#outline\").html('');\n return false;\n }\n\n var request = newWideRequest();\n request.code = wide.curEditor.getValue();\n\n $.ajax({\n type: 'POST',\n async: false,\n url: config.context + '/outline',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n return;\n }\n\n var data = result.data;\n\n var outlineHTML = '
      ',\n decls = ['constDecls', 'varDecls', 'funcDecls',\n 'structDecls', 'interfaceDecls', 'typeDecls'];\n\n for (var i = 0, max = decls.length; i < max; i++) {\n var key = decls[i];\n for (var j = 0, maxj = data[key].length; j < maxj; j++) {\n var obj = data[key][j];\n outlineHTML += '
    • ' + obj.Name + '
    • ';\n }\n }\n $(\"#outline\").html(outlineHTML + '
    ');\n\n $(\"#outline li\").dblclick(function () {\n var $it = $(this),\n cursor = CodeMirror.Pos($it.data('line'), $it.data(\"ch\"));\n\n var editor = wide.curEditor;\n editor.setCursor(cursor);\n\n var half = Math.floor(editor.getScrollInfo().clientHeight / editor.defaultTextHeight() / 2);\n var cursorCoords = editor.cursorCoords({line: cursor.line - half, ch: 0}, \"local\");\n editor.scrollTo(0, cursorCoords.top);\n\n editor.focus();\n });\n }\n });\n },\n _initDialog: function () {\n $(\".dialog-prompt > input\").keyup(function (event) {\n var $okBtn = $(this).closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\");\n if (event.which === 13 && !$okBtn.prop(\"disabled\")) {\n $okBtn.click();\n }\n\n if ($.trim($(this).val()) === \"\") {\n $okBtn.prop(\"disabled\", true);\n } else {\n $okBtn.prop(\"disabled\", false);\n }\n });\n\n $(\"#dialogAlert\").dialog({\n \"modal\": true,\n \"height\": 40,\n \"width\": 350,\n \"title\": config.label.tip,\n \"hiddenOk\": true,\n \"cancelText\": config.label.confirm,\n \"afterOpen\": function (msg) {\n $(\"#dialogAlert\").html(msg);\n }\n });\n\n $(\"#dialogRemoveConfirm\").dialog({\n \"modal\": true,\n \"height\": 36,\n \"width\": 260,\n \"title\": config.label.delete,\n \"okText\": config.label.delete,\n \"cancelText\": config.label.cancel,\n \"afterOpen\": function () {\n $(\"#dialogRemoveConfirm > b\").html('\"' + wide.curNode.name + '\"');\n },\n \"ok\": function () {\n var request = newWideRequest();\n request.path = wide.curNode.path;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/file/remove',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n $(\"#dialogRemoveConfirm\").dialog(\"close\");\n bottomGroup.tabs.setCurrent(\"notification\");\n windows.flowBottom();\n $(\".bottom-window-group .notification\").focus();\n return false;\n }\n\n $(\"#dialogRemoveConfirm\").dialog(\"close\");\n }\n });\n }\n });\n\n $(\"#dialogNewFilePrompt\").dialog({\n \"modal\": true,\n \"height\": 52,\n \"width\": 260,\n \"title\": config.label.create_file,\n \"okText\": config.label.create,\n \"cancelText\": config.label.cancel,\n \"afterOpen\": function () {\n $(\"#dialogNewFilePrompt > input\").val('').focus();\n $(\"#dialogNewFilePrompt\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\").prop(\"disabled\", true);\n },\n \"ok\": function () {\n var request = newWideRequest(),\n name = $(\"#dialogNewFilePrompt > input\").val();\n\n request.path = wide.curNode.path + \"/\" + name;\n request.fileType = \"f\";\n\n $.ajax({\n type: 'POST',\n url: config.context + '/file/new',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n $(\"#dialogNewFilePrompt\").dialog(\"close\");\n bottomGroup.tabs.setCurrent(\"notification\");\n windows.flowBottom();\n $(\".bottom-window-group .notification\").focus();\n return false;\n }\n\n $(\"#dialogNewFilePrompt\").dialog(\"close\");\n\n setTimeout(function () { // Delay, waiting the file change notified and then open it\n var tId = tree.getTIdByPath(request.path);\n tree.openFile(tree.fileTree.getNodeByTId(tId));\n tree.fileTree.selectNode(wide.curNode);\n }, 100);\n }\n });\n }\n });\n\n $(\"#dialogNewDirPrompt\").dialog({\n \"modal\": true,\n \"height\": 52,\n \"width\": 260,\n \"title\": config.label.create_dir,\n \"okText\": config.label.create,\n \"cancelText\": config.label.cancel,\n \"afterOpen\": function () {\n $(\"#dialogNewDirPrompt > input\").val('').focus();\n $(\"#dialogNewDirPrompt\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\").prop(\"disabled\", true);\n },\n \"ok\": function () {\n var name = $(\"#dialogNewDirPrompt > input\").val(),\n request = newWideRequest();\n\n request.path = wide.curNode.path + \"/\" + name;\n request.fileType = \"d\";\n\n $.ajax({\n type: 'POST',\n url: config.context + '/file/new',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n $(\"#dialogNewDirPrompt\").dialog(\"close\");\n bottomGroup.tabs.setCurrent(\"notification\");\n windows.flowBottom();\n $(\".bottom-window-group .notification\").focus();\n return false;\n }\n\n $(\"#dialogNewDirPrompt\").dialog(\"close\");\n }\n });\n }\n });\n\n $(\"#dialogGoFilePrompt\").dialog({\n \"modal\": true,\n \"height\": 320,\n \"width\": 660,\n \"title\": config.label.goto_file,\n \"okText\": config.label.go,\n \"cancelText\": config.label.cancel,\n \"afterInit\": function () {\n $(\"#dialogGoFilePrompt\").on(\"dblclick\", \"li\", function () {\n var tId = tree.getTIdByPath($(this).find(\".ft-small\").text());\n tree.openFile(tree.fileTree.getNodeByTId(tId));\n tree.fileTree.selectNode(wide.curNode);\n $(\"#dialogGoFilePrompt\").dialog(\"close\");\n wide.curEditor.focus();\n });\n\n $(\"#dialogGoFilePrompt\").on(\"click\", \"li\", function () {\n var $list = $(\"#dialogGoFilePrompt > .list\");\n $list.find(\"li\").removeClass(\"selected\");\n $list.data(\"index\", $(this).data(\"index\"));\n $(this).addClass(\"selected\");\n });\n\n hotkeys.bindList($(\"#dialogGoFilePrompt > input\"), $(\"#dialogGoFilePrompt > .list\"), function ($selected) {\n var tId = tree.getTIdByPath($selected.find(\".ft-small\").text());\n tree.openFile(tree.fileTree.getNodeByTId(tId));\n tree.fileTree.selectNode(wide.curNode);\n $(\"#dialogGoFilePrompt\").dialog(\"close\");\n wide.curEditor.focus();\n });\n\n $(\"#dialogGoFilePrompt > input\").bind(\"input\", function () {\n var name = $(\"#dialogGoFilePrompt > input\").val();\n\n var request = newWideRequest();\n request.path = '';\n request.name = '*' + name + '*';\n if (wide.curNode) {\n request.path = wide.curNode.path;\n }\n\n $.ajax({\n type: 'POST',\n url: config.context + '/file/find/name',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n return;\n }\n\n var data = result.data;\n\n var goFileHTML = '';\n for (var i = 0, max = data.length; i < max; i++) {\n var path = data[i].path,\n name = path.substr(path.lastIndexOf(\"/\") + 1),\n icoSkin = wide.getClassBySuffix(name.split(\".\")[1]);\n if (i === 0) {\n goFileHTML += '
  • '\n + name + '    '\n + path + '
  • ';\n } else {\n goFileHTML += '
  • '\n + name + '    '\n + path + '
  • ';\n }\n }\n\n $(\"#dialogGoFilePrompt > ul\").html(goFileHTML);\n }\n });\n });\n },\n \"afterOpen\": function () {\n $(\"#dialogGoFilePrompt > input\").val('').focus();\n $(\"#dialogGoFilePrompt\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\").prop(\"disabled\", true);\n $(\"#dialogGoFilePrompt .list\").html('').data(\"index\", 0);\n },\n \"ok\": function () {\n var tId = tree.getTIdByPath($(\"#dialogGoFilePrompt .selected .ft-small\").text());\n tree.openFile(tree.fileTree.getNodeByTId(tId));\n tree.fileTree.selectNode(wide.curNode);\n $(\"#dialogGoFilePrompt\").dialog(\"close\");\n wide.curEditor.focus();\n }\n });\n\n $(\"#dialogGoLinePrompt\").dialog({\n \"modal\": true,\n \"height\": 52,\n \"width\": 260,\n \"title\": config.label.goto_line,\n \"okText\": config.label.go,\n \"cancelText\": config.label.cancel,\n \"afterOpen\": function () {\n $(\"#dialogGoLinePrompt > input\").val('').focus();\n $(\"#dialogGoLinePrompt\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\").prop(\"disabled\", true);\n },\n \"ok\": function () {\n var line = parseInt($(\"#dialogGoLinePrompt > input\").val()) - 1;\n $(\"#dialogGoLinePrompt\").dialog(\"close\");\n\n var editor = wide.curEditor;\n var cursor = editor.getCursor();\n\n editor.setCursor(CodeMirror.Pos(line, cursor.ch));\n\n var half = Math.floor(editor.getScrollInfo().clientHeight / editor.defaultTextHeight() / 2);\n var cursorCoords = editor.cursorCoords({line: line - half, ch: cursor.ch}, \"local\");\n editor.scrollTo(0, cursorCoords.top);\n\n editor.focus();\n }\n });\n\n $(\"#dialogGitClonePrompt\").dialog({\n \"modal\": true,\n \"height\": 52,\n \"width\": 360,\n \"title\": config.label.git_clone,\n \"okText\": config.label.confirm,\n \"cancelText\": config.label.cancel,\n \"afterOpen\": function () {\n $(\"#dialogGitClonePrompt > input\").val('').focus();\n $(\"#dialogGitClonePrompt\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\").prop(\"disabled\", true);\n },\n \"ok\": function () {\n $(\"#dialogGitClonePrompt\").dialog(\"close\");\n\n var request = newWideRequest();\n request.path = wide.curNode.path;\n request.repository = $(\"#dialogGitClonePrompt > input\").val();\n\n $.ajax({\n type: 'POST',\n url: config.context + '/git/clone',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n }\n });\n }\n });\n },\n _initWS: function () {\n var outputWS = new ReconnectingWebSocket(config.channel + '/output/ws?sid=' + config.wideSessionId);\n outputWS.onopen = function () {\n console.log('[output onopen] connected');\n };\n\n outputWS.onmessage = function (e) {\n console.log('[output onmessage]' + e.data);\n var data = JSON.parse(e.data);\n\n if (goLintFound) {\n goLintFound = [];\n }\n\n if ('run' === data.nextCmd) {\n var request = newWideRequest();\n request.executable = data.executable;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/run',\n data: JSON.stringify(request),\n dataType: \"json\"\n });\n }\n\n switch (data.cmd) {\n case 'run':\n var content = $('.bottom-window-group .output > div').html();\n if (!wide.curProcessId || '' === content) {\n bottomGroup.fillOutput(content + '
    ' + data.output + '
    ');\n } else {\n bottomGroup.fillOutput(content.replace(/<\\/pre>$/g, data.output + ''));\n }\n\n wide.curProcessId = data.pid;\n\n break;\n case 'run-done':\n bottomGroup.fillOutput($('.bottom-window-group .output > div').html().replace(/<\\/pre>$/g, data.output + ''));\n\n wide.curProcessId = undefined;\n $(\"#buildRun\").removeClass(\"ico-stop\")\n .addClass(\"ico-buildrun\").attr(\"title\", config.label.build_n_run);\n\n break;\n case 'start-build':\n case 'start-test':\n case 'start-vet':\n case 'start-install':\n case 'start-get':\n case 'start-git_clone':\n bottomGroup.fillOutput(data.output);\n\n break;\n case 'go test':\n case 'go vet':\n case 'go install':\n case 'go get':\n bottomGroup.fillOutput($('.bottom-window-group .output > div').html() + data.output);\n\n break;\n case 'git clone':\n bottomGroup.fillOutput($('.bottom-window-group .output > div').html() + data.output);\n tree.fileTree.reAsyncChildNodes(wide.curNode, \"refresh\", false);\n\n break;\n case 'build':\n case 'cross-build':\n bottomGroup.fillOutput($('.bottom-window-group .output > div').html() + data.output);\n\n if (data.lints) { // has build error\n var files = {};\n\n for (var i = 0; i < data.lints.length; i++) {\n var lint = data.lints[i];\n\n goLintFound.push({from: CodeMirror.Pos(lint.lineNo, 0),\n to: CodeMirror.Pos(lint.lineNo, 0),\n message: lint.msg, severity: lint.severity});\n\n files[lint.file] = lint.file;\n }\n\n $(\"#buildRun\").removeClass(\"ico-stop\")\n .addClass(\"ico-buildrun\").attr(\"title\", config.label.build_n_run);\n\n // trigger gutter lint\n for (var path in files) {\n var editor = editors.getEditorByPath(path);\n CodeMirror.signal(editor, \"change\", editor);\n }\n } else {\n if ('cross-build' === data.cmd) {\n var request = newWideRequest(),\n path = null;\n request.path = data.executable;\n request.name = data.name;\n\n $.ajax({\n async: false,\n type: 'POST',\n url: config.context + '/file/zip/new',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (!result.succ) {\n $(\"#dialogAlert\").dialog(\"open\", result.msg);\n\n return false;\n }\n\n path = result.data;\n }\n });\n\n if (path) {\n window.open(config.context + '/file/zip?path=' + path + \".zip\");\n }\n }\n }\n\n break;\n }\n };\n outputWS.onclose = function (e) {\n console.log('[output onclose] disconnected (' + e.code + ')');\n };\n outputWS.onerror = function (e) {\n console.log('[output onerror]');\n };\n },\n _initFooter: function () {\n $(\".footer .cursor\").dblclick(function () {\n $(\"#dialogGoLinePrompt\").dialog(\"open\");\n });\n },\n init: function () {\n this._initFooter();\n\n this._initWS();\n\n // 点击隐藏弹出层\n $(\"body\").bind(\"mouseup\", function (event) {\n // MAC 右键文件树失效\n if (event.which === 3) {\n return false;\n }\n\n $(\".frame\").hide();\n\n if (!($(event.target).closest(\".frame\").length === 1 || event.target.className === \"frame\")) {\n $(\".menu > ul > li\").unbind().removeClass(\"selected\");\n menu.subMenu();\n }\n });\n\n // 刷新提示\n window.onbeforeunload = function () {\n if (editors.data.length > 0) {\n return config.label.confirm_save;\n }\n };\n\n // 禁止鼠标右键菜单\n document.oncontextmenu = function () {\n return false;\n };\n\n this._initDialog();\n },\n _save: function (path, editor) {\n if (!path) {\n return false;\n }\n\n var request = newWideRequest();\n request.file = path;\n request.code = editor.getValue();\n\n $.ajax({\n type: 'POST',\n url: config.context + '/file/save',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n // reset the save state\n editor.doc.markClean();\n $(\".edit-panel .tabs > div\").each(function () {\n var $span = $(this).find(\"span:eq(0)\");\n if ($span.attr(\"title\") === path) {\n $span.removeClass(\"changed\");\n }\n });\n }\n });\n },\n saveFile: function () {\n var path = editors.getCurrentPath();\n if (!path) {\n return false;\n }\n\n var editor = wide.curEditor;\n if (editor.doc.isClean()) { // no modification\n return false;\n }\n\n if (\"text/x-go\" === editor.getOption(\"mode\")) {\n wide.gofmt(path, wide.curEditor); // go fmt will save\n\n // build the file at once\n var request = newWideRequest();\n request.file = path;\n request.code = editor.getValue();\n request.nextCmd = \"\"; // build only, no following operation\n $.ajax({\n type: 'POST',\n url: config.context + '/build',\n data: JSON.stringify(request),\n dataType: \"json\",\n beforeSend: function () {\n bottomGroup.resetOutput();\n },\n success: function (result) {\n }\n });\n\n // refresh outline\n wide.refreshOutline();\n\n return;\n }\n\n wide._save(path, wide.curEditor);\n },\n stop: function () {\n if ($(\"#buildRun\").hasClass(\"ico-buildrun\")) {\n menu.run();\n return false;\n }\n\n if (!wide.curProcessId) {\n return false;\n }\n\n var request = newWideRequest();\n request.pid = wide.curProcessId;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/stop',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n $(\"#buildRun\").removeClass(\"ico-stop\")\n .addClass(\"ico-buildrun\").attr(\"title\", config.label.build_n_run);\n }\n });\n },\n gofmt: function (path, editor) {\n var cursor = editor.getCursor();\n var scrollInfo = editor.getScrollInfo();\n\n var request = newWideRequest();\n request.file = path;\n request.code = editor.getValue();\n request.cursorLine = cursor.line;\n request.cursorCh = cursor.ch;\n\n $.ajax({\n async: false, // sync\n type: 'POST',\n url: config.context + '/go/fmt',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (result.succ) {\n editor.setValue(result.data.code);\n editor.setCursor(cursor);\n editor.scrollTo(null, scrollInfo.top);\n\n wide._save(path, editor);\n }\n }\n });\n },\n fmt: function (path, editor) {\n var mode = editor.getOption(\"mode\");\n\n var cursor = editor.getCursor();\n var scrollInfo = editor.getScrollInfo();\n\n var request = newWideRequest();\n request.file = path;\n request.code = editor.getValue();\n request.cursorLine = cursor.line;\n request.cursorCh = cursor.ch;\n\n var formatted = null;\n\n switch (mode) {\n case \"text/x-go\":\n $.ajax({\n async: false, // sync\n type: 'POST',\n url: config.context + '/go/fmt',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (result.succ) {\n formatted = result.data.code;\n }\n }\n });\n\n break;\n case \"text/html\":\n formatted = html_beautify(editor.getValue());\n break;\n case \"text/javascript\":\n case \"application/json\":\n formatted = js_beautify(editor.getValue());\n break;\n case \"text/css\":\n formatted = css_beautify(editor.getValue());\n break;\n default :\n break;\n }\n\n if (formatted) {\n editor.setValue(formatted);\n editor.setCursor(cursor);\n editor.scrollTo(null, scrollInfo.top);\n\n wide._save(path, editor);\n }\n },\n getClassBySuffix: function (suffix) {\n var iconSkin = \"ico-ztree-other \";\n switch (suffix) {\n case \"html\":\n case \"htm\":\n iconSkin = \"ico-ztree-html \";\n break;\n case \"go\":\n iconSkin = \"ico-ztree-go \";\n break;\n case \"css\":\n iconSkin = \"ico-ztree-css \";\n break;\n case \"txt\":\n iconSkin = \"ico-ztree-text \";\n break;\n case \"sql\":\n iconSkin = \"ico-ztree-sql \";\n break;\n case \"properties\":\n iconSkin = \"ico-ztree-pro \";\n break;\n case \"md\":\n iconSkin = \"ico-ztree-md \";\n break;\n case \"js\", \"json\":\n iconSkin = \"ico-ztree-js \";\n break;\n case \"xml\":\n iconSkin = \"ico-ztree-xml \";\n break;\n case \"jpg\":\n case \"jpeg\":\n case \"bmp\":\n case \"gif\":\n case \"png\":\n case \"svg\":\n case \"ico\":\n iconSkin = \"ico-ztree-img \";\n break;\n }\n\n return iconSkin;\n }\n};\n\n$(document).ready(function () {\n wide.init();\n tree.init();\n menu.init();\n hotkeys.init();\n session.init();\n notification.init();\n editors.init();\n windows.init();\n bottomGroup.init();\n});\n","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file session.js\n *\n * @author Liyuan Li\n * @version 1.1.0.1, Dec 8, 2015\n */\nvar session = {\n init: function () {\n this._initWS();\n\n var getLayoutState = function (paneState) {\n var state = 'normal';\n if (paneState.isClosed) {\n state = 'min';\n } else if (paneState.size >= $('body').width()) {\n state = 'max';\n }\n\n return state;\n };\n\n // save session content every 30 seconds\n setInterval(function () {\n var request = newWideRequest(),\n filse = [],\n fileTree = [],\n currentId = editors.getCurrentId(),\n currentFile = currentId ? editors.getCurrentPath() : \"\";\n\n editors.tabs.obj._$tabs.find(\"div\").each(function () {\n var $it = $(this);\n if ($it.find(\"span:eq(0)\").attr(\"title\") !== config.label.start_page) {\n filse.push($it.find(\"span:eq(0)\").attr(\"title\"));\n }\n });\n\n fileTree = tree.getOpenPaths();\n\n request.currentFile = currentFile; // current editor file\n request.fileTree = fileTree; // file tree expansion state\n request.files = filse; // editor tabs\n\n\n request.layout = {\n \"side\": {\n \"size\": windows.outerLayout.west.state.size,\n \"state\": getLayoutState(windows.outerLayout.west.state)\n },\n \"sideRight\": {\n \"size\": windows.innerLayout.east.state.size,\n \"state\": getLayoutState(windows.innerLayout.east.state)\n },\n \"bottom\": {\n \"size\": windows.innerLayout.south.state.size,\n \"state\": getLayoutState(windows.innerLayout.south.state)\n }\n };\n\n $.ajax({\n type: 'POST',\n url: config.context + '/session/save',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n }\n });\n }, 30000);\n },\n restore: function () {\n if (!config.latestSessionContent) {\n return;\n }\n\n var fileTree = config.latestSessionContent.fileTree,\n files = config.latestSessionContent.files,\n currentFile = config.latestSessionContent.currentFile,\n id = \"\",\n nodesToOpen = [];\n\n var nodes = tree.fileTree.transformToArray(tree.fileTree.getNodes());\n\n for (var i = 0, ii = nodes.length; i < ii; i++) {\n // expand tree\n for (var j = 0, jj = fileTree.length; j < jj; j++) {\n if (nodes[i].path === fileTree[j]) {\n // expand this node only if its parents are open\n var parents = tree.getAllParents(tree.fileTree.getNodeByTId(nodes[i].tId)),\n isOpen = true;\n for (var l = 0, max = parents.length; l < max; l++) {\n if (parents[l].open === false) {\n isOpen = false;\n }\n }\n if (isOpen) {\n tree.fileTree.expandNode(nodes[i], true, false, true);\n } else {\n // flag it is open\n nodes[i].open = true;\n }\n break;\n }\n }\n\n // open editors\n for (var k = 0, kk = files.length; k < kk; k++) {\n if (nodes[i].path === files[k]) {\n nodesToOpen.push(nodes[i]);\n break;\n }\n }\n\n if (nodes[i].path === currentFile) {\n id = nodes[i].path;\n\n // FIXME: 上面的展开是异步进行的,所以执行到这里的时候可能还没有展开完,导致定位不了可视区域\n tree.fileTree.selectNode(nodes[i]);\n wide.curNode = nodes[i];\n }\n }\n\n // handle the open sequence of editors\n for (var m = 0, mm = files.length; m < mm; m++) {\n for (var n = 0, nn = nodesToOpen.length; n < nn; n++) {\n if (nodesToOpen[n].path === files[m]) {\n tree.openFile(nodesToOpen[n]);\n break;\n }\n }\n }\n\n // set the current editor\n editors.tabs.setCurrent(id);\n for (var c = 0, max = editors.data.length; c < max; c++) {\n if (id === editors.data[c].id) {\n wide.curEditor = editors.data[c].editor;\n break;\n }\n } \n },\n _initWS: function () {\n // Used for session retention, server will release all resources of the session if this channel closed\n var sessionWS = new ReconnectingWebSocket(config.channel + '/session/ws?sid=' + config.wideSessionId);\n\n sessionWS.onopen = function () {\n console.log('[session onopen] connected');\n\n var dateFormat = function (time, fmt) {\n var date = new Date(time);\n var dateObj = {\n \"M+\": date.getMonth() + 1,\n \"d+\": date.getDate(),\n \"h+\": date.getHours(),\n \"m+\": date.getMinutes(),\n \"s+\": date.getSeconds(),\n \"q+\": Math.floor((date.getMonth() + 3) / 3),\n \"S\": date.getMilliseconds()\n };\n if (/(y+)/.test(fmt))\n fmt = fmt.replace(RegExp.$1, (date.getFullYear() + \"\").substr(4 - RegExp.$1.length));\n for (var k in dateObj)\n if (new RegExp(\"(\" + k + \")\").test(fmt)) {\n fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1)\n ? (dateObj[k]) : ((\"00\" + dateObj[k]).substr((\"\" + dateObj[k]).length)));\n }\n return fmt;\n };\n\n var data = {type: \"Network\", severity: \"INFO\",\n message: \"Connected to server [sid=\" + config.wideSessionId + \"], \" + dateFormat(new Date().getTime(), 'yyyy-MM-dd hh:mm:ss')},\n $notification = $('.bottom-window-group .notification > table'),\n notificationHTML = '';\n\n notificationHTML += '' + data.severity\n + '' + data.message\n + '' + data.type + '';\n $notification.append(notificationHTML);\n };\n\n sessionWS.onmessage = function (e) {\n var data = JSON.parse(e.data);\n switch (data.cmd) {\n case 'create-file':\n var node = tree.fileTree.getNodeByTId(tree.getTIdByPath(data.dir)),\n name = data.path.replace(data.dir + '/', ''),\n mode = CodeMirror.findModeByFileName(name),\n iconSkin = wide.getClassBySuffix(name.split(\".\")[1]);\n\n if (data.type && data.type === 'f') {\n tree.fileTree.addNodes(node, [{\n \"id\": data.path,\n \"name\": name,\n \"iconSkin\": iconSkin,\n \"path\": data.path,\n \"mode\": mode,\n \"removable\": true,\n \"creatable\": true\n }]);\n\n } else {\n tree.fileTree.addNodes(node, [{\n \"id\": data.path,\n \"name\": name,\n \"iconSkin\": \"ico-ztree-dir \",\n \"path\": data.path,\n \"removable\": true,\n \"creatable\": true,\n \"isParent\": true\n }]);\n }\n break;\n case 'remove-file':\n case 'rename-file':\n var node = tree.fileTree.getNodeByTId(tree.getTIdByPath(data.path));\n tree.fileTree.removeNode(node);\n\n var nodes = tree.fileTree.transformToArray(node);\n for (var i = 0, ii = nodes.length; i < ii; i++) {\n editors.tabs.del(nodes[i].path);\n }\n\n break;\n }\n };\n sessionWS.onclose = function (e) {\n console.log('[session onclose] disconnected (' + e.code + ')');\n\n var data = {type: \"Network\", severity: \"ERROR\",\n message: \"Disconnected from server, trying to reconnect it [sid=\" + config.wideSessionId + \"]\"},\n $notification = $('.bottom-window-group .notification > table'),\n notificationHTML = '';\n\n notificationHTML += '' + data.severity\n + '' + data.message\n + '' + data.type + '';\n $notification.append(notificationHTML);\n\n $(\".notification-count\").show();\n };\n sessionWS.onerror = function (e) {\n console.log('[session onerror]');\n };\n }\n};","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file menu.js\n *\n * @author Liyuan Li\n * @author Liang Ding\n * @version 1.0.1.2, Mar 27, 2017\n */\nvar menu = {\n init: function () {\n this.subMenu();\n this._initPreference();\n this._initAbout();\n this._initShare();\n\n // 点击子菜单后消失\n $(\".menu .frame li\").click(function () {\n $(\".menu > ul > li\").unbind().removeClass(\"selected\");\n menu.subMenu();\n });\n },\n _initShare: function () {\n $(\".menu .ico-share\").hover(function () {\n $(\".menu .share-panel\").show();\n });\n\n $(\".share-panel .font-ico\").click(function () {\n var key = $(this).attr('class').split('-')[2];\n var url = \"https://wide.b3log.org\", pic = 'https://wide.b3log.org/static/images/wide-logo.png';\n var urls = {};\n urls.email = \"mailto:?subject=\" + $('title').text()\n + \"&body=\" + $('meta[name=description]').attr('content') + ' ' + url;\n\n var twitterShare = encodeURIComponent($('meta[name=description]').attr('content') + \" \" + url + \" #golang\");\n urls.twitter = \"https://twitter.com/intent/tweet?status=\" + twitterShare;\n\n urls.facebook = \"https://www.facebook.com/sharer/sharer.php?u=\" + url;\n urls.googleplus = \"https://plus.google.com/share?url=\" + url;\n\n var title = encodeURIComponent($('title').text() + '. \\n' + $('meta[name=description]').attr('content')\n + \" #golang#\");\n urls.weibo = \"http://v.t.sina.com.cn/share/share.php?title=\" + title + \"&url=\" + url + \"&pic=\" + pic;\n urls.tencent = \"http://share.v.t.qq.com/index.php?c=share&a=index&title=\" + title +\n \"&url=\" + url + \"&pic=\" + pic;\n\n window.open(urls[key], \"_blank\", \"top=100,left=200,width=648,height=618\");\n });\n },\n _initAbout: function () {\n $(\"#dialogAbout\").load(config.context + '/about', function () {\n $(\"#dialogAbout\").dialog({\n \"modal\": true,\n \"title\": config.label.about,\n \"hideFooter\": true,\n \"afterOpen\": function () {\n $.ajax({\n url: \"https://rhythm.b3log.org/version/wide/latest\",\n type: \"GET\",\n dataType: \"jsonp\",\n jsonp: \"callback\",\n success: function (data, textStatus) {\n if ($(\"#dialogAbout .version\").text() === data.wideVersion) {\n $(\".upgrade\").text(config.label.uptodate);\n } else {\n $(\".upgrade\").html(config.label.new_version_available + config.label.colon\n + \"\" + data.wideVersion + \"\");\n }\n }\n });\n }\n });\n });\n },\n disabled: function (list) {\n for (var i = 0, max = list.length; i < max; i++) {\n $(\".menu li.\" + list[i]).addClass(\"disabled\");\n }\n },\n undisabled: function (list) {\n for (var i = 0, max = list.length; i < max; i++) {\n $(\".menu li.\" + list[i]).removeClass(\"disabled\");\n }\n },\n // 焦点不在菜单上时需点击展开子菜单,否则为鼠标移动展开\n subMenu: function () {\n $(\".menu > ul > li\").click(function (event) {\n if ($(event.target).closest(\".frame\").length === 1) {\n return;\n }\n var $it = $(this);\n $it.find('.frame').show();\n $(\".menu > ul > li\").removeClass(\"selected\");\n $(this).addClass(\"selected\");\n\n $(\".menu > ul > li\").unbind();\n\n $(\".menu > ul > li\").mouseover(function () {\n if ($(event.target).closest(\".frame\").length === 1) {\n return;\n }\n $(\".menu .frame\").hide();\n $(this).find('.frame').show();\n $(\".menu > ul > li\").removeClass(\"selected\");\n $(this).addClass(\"selected\");\n });\n });\n },\n openPreference: function () {\n $(\"#dialogPreference\").dialog(\"open\");\n },\n saveAllFiles: function () {\n if ($(\".menu li.save-all\").hasClass(\"disabled\")) {\n return false;\n }\n for (var i = 0, ii = editors.data.length; i < ii; i++) {\n var path = editors.data[i].id;\n var editor = editors.data[i].editor;\n\n if (\"text/x-go\" === editor.getOption(\"mode\")) {\n wide.fmt(path, editor);\n } else {\n wide._save(path, editor);\n }\n }\n },\n closeAllFiles: function () {\n if ($(\".menu li.close-all\").hasClass(\"disabled\")) {\n return false;\n }\n\n // 设置全部关闭标识\n var removeData = [];\n $(\".edit-panel .tabs > div\").each(function (i) {\n if (i !== 0) {\n removeData.push($(this).data(\"index\"));\n }\n });\n $(\"#dialogCloseEditor\").data(\"removeData\", removeData);\n // 开始关闭\n $(\".edit-panel .tabs .ico-close:eq(0)\").click();\n },\n exit: function () {\n var request = newWideRequest();\n\n $.ajax({\n type: 'POST',\n url: config.context + '/logout',\n data: JSON.stringify(request),\n dataType: \"json\",\n success: function (result) {\n if (result.succ) {\n window.location.href = config.context + \"/login\";\n }\n }\n });\n },\n openAbout: function () {\n $(\"#dialogAbout\").dialog(\"open\");\n },\n goget: function () {\n menu.saveAllFiles();\n\n var currentPath = editors.getCurrentPath();\n if (!currentPath) {\n return false;\n }\n\n if ($(\".menu li.go-get\").hasClass(\"disabled\")) {\n return false;\n }\n\n var request = newWideRequest();\n request.file = currentPath;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/go/get',\n data: JSON.stringify(request),\n dataType: \"json\",\n beforeSend: function () {\n bottomGroup.resetOutput();\n },\n success: function (result) {\n }\n });\n },\n goinstall: function () {\n menu.saveAllFiles();\n\n var currentPath = editors.getCurrentPath();\n if (!currentPath) {\n return false;\n }\n\n if ($(\".menu li.go-install\").hasClass(\"disabled\")) {\n return false;\n }\n\n var request = newWideRequest();\n request.file = currentPath;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/go/install',\n data: JSON.stringify(request),\n dataType: \"json\",\n beforeSend: function () {\n bottomGroup.resetOutput();\n },\n success: function (result) {\n }\n });\n },\n // go test.\n test: function () {\n menu.saveAllFiles();\n\n var currentPath = editors.getCurrentPath();\n if (!currentPath) {\n return false;\n }\n\n if ($(\".menu li.go-test\").hasClass(\"disabled\")) {\n return false;\n }\n\n var request = newWideRequest();\n request.file = currentPath;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/go/test',\n data: JSON.stringify(request),\n dataType: \"json\",\n beforeSend: function () {\n bottomGroup.resetOutput();\n },\n success: function (result) {\n }\n });\n },\n // go vet.\n govet: function () {\n menu.saveAllFiles();\n\n var currentPath = editors.getCurrentPath();\n if (!currentPath) {\n return false;\n }\n\n if ($(\".menu li.go-vet\").hasClass(\"disabled\")) {\n return false;\n }\n\n var request = newWideRequest();\n request.file = currentPath;\n\n $.ajax({\n type: 'POST',\n url: config.context + '/go/vet',\n data: JSON.stringify(request),\n dataType: \"json\",\n beforeSend: function () {\n bottomGroup.resetOutput();\n },\n success: function (result) {\n }\n });\n },\n // Build & Run.\n run: function () {\n menu.saveAllFiles();\n\n if ($(\"#buildRun\").hasClass(\"ico-stop\")) {\n wide.stop();\n return false;\n }\n\n var currentPath = editors.getCurrentPath();\n if (!currentPath) {\n return false;\n }\n\n if ($(\".menu li.run\").hasClass(\"disabled\")) {\n return false;\n }\n\n var request = newWideRequest();\n request.file = currentPath;\n request.code = wide.curEditor.getValue();\n request.nextCmd = \"run\";\n\n $.ajax({\n type: 'POST',\n url: config.context + '/build',\n data: JSON.stringify(request),\n dataType: \"json\",\n beforeSend: function () {\n bottomGroup.resetOutput();\n\n $(\"#buildRun\").addClass(\"ico-stop\")\n .removeClass(\"ico-buildrun\").attr(\"title\", config.label.stop);\n },\n success: function (result) {\n }\n });\n },\n // Build.\n build: function () {\n menu.saveAllFiles();\n\n var currentPath = editors.getCurrentPath();\n if (!currentPath) {\n return false;\n }\n\n if ($(\".menu li.build\").hasClass(\"disabled\")) {\n return false;\n }\n\n var request = newWideRequest();\n request.file = currentPath;\n request.code = wide.curEditor.getValue();\n request.nextCmd = \"\"; // build only, no following operation\n\n $.ajax({\n type: 'POST',\n url: config.context + '/build',\n data: JSON.stringify(request),\n dataType: \"json\",\n beforeSend: function () {\n bottomGroup.resetOutput();\n },\n success: function (result) {\n }\n });\n },\n _initPreference: function () {\n $(\"#dialogPreference\").load(config.context + '/preference', function () {\n $(\"#dialogPreference input\").keyup(function () {\n var isChange = false,\n emptys = [],\n emptysTip = '';\n $(\"#dialogPreference input\").each(function () {\n var $it = $(this);\n // data-value 如为数字,则不会和 value 一样转换为 String,再次不使用全等\n if ($it.val() != $it.data(\"value\")) {\n isChange = true;\n }\n\n if ($.trim($it.val()) === '') {\n emptys.push($it);\n }\n });\n\n var $okBtn = $(\"#dialogPreference\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\");\n if (isChange) {\n $okBtn.prop(\"disabled\", false);\n } else {\n $okBtn.prop(\"disabled\", true);\n }\n\n if (emptys.length === 0) {\n $(\"#dialogPreference\").find(\".tip\").html(\"\");\n $okBtn.prop(\"disabled\", false);\n } else {\n for (var i = 0, max = emptys.length; i < max; i++) {\n var tabIndex = emptys[i].closest('div').data(\"index\"),\n text = $.trim(emptys[i].parent().text());\n emptysTip += '[' + $('#dialogPreference .tabs > div[data-index=\"' + tabIndex + '\"]').text()\n + '] -> [' + text.substr(0, text.length - 1)\n + ']: ' + config.label.no_empty + \"
    \";\n }\n $(\"#dialogPreference\").find(\".tip\").html(emptysTip);\n $okBtn.prop(\"disabled\", true);\n }\n });\n\n $(\"#dialogPreference select\").on(\"change\", function () {\n var isChange = false;\n $(\"#dialogPreference select\").each(function () {\n if ($(this).val() !== $(this).data(\"value\")) {\n isChange = true;\n }\n });\n\n var $okBtn = $(\"#dialogPreference\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\");\n if (isChange) {\n $okBtn.prop(\"disabled\", false);\n } else {\n $okBtn.prop(\"disabled\", true);\n }\n });\n\n $(\"#dialogPreference\").dialog({\n \"modal\": true,\n \"height\": 280,\n \"width\": 800,\n \"title\": config.label.preference,\n \"okText\": config.label.apply,\n \"cancelText\": config.label.cancel,\n \"afterOpen\": function () {\n var $okBtn = $(\"#dialogPreference\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\");\n $okBtn.prop(\"disabled\", true);\n },\n \"ok\": function () {\n var request = newWideRequest(),\n $dialogPreference = $(\"#dialogPreference\"),\n $fontFamily = $dialogPreference.find(\"input[name=fontFamily]\"),\n $fontSize = $dialogPreference.find(\"input[name=fontSize]\"),\n $goFmt = $dialogPreference.find(\"select[name=goFmt]\"),\n $GoBuildArgsForLinux = $dialogPreference.find(\"input[name=GoBuildArgsForLinux]\"),\n $GoBuildArgsForWindows = $dialogPreference.find(\"input[name=GoBuildArgsForWindows]\"),\n $GoBuildArgsForDarwin = $dialogPreference.find(\"input[name=GoBuildArgsForDarwin]\"),\n $workspace = $dialogPreference.find(\"input[name=workspace]\"),\n $password = $dialogPreference.find(\"input[name=password]\"),\n $email = $dialogPreference.find(\"input[name=email]\"),\n $locale = $dialogPreference.find(\"select[name=locale]\"),\n $theme = $dialogPreference.find(\"select[name=theme]\"),\n $editorFontFamily = $dialogPreference.find(\"input[name=editorFontFamily]\"),\n $editorFontSize = $dialogPreference.find(\"input[name=editorFontSize]\"),\n $editorLineHeight = $dialogPreference.find(\"input[name=editorLineHeight]\"),\n $editorTheme = $dialogPreference.find(\"select[name=editorTheme]\"),\n $editorTabSize = $dialogPreference.find(\"input[name=editorTabSize]\"),\n $keymap = $dialogPreference.find(\"select[name=keymap]\");\n\n $.extend(request, {\n \"fontFamily\": $fontFamily.val(),\n \"fontSize\": $fontSize.val(),\n \"goFmt\": $goFmt.val(),\n \"GoBuildArgsForLinux\": $GoBuildArgsForLinux.val(),\n \"GoBuildArgsForWindows\": $GoBuildArgsForWindows.val(),\n \"GoBuildArgsForDarwin\": $GoBuildArgsForDarwin.val(),\n \"workspace\": $workspace.val(),\n \"password\": $password.val(),\n \"email\": $email.val(),\n \"locale\": $locale.val(),\n \"theme\": $theme.val(),\n \"editorFontFamily\": $editorFontFamily.val(),\n \"editorFontSize\": $editorFontSize.val(),\n \"editorLineHeight\": $editorLineHeight.val(),\n \"editorTheme\": $editorTheme.val(),\n \"editorTabSize\": $editorTabSize.val(),\n \"keymap\": $keymap.val()\n });\n\n if (config.keymap !== $keymap.val()) {\n window.location.reload();\n }\n\n $.ajax({\n type: 'POST',\n url: config.context + '/preference',\n data: JSON.stringify(request),\n success: function (result, textStatus, jqXHR) {\n if (!result.succ) {\n return false;\n }\n\n $fontFamily.data(\"value\", $fontFamily.val());\n $fontSize.data(\"value\", $fontSize.val());\n $goFmt.data(\"value\", $goFmt.val());\n $GoBuildArgsForLinux.data(\"value\", $GoBuildArgsForLinux.val());\n $GoBuildArgsForWindows.data(\"value\", $GoBuildArgsForWindows.val());\n $GoBuildArgsForDarwin.data(\"value\", $GoBuildArgsForDarwin.val());\n $workspace.data(\"value\", $workspace.val());\n $password.data(\"value\", $password.val());\n $email.data(\"value\", $email.val());\n $locale.data(\"value\", $locale.val());\n $theme.data(\"value\", $theme.val());\n $editorFontFamily.data(\"value\", $editorFontFamily.val());\n $editorFontSize.data(\"value\", $editorFontSize.val());\n $editorLineHeight.data(\"value\", $editorLineHeight.val());\n $editorTheme.data(\"value\", $editorTheme.val());\n $editorTabSize.data(\"value\", $editorTabSize.val());\n $keymap.data(\"value\", $keymap.val());\n\n // update the config\n config.keymap = $keymap.val();\n\n var $okBtn = $(\"#dialogPreference\").closest(\".dialog-main\").find(\".dialog-footer > button:eq(0)\");\n $okBtn.prop(\"disabled\", true);\n\n $(\"#themesLink\").attr(\"href\", config.staticServer + '/static/css/themes/' + $theme.val() + '.css');\n\n config.editorTheme = $editorTheme.val();\n for (var i = 0, ii = editors.data.length; i < ii; i++) {\n editors.data[i].editor.setOption(\"theme\", $editorTheme.val());\n }\n }\n });\n }\n });\n\n new Tabs({\n id: \".preference\"\n });\n });\n }\n};\n","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file windows.js\n *\n * @author Liyuan Li\n * @author Liang Ding\n * @version 1.1.2.2, Feb 16, 2016\n */\nvar windows = {\n isMaxEditor: false,\n outerLayout: {},\n innerLayout: {},\n init: function () {\n if (!config.latestSessionContent) {\n config.latestSessionContent = {\n \"fileTree\": [],\n \"files\": [],\n \"currentFile\": \"\",\n };\n }\n \n if (!config.latestSessionContent.layout) {\n config.latestSessionContent.layout = {\n \"side\": {\n \"size\": 200,\n \"state\": 'normal'\n },\n \"sideRight\": {\n \"size\": 200,\n \"state\": 'normal'\n },\n \"bottom\": {\n \"size\": 100,\n \"state\": 'normal'\n }\n };\n }\n\n var layout = config.latestSessionContent.layout;\n\n this.outerLayout = $('body').layout({\n north__paneSelector: \".menu\",\n center__paneSelector: \".content\",\n south__paneSelector: \".footer\",\n north__size: 22,\n south__size: 19,\n spacing_open: 2,\n north__spacing_open: 0,\n south__spacing_open: 0,\n defaults: {\n fxSpeed_open: 300,\n fxSpeed_close: 100,\n fxSettings_close: {\n easing: \"easeOutQuint\"\n },\n fxSettings_open: {\n easing: \"easeInQuint\"\n }\n },\n west: {\n size: layout.side.size,\n paneSelector: \".side\",\n togglerLength_open: 0,\n togglerLength_closed: 15,\n togglerAlign_closed: \"top\",\n slideTrigger_open: \"mouseover\",\n spacing_closed: 15,\n minSize: 100,\n togglerClass: \"ico-restore\",\n togglerTip_open: config.label.min,\n togglerTip_closed: config.label.restore_side,\n resizerTip: config.label.resize,\n initClosed: (layout.side.state === 'min')\n }\n });\n\n this.innerLayout = $('div.content').layout({\n spacing_open: 2,\n defaults: {\n fxSpeed_open: 300,\n fxSpeed_close: 100,\n fxSettings_close: {\n easing: \"easeOutQuint\"\n },\n fxSettings_open: {\n easing: \"easeInQuint\"\n }\n },\n center: {\n paneSelector: \".edit-panel\"\n },\n east: {\n size: layout.sideRight.size,\n paneSelector: \".side-right\",\n togglerLength_open: 0,\n togglerLength_closed: 15,\n togglerAlign_closed: \"top\",\n slideTrigger_open: \"mouseover\",\n spacing_closed: 15,\n minSize: 100,\n togglerClass: \"ico-restore\",\n togglerTip_open: config.label.min,\n togglerTip_closed: config.label.restore_outline,\n resizerTip: config.label.resize,\n initClosed: (layout.sideRight.state === 'min')\n },\n south: {\n size: layout.bottom.size,\n paneSelector: \".bottom-window-group\",\n togglerLength_open: 0,\n togglerLength_closed: 15,\n togglerAlign_closed: \"top\",\n slideTrigger_open: \"mouseover\",\n spacing_closed: 16,\n minSize: 100,\n togglerClass: \"ico-restore\",\n togglerTip_open: config.label.min,\n togglerTip_closed: config.label.restore_bottom,\n resizerTip: config.label.resize,\n initClosed: (layout.bottom.state === 'min'),\n ondrag_end: function (type, pane) {\n windows.refreshEditor(pane, 'drag');\n },\n onresize_end: function (type, pane) {\n windows.refreshEditor(pane, 'resize');\n },\n onclose_end: function (type, pane) {\n windows.refreshEditor(pane, 'close');\n },\n onopen_end: function (type, pane) {\n windows.refreshEditor(pane, 'open');\n },\n onshow_end: function (type, pane) {\n windows.refreshEditor(pane, 'show');\n }\n }\n });\n\n this.outerLayout.addCloseBtn(\".side .ico-min\", \"west\");\n this.innerLayout.addCloseBtn(\".side-right .ico-min\", \"east\");\n this.innerLayout.addCloseBtn(\".bottom-window-group .ico-min\", \"south\");\n\n if (layout.side.state === 'max') {\n windows.maxSide();\n }\n if (layout.sideRight.state === 'max') {\n windows.maxSideRight();\n }\n if (layout.bottom.state === 'max') {\n windows.maxBottom();\n }\n\n $(\".toolbars .ico-max\").click(function () {\n windows.toggleEditor();\n });\n\n $(\".edit-panel .tabs\").on(\"dblclick\", function () {\n windows.toggleEditor();\n });\n\n $(\".bottom-window-group .tabs\").dblclick(function () {\n var $it = $(\".bottom-window-group\");\n if ($it.hasClass(\"bottom-window-group-max\")) {\n windows.restoreBottom();\n } else {\n windows.maxBottom($it);\n }\n });\n\n $(\".side .tabs\").dblclick(function () {\n var $it = $(\".side\");\n if ($it.hasClass(\"side-max\")) {\n windows.restoreSide();\n } else {\n windows.restoreSide($it);\n }\n });\n\n $(\".side-right .tabs\").dblclick(function () {\n var $it = $(\".side-right\");\n if ($it.hasClass(\"side-right-max\")) {\n windows.restoreSideRight();\n } else {\n windows.maxSideRight($it);\n }\n });\n\n $('.bottom-window-group .search').height($('.bottom-window-group .tabs-panel').height());\n $(window).resize(function () {\n windows.refreshEditor($('.bottom-window-group'));\n });\n\n },\n maxEditor: function () {\n var $it = $(\".toolbars .font-ico\");\n windows.outerLayout.close('west');\n windows.innerLayout.close('south');\n windows.innerLayout.close('east');\n $it.removeClass('ico-max').addClass('ico-restore').attr('title', config.label.min);\n windows.isMaxEditor = true;\n },\n maxBottom: function ($it) {\n $it.data('height', $it.height()).addClass(\"bottom-window-group-max\").find('.ico-min').hide();\n windows.outerLayout.hide('west');\n windows.innerLayout.hide('east');\n windows.innerLayout.sizePane('south', $('.content').height());\n },\n maxSide: function ($it) {\n $it.data('width', $it.width()).addClass(\"side-max\").find('.ico-min').hide();\n $('.content').hide();\n windows.outerLayout.sizePane('west', $('body').width());\n },\n maxSideRight: function ($it) {\n $it.addClass(\"side-right-max\").data('width', $it.width()).find('.ico-min').hide();\n windows.outerLayout.hide('west');\n windows.innerLayout.hide('south');\n windows.innerLayout.sizePane('east', $('body').width());\n },\n toggleEditor: function () {\n var $it = $(\".toolbars .font-ico\");\n if ($it.hasClass('ico-restore')) {\n windows.restoreEditor();\n } else {\n windows.maxEditor();\n }\n },\n restoreBottom: function () {\n var $it = $(\".bottom-window-group\");\n $it.removeClass(\"bottom-window-group-max\").find('.ico-min').show();\n windows.outerLayout.show('west');\n windows.innerLayout.show('east');\n windows.innerLayout.sizePane('south', $it.data('height'));\n },\n restoreSide: function () {\n var $it = $(\".side\");\n $it.removeClass(\"side-max\").find('.ico-min').show();\n $('.content').show();\n windows.outerLayout.sizePane('west', $it.data('width'));\n },\n restoreSideRight: function () {\n var $it = $(\".side-right\");\n $it.removeClass(\"side-right-max\").find('.ico-min').show();\n windows.outerLayout.show('west');\n windows.innerLayout.show('south');\n windows.innerLayout.sizePane('east', $it.data('width'));\n },\n restoreEditor: function () {\n windows.outerLayout.open('west');\n windows.innerLayout.open('south');\n windows.innerLayout.open('east');\n windows.isMaxEditor = false;\n $(\".toolbars .font-ico\").addClass('ico-max').removeClass('ico-restore').attr('title', config.label.max_editor);\n },\n refreshEditor: function (pane, type) {\n var editorDatas = editors.data,\n height = $('.content').height() - pane.height() - 24;\n switch (type) {\n case 'close':\n height = $('.content').height() - 40;\n break;\n default:\n break;\n }\n for (var i = 0, ii = editorDatas.length; i < ii; i++) {\n editorDatas[i].editor.setSize(\"100%\", height);\n }\n\n $('.bottom-window-group .search').height($('.bottom-window-group .tabs-panel').height());\n },\n flowBottom: function () {\n if (windows.innerLayout.south.state.isClosed) {\n windows.innerLayout.slideOpen('south');\n }\n }\n};","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file hotkeys.js\n *\n * @author Liyuan Li\n * @author Liang Ding\n * @version 1.0.0.2, Dec 15, 2015\n */\nvar hotkeys = {\n defaultKeyMap: {\n // Ctrl-0\n goEditor: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 48,\n fun: function () {\n if (wide.curEditor) {\n wide.curEditor.focus();\n }\n }\n },\n // Ctrl-1\n goFileTree: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 49,\n fun: function () {\n // 有些元素需设置 tabindex 为 -1 时才可以 focus\n if (windows.outerLayout.west.state.isClosed) {\n windows.outerLayout.slideOpen('west');\n }\n $(\"#files\").focus();\n }\n },\n // Ctrl-2\n goOutline: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 50,\n fun: function () {\n if (windows.innerLayout.east.state.isClosed) {\n windows.innerLayout.slideOpen('east');\n }\n\n $(\"#outline\").focus();\n }\n },\n // Ctrl-4\n goOutput: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 52,\n fun: function () {\n bottomGroup.tabs.setCurrent(\"output\");\n windows.flowBottom();\n $(\".bottom-window-group .output\").focus();\n }\n },\n // Ctrl-5\n goSearch: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 53,\n fun: function () {\n bottomGroup.tabs.setCurrent(\"search\");\n windows.flowBottom();\n $(\".bottom-window-group .search\").focus();\n }\n },\n // Ctrl-6\n goNotification: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 54,\n fun: function () {\n bottomGroup.tabs.setCurrent(\"notification\");\n windows.flowBottom();\n $(\".bottom-window-group .notification\").focus();\n }\n },\n // Alt-C\n clearWindow: {\n ctrlKey: false,\n altKey: true,\n shiftKey: false,\n which: 67\n },\n // Ctrl-D 窗口组切换 \n changeEditor: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 68\n },\n // Ctrl-F search \n search: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 70\n },\n // Ctrl-Q close current editor \n closeCurEditor: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 81\n },\n // Ctrl-R\n rename: {\n ctrlKey: true,\n altKey: false,\n shiftKey: false,\n which: 82\n },\n // Shift-Alt-O 跳转到文件\n goFile: {\n ctrlKey: false,\n altKey: true,\n shiftKey: true,\n which: 79\n },\n // F5 Build\n build: {\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n which: 116\n },\n // F6 Build & Run\n buildRun: {\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n which: 117\n }\n },\n bindList: function ($source, $list, enterFun) {\n $list.data(\"index\", 0);\n $source.keydown(function (event) {\n var index = $list.data(\"index\"),\n count = $list.find(\"li\").length;\n\n if (count === 0) {\n return true;\n }\n\n if (event.which === 38) { // up\n index--;\n if (index < 0) {\n index = count - 1;\n }\n }\n\n if (event.which === 40) { // down\n index++;\n if (index > count - 1) {\n index = 0;\n }\n }\n\n var $selected = $list.find(\"li:eq(\" + index + \")\");\n\n if (event.which === 13) { // enter\n enterFun($selected);\n }\n\n $list.find(\"li\").removeClass(\"selected\");\n $list.data(\"index\", index);\n $selected.addClass(\"selected\");\n\n if (index === 0) {\n $list.scrollTop(0);\n } else {\n if ($selected[0].offsetTop + $list.scrollTop() > $list.height()) {\n if (event.which === 40) {\n $list.scrollTop($list.scrollTop() + $selected.height());\n } else {\n $list.scrollTop($selected[0].offsetTop);\n }\n } else {\n $list.scrollTop(0);\n }\n }\n\n // 阻止上下键改变光标位置\n if (event.which === 38 || event.which === 40 || event.which === 13) {\n return false;\n }\n });\n },\n _bindOutput: function () {\n $(\".bottom-window-group .output\").keydown(function (event) {\n var hotKeys = hotkeys.defaultKeyMap;\n if (event.altKey === hotKeys.clearWindow.altKey\n && event.which === hotKeys.clearWindow.which) { // Alt-C clear output\n bottomGroup.clear('output');\n\n event.preventDefault();\n\n return;\n }\n });\n },\n _bindFileTree: function () {\n $(\"#files\").keydown(function (event) {\n event.preventDefault();\n\n var hotKeys = hotkeys.defaultKeyMap;\n if (event.ctrlKey === hotKeys.search.ctrlKey\n && event.which === hotKeys.search.which) { // Ctrl-F 搜索\n $(\"#dialogSearchForm\").dialog(\"open\");\n return;\n }\n\n if (event.ctrlKey === hotKeys.rename.ctrlKey\n && event.which === hotKeys.rename.which) { // Ctrl-R 重命名\n if (wide.curNode.removable) {\n $(\"#dialogRenamePrompt\").dialog(\"open\");\n }\n return;\n }\n\n switch (event.which) {\n case 46: // delete\n tree.removeIt();\n break;\n case 13: // enter\n if (!wide.curNode) {\n return false;\n }\n\n if (tree.isDir()) {\n if (wide.curNode.open) {\n return false;\n }\n\n tree.fileTree.expandNode(wide.curNode, true, false, true);\n $(\"#files\").focus();\n\n break;\n }\n\n tree.openFile(wide.curNode);\n\n break;\n case 38: // up\n var node = {};\n\n if (!wide.curNode) { // select the first one if no node been selected\n node = tree.fileTree.getNodeByTId(\"files_1\");\n } else {\n if (wide.curNode && wide.curNode.isFirstNode && wide.curNode.level === 0) {\n return false;\n }\n\n node = wide.curNode.getPreNode();\n if (wide.curNode.isFirstNode && wide.curNode.getParentNode()) {\n node = wide.curNode.getParentNode();\n }\n\n var preNode = wide.curNode.getPreNode();\n if (preNode && tree.isDir() && preNode.open) {\n node = tree.getCurrentNodeLastNode(preNode);\n }\n }\n\n wide.curNode = node;\n tree.fileTree.selectNode(node);\n $(\"#files\").focus();\n break;\n case 40: // down\n var node = {};\n\n if (!wide.curNode) { // select the first one if no node been selected \n node = tree.fileTree.getNodeByTId(\"files_1\");\n } else {\n if (wide.curNode && tree.isBottomNode(wide.curNode)) {\n return false;\n }\n\n node = wide.curNode.getNextNode();\n if (tree.isDir() && wide.curNode.open) {\n node = wide.curNode.children[0];\n }\n\n var nextShowNode = tree.getNextShowNode(wide.curNode);\n if (wide.curNode.isLastNode && wide.curNode.level !== 0 && !wide.curNode.open && nextShowNode) {\n node = nextShowNode;\n }\n }\n\n if (node) {\n wide.curNode = node;\n tree.fileTree.selectNode(node);\n }\n\n $(\"#files\").focus();\n break;\n case 37: // left\n if (!wide.curNode) {\n wide.curNode = tree.fileTree.getNodeByTId(\"files_1\");\n tree.fileTree.selectNode(wide.curNode);\n $(\"#files\").focus();\n return false;\n }\n\n if (!tree.isDir() || !wide.curNode.open) {\n return false;\n }\n\n tree.fileTree.expandNode(wide.curNode, false, false, true);\n $(\"#files\").focus();\n break;\n case 39: // right\n if (!wide.curNode) {\n wide.curNode = tree.fileTree.getNodeByTId(\"files_1\");\n tree.fileTree.selectNode(wide.curNode);\n $(\"#files\").focus();\n return false;\n }\n\n if (!tree.isDir() || wide.curNode.open) {\n return false;\n }\n\n tree.fileTree.expandNode(wide.curNode, true, false, true);\n $(\"#files\").focus();\n\n break;\n case 116: // F5\n if (!wide.curNode || !tree.isDir()) {\n return false;\n }\n\n tree.refresh(wide.curNode);\n\n break;\n }\n });\n },\n _bindDocument: function () {\n var hotKeys = this.defaultKeyMap;\n $(document).keydown(function (event) {\n if (event.ctrlKey === hotKeys.goEditor.ctrlKey\n && event.which === hotKeys.goEditor.which) { // Ctrl-0 焦点切换到当前编辑器\n hotKeys.goEditor.fun();\n event.preventDefault();\n\n return;\n }\n\n if (event.ctrlKey === hotKeys.goFileTree.ctrlKey\n && event.which === hotKeys.goFileTree.which) { // Ctrl-1 焦点切换到文件树\n hotKeys.goFileTree.fun();\n event.preventDefault();\n\n return;\n }\n\n if (event.ctrlKey === hotKeys.goOutline.ctrlKey\n && event.which === hotKeys.goOutline.which) { // Ctrl-2 焦点切换到大纲\n hotKeys.goOutline.fun();\n event.preventDefault();\n\n return;\n }\n\n if (event.ctrlKey === hotKeys.goOutput.ctrlKey\n && event.which === hotKeys.goOutput.which) { // Ctrl-4 焦点切换到输出窗口 \n hotKeys.goOutput.fun();\n event.preventDefault();\n\n return;\n }\n\n if (event.ctrlKey === hotKeys.goSearch.ctrlKey\n && event.which === hotKeys.goSearch.which) { // Ctrl-5 焦点切换到搜索窗口 \n hotKeys.goSearch.fun();\n event.preventDefault();\n\n return;\n }\n\n if (event.ctrlKey === hotKeys.goNotification.ctrlKey\n && event.which === hotKeys.goNotification.which) { // Ctrl-6 焦点切换到通知窗口 \n hotKeys.goNotification.fun();\n event.preventDefault();\n\n return;\n }\n\n if (event.ctrlKey === hotKeys.closeCurEditor.ctrlKey\n && event.which === hotKeys.closeCurEditor.which) { // Ctrl-Q 关闭当前编辑器 \n $(\".edit-panel .tabs > div.current\").find(\".ico-close\").click();\n event.preventDefault();\n\n return;\n }\n\n if (event.ctrlKey === hotKeys.changeEditor.ctrlKey\n && event.which === hotKeys.changeEditor.which) { // Ctrl-D 窗口组切换\n if (document.activeElement.className === \"notification\"\n || document.activeElement.className === \"output\"\n || document.activeElement.className === \"search\") {\n // 焦点在底部窗口组时,对底部进行切换\n var tabs = [\"output\", \"search\", \"notification\"],\n nextPath = \"\";\n for (var i = 0, ii = tabs.length; i < ii; i++) {\n if (bottomGroup.tabs.getCurrentId() === tabs[i]) {\n if (i < ii - 1) {\n nextPath = tabs[i + 1];\n } else {\n nextPath = tabs[0];\n }\n break;\n }\n }\n bottomGroup.tabs.setCurrent(nextPath);\n $(\".bottom-window-group .\" + nextPath).focus();\n\n event.preventDefault();\n\n return false;\n }\n\n if (editors.data.length > 1) {\n var nextPath = \"\";\n for (var i = 0, ii = editors.data.length; i < ii; i++) {\n var currentId = editors.getCurrentId();\n if (currentId) {\n if (currentId === editors.data[i].id) {\n if (i < ii - 1) {\n nextPath = editors.data[i + 1].id;\n wide.curEditor = editors.data[i + 1].editor;\n } else {\n nextPath = editors.data[0].id;\n wide.curEditor = editors.data[0].editor;\n }\n break;\n }\n }\n }\n\n editors.tabs.setCurrent(nextPath);\n var nextTId = tree.getTIdByPath(nextPath);\n wide.curNode = tree.fileTree.getNodeByTId(nextTId);\n\n tree.fileTree.selectNode(wide.curNode);\n wide.refreshOutline();\n var cursor = wide.curEditor.getCursor();\n $(\".footer .cursor\").text('| ' + (cursor.line + 1) + ':' + (cursor.ch + 1) + ' |');\n wide.curEditor.focus();\n }\n\n event.preventDefault();\n\n return false;\n }\n\n if (event.which === hotKeys.build.which) { // F5 Build\n menu.build();\n event.preventDefault();\n\n return;\n }\n\n if (event.which === hotKeys.buildRun.which) { // F6 Build & Run\n menu.run();\n event.preventDefault();\n\n return;\n }\n\n if (event.ctrlKey === hotKeys.goFile.ctrlKey\n && event.altKey === hotKeys.goFile.altKey\n && event.shiftKey === hotKeys.goFile.shiftKey\n && event.which === hotKeys.goFile.which) { // Shift-Alt-O 跳转到文件\n $(\"#dialogGoFilePrompt\").dialog(\"open\");\n }\n });\n },\n init: function () {\n this._bindFileTree();\n this._bindOutput();\n this._bindDocument();\n }\n};","/*\n * Copyright (c) 2014-2017, b3log.org & hacpai.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * @file bottomGroup.js\n *\n * @author Liyuan Li\n * @author Liang Ding\n * @version 1.1.1.1, Mar 15, 2017\n */\nvar bottomGroup = {\n tabs: undefined,\n searchTab: undefined,\n init: function () {\n this._initTabs();\n this._initFrame();\n\n $('.bottom-window-group .output').click(function () {\n $(this).focus();\n });\n\n $('.bottom-window-group .output').on('click', '.path', function (event) {\n var $path = $(this),\n tId = tree.getTIdByPath($path.data(\"path\"));\n tree.openFile(tree.fileTree.getNodeByTId(tId),\n CodeMirror.Pos($path.data(\"line\") - 1, $path.data(\"column\") - 1));\n event.preventDefault();\n return false;\n });\n },\n _initFrame: function () {\n $(\".bottom-window-group .output\").parent().mouseup(function (event) {\n event.stopPropagation();\n\n if (event.button === 0) { // 左键\n $(\".bottom-window-group .frame\").hide();\n return;\n }\n\n // event.button === 2 右键\n var left = event.screenX,\n $it = $(this);\n if ($(\".side\").css(\"left\") === \"auto\" || $(\".side\").css(\"left\") === \"0px\") {\n left = event.screenX - $(\".side\").width();\n }\n $(\".bottom-window-group .frame\").show().css({\n \"left\": left + \"px\",\n \"top\": (event.offsetY + event.target.offsetTop - $it.scrollTop() - 10) + \"px\"\n });\n return;\n });\n },\n clear: function (id) {\n $('.bottom-window-group .' + id + ' > div').text('');\n },\n resetOutput: function () {\n this.clear('output');\n bottomGroup.tabs.setCurrent(\"output\");\n windows.flowBottom();\n },\n _initTabs: function () {\n this.tabs = new Tabs({\n id: \".bottom-window-group\",\n clickAfter: function (id) {\n this._$tabsPanel.find(\".\" + id).focus();\n }\n });\n },\n fillOutput: function (data) {\n var $output = $('.bottom-window-group .output');\n\n data = data.replace(/\\r/g, '');\n data = data.replace(/\\n/g, '
    ');\n\n if (-1 !== data.indexOf(\"
    \")) {\n data = Autolinker.link(data);\n }\n\n $output.find(\"div\").html(data);\n $output.parent().scrollTop($output[0].scrollHeight);\n }\n};\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/static/js/windows.js b/static/js/windows.js index a7d97fa..9189a11 100644 --- a/static/js/windows.js +++ b/static/js/windows.js @@ -5,7 +5,7 @@ * 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 + * https://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, diff --git a/util/file.go b/util/file.go index 9136281..e25ead8 100644 --- a/util/file.go +++ b/util/file.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/util/file_test.go b/util/file_test.go index 8e9a28f..f909d45 100644 --- a/util/file_test.go +++ b/util/file_test.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/util/go.go b/util/go.go index b0d3caf..12166e2 100644 --- a/util/go.go +++ b/util/go.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/util/go_test.go b/util/go_test.go index 591f204..bb4c9d2 100644 --- a/util/go_test.go +++ b/util/go_test.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/util/net.go b/util/net.go index 02ee26b..2c22cbc 100644 --- a/util/net.go +++ b/util/net.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/util/net_test.go b/util/net_test.go index 9418f9d..36235bd 100644 --- a/util/net_test.go +++ b/util/net_test.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/util/os.go b/util/os.go index cc8428f..afdeefa 100644 --- a/util/os.go +++ b/util/os.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/util/os_test.go b/util/os_test.go index 868a54b..bb1df18 100644 --- a/util/os_test.go +++ b/util/os_test.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/util/panic.go b/util/panic.go index 9b498e8..12f53a8 100644 --- a/util/panic.go +++ b/util/panic.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/util/panic_test.go b/util/panic_test.go index 4d180c3..c6a5dd3 100644 --- a/util/panic_test.go +++ b/util/panic_test.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/util/rand.go b/util/rand.go index d9e9368..1b6d0a4 100644 --- a/util/rand.go +++ b/util/rand.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/util/rand_test.go b/util/rand_test.go index f6e2b39..baadcc1 100644 --- a/util/rand_test.go +++ b/util/rand_test.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/util/ret.go b/util/ret.go index a727c1d..36a4c55 100644 --- a/util/ret.go +++ b/util/ret.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/util/string.go b/util/string.go index d8f98ba..0428b95 100755 --- a/util/string.go +++ b/util/string.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/util/string_test.go b/util/string_test.go index 9350056..88024a0 100644 --- a/util/string_test.go +++ b/util/string_test.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/util/websocket.go b/util/websocket.go index 715bc5f..65c921a 100644 --- a/util/websocket.go +++ b/util/websocket.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/util/zip.go b/util/zip.go index 894d80e..d689a9d 100644 --- a/util/zip.go +++ b/util/zip.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/util/zip_test.go b/util/zip_test.go index 3567d2f..48ba273 100644 --- a/util/zip_test.go +++ b/util/zip_test.go @@ -4,7 +4,7 @@ // 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 +// https://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, diff --git a/views/about.html b/views/about.html index 4dcfb85..fae6b25 100644 --- a/views/about.html +++ b/views/about.html @@ -24,7 +24,7 @@ {{.gover}}, {{.goos}}_{{.goarch}}
    - b3log.org/donate.html + b3log.org/donate.html
    @@ -241,7 +241,7 @@ 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 + https://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, diff --git a/views/index.html b/views/index.html index a8fbbd5..fd2ac14 100644 --- a/views/index.html +++ b/views/index.html @@ -350,7 +350,7 @@ Playground
  • -
  • +
  • {{.i18n.pricing}}
  • diff --git a/views/login.html b/views/login.html index 8a07109..9980808 100644 --- a/views/login.html +++ b/views/login.html @@ -24,7 +24,7 @@
  • {{.i18n.download}}
  • {{.i18n.help}}
  • {{.i18n.issues}}
  • - +
  • @@ -47,7 +47,7 @@