Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
quassel-rest-search
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Janne Mareike Koschinski
quassel-rest-search
Commits
3c13286a
Commit
3c13286a
authored
8 years ago
by
Janne Mareike Koschinski
Browse files
Options
Downloads
Patches
Plain Diff
Fixed some minor UI issues
parent
94d28387
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
res/search.css
+3
-3
3 additions, 3 deletions
res/search.css
res/search.js
+25
-18
25 additions, 18 deletions
res/search.js
templates/search.phtml
+1
-0
1 addition, 0 deletions
templates/search.phtml
with
29 additions
and
21 deletions
res/search.css
+
3
−
3
View file @
3c13286a
...
...
@@ -91,7 +91,7 @@ nav {
right
:
0
;
top
:
0
;
height
:
56px
;
z-index
:
1
;
z-index
:
2
;
}
nav
.wrapper
{
...
...
@@ -159,7 +159,7 @@ nav input[type=text] {
}
#no_more
img
{
margin
:
8rem
auto
0
px
;
margin
:
8rem
auto
0
;
display
:
block
;
}
...
...
@@ -174,7 +174,7 @@ nav input[type=text] {
inline-button
{
display
:
block
;
background
:
rgb
(
255
,
255
,
255
)
none
repeat
scroll
0
%
0
%
;
background
:
rgb
(
255
,
255
,
255
)
none
repeat
scroll
0
0
;
font-size
:
16px
;
height
:
48px
;
line-height
:
48px
;
...
...
This diff is collapsed.
Click to expand it.
res/search.js
+
25
−
18
View file @
3c13286a
...
...
@@ -20,12 +20,8 @@ var get_history = function () {
var
wrap_click_handler
=
function
(
fun
)
{
return
function
(
event
)
{
var
sel
=
getSelection
().
toString
();
if
(
sel
)
{
event
.
stopPropagation
();
}
else
if
(
fun
)
{
fun
(
event
);
}
event
.
stopPropagation
();
fun
(
event
);
}
};
...
...
@@ -52,14 +48,6 @@ $("#q").keypress(function (e) {
}
});
$
(
"
body
"
).
click
(
function
(
e
)
{
open
[
open
.
length
-
1
](
e
);
});
$
(
"
nav
"
).
click
(
function
(
e
)
{
e
.
stopPropagation
();
});
$
(
"
#q
"
).
focus
(
function
(){
$
(
"
#autocomplete
"
).
addClass
(
"
active
"
);
$
(
"
#results
"
).
addClass
(
"
hidden
"
);
...
...
@@ -175,7 +163,9 @@ var attach_buffer = function (elem) {
e
.
stopPropagation
();
}));
buffers
[
id
].
contexts
.
forEach
(
function
(
context
)
{
attach_context
(
elem
.
find
(
"
#context
"
+
context
.
id
));
var
context
=
elem
.
find
(
"
#context
"
+
context
.
id
);
if
(
context
.
length
)
attach_context
(
context
);
})
};
...
...
@@ -239,6 +229,10 @@ var attach_context = function (elem) {
elem
.
unbind
();
var
id
=
elem
.
data
(
"
contextid
"
);
var
bufferid
=
elem
.
data
(
"
bufferid
"
);
if
(
buffers
[
bufferid
]
===
undefined
)
{
console
.
log
(
"
Undefined buffer:
"
+
bufferid
);
}
elem
.
click
(
wrap_click_handler
(
function
(
e
)
{
e
.
stopPropagation
();
}));
$
(
"
#message
"
+
buffers
[
bufferid
].
contexts
[
id
].
original
.
messageid
).
click
(
wrap_click_handler
(
make_toggle_context
(
bufferid
,
id
)));
elem
.
find
(
"
.load_before
"
).
click
(
wrap_click_handler
(
function
(
e
)
{
...
...
@@ -393,6 +387,7 @@ var make_toggle_buffer = function (id) {
var
select_buffer
=
function
(
id
)
{
deselect_buffers
(
id
);
open
.
push
(
make_toggle_buffer
(
id
));
buffers
[
id
].
selected
=
true
;
update_buffer
(
id
);
};
...
...
@@ -411,9 +406,10 @@ var make_toggle_context = function (buffer, id) {
open
.
pop
();
}
else
{
unselect_contexts
(
buffer
);
if
(
!
buffers
[
buffer
].
selected
)
if
(
!
buffers
[
buffer
].
selected
)
{
open
.
push
(
make_toggle_buffer
(
buffer
));
buffers
[
buffer
].
selected
=
true
;
buffers
[
buffer
].
selected
=
true
;
}
context
.
selected
=
true
;
open
.
push
(
make_toggle_context
(
buffer
,
id
));
if
(
context
.
before
.
length
===
0
)
earlier
(
buffer
,
id
,
5
);
...
...
@@ -462,4 +458,15 @@ var sort_messages = function (arr) {
});
};
update_history
();
\ No newline at end of file
update_history
();
$
(
"
body
"
).
click
(
function
(
e
)
{
if
(
open
.
length
)
open
[
open
.
length
-
1
](
e
);
});
$
(
"
nav
"
).
click
(
function
(
e
)
{
e
.
stopPropagation
();
});
\ No newline at end of file
This diff is collapsed.
Click to expand it.
templates/search.phtml
+
1
−
0
View file @
3c13286a
...
...
@@ -29,6 +29,7 @@
</section>
<div
id=
"modal-background"
></div>
<div
id=
"bg"
></div>
<script
src=
"https://code.jquery.com/jquery-2.2.0.min.js"
></script>
<script
src=
"res/search.js"
></script>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment