Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
01eb0571
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
01eb0571
编写于
11月 14, 2016
作者:
C
Clement Ho
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Resolve MR review suggestions
上级
7f460919
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
21 deletion
+15
-21
app/assets/javascripts/filtered_search/filtered_search_bundle.js
...ets/javascripts/filtered_search/filtered_search_bundle.js
+0
-6
app/assets/javascripts/filtered_search/filtered_search_manager.js.es6
...avascripts/filtered_search/filtered_search_manager.js.es6
+14
-14
app/assets/javascripts/filtered_search/filtered_search_tokenizer.es6
...javascripts/filtered_search/filtered_search_tokenizer.es6
+1
-1
未找到文件。
app/assets/javascripts/filtered_search/filtered_search_bundle.js
浏览文件 @
01eb0571
/* eslint-disable */
// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
...
...
@@ -6,8 +5,3 @@
// the compiled file.
//
/*= require_tree . */
(
function
()
{
}).
call
(
this
);
\ No newline at end of file
app/assets/javascripts/filtered_search/filtered_search_manager.js.es6
浏览文件 @
01eb0571
...
...
@@ -18,22 +18,22 @@
param: 'name[]',
}];
function clearSearch(e
vent
) {
e
vent
.stopPropagation();
e
vent
.preventDefault();
function clearSearch(e) {
e.stopPropagation();
e.preventDefault();
document.querySelector('.filtered-search').value = '';
document.querySelector('.clear-search').classList.add('hidden');
}
function toggleClearSearchButton(e
vent
) {
function toggleClearSearchButton(e) {
const clearSearchButton = document.querySelector('.clear-search');
if (event.target.value) {
clearSearchButton.classList.remove('hidden');
} else {
clearSearchButton.classList.add('hidden');
}
clearSearchButton.classList.remove('hidden');
} else {
clearSearchButton.classList.add('hidden');
}
}
function loadSearchParamsFromURL() {
...
...
@@ -97,16 +97,16 @@
document.querySelector('.clear-search').addEventListener('click', clearSearch);
}
processInput(e
vent
) {
const input = e
vent
.target.value;
processInput(e) {
const input = e.target.value;
this.tokenizer.processTokens(input);
}
checkForEnter(e
vent
) {
checkForEnter(e) {
// Enter KeyCode
if (e
vent
.keyCode === 13) {
e
vent
.stopPropagation();
e
vent
.preventDefault();
if (e.keyCode === 13) {
e.stopPropagation();
e.preventDefault();
this.search();
}
}
...
...
app/assets/javascripts/filtered_search/filtered_search_tokenizer.es6
浏览文件 @
01eb0571
...
...
@@ -36,7 +36,7 @@
inputs.forEach((i) => {
if (incompleteToken) {
const prevToken = this.tokens
[this.tokens.length - 1]
;
const prevToken = this.tokens
.last()
;
prevToken.value += ` ${i}`;
// Remove last quotation
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录