Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
die_coolen_jungs
our_own_cloud_project
Commits
a7748c14
Commit
a7748c14
authored
13 years ago
by
Robin Appelman
Browse files
Options
Downloads
Patches
Plain Diff
dont need the ok button for renaming
parent
224dbed7
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
files/css/files.css
+1
-0
1 addition, 0 deletions
files/css/files.css
files/js/fileactions.js
+4
-0
4 additions, 0 deletions
files/js/fileactions.js
files/js/filelist.js
+3
-3
3 additions, 3 deletions
files/js/filelist.js
with
8 additions
and
3 deletions
files/css/files.css
+
1
−
0
View file @
a7748c14
...
...
@@ -27,6 +27,7 @@ table th#headerSize, table td.filesize { width:5em; padding:0 1em; text-align:ri
table
th
#headerDate
,
table
td
.date
{
width
:
10em
;
padding
:
0
.1em
0
1em
;
text-align
:
left
;
}
table
td
.selection
,
table
th
.selection
,
table
td
.fileaction
{
width
:
2em
;
text-align
:
center
;
}
table
td
.filename
a
.name
{
display
:
block
;
background-image
:
url('../img/file.png')
;
height
:
1.5em
;
vertical-align
:
middle
;
}
table
td
.filename
a
.name
input
,
table
td
.filename
a
.name
form
{
width
:
100%
}
table
td
.filename
a
,
table
td
.login
,
table
td
.logout
,
table
td
.download
,
table
td
.upload
,
table
td
.create
,
table
td
.delete
{
padding
:
.2em
.5em
.5em
3em
;
background-position
:
1em
.5em
;
background-repeat
:
no-repeat
;
}
table
td
.filename
.nametext
,
.modified
{
float
:
left
;
padding
:
.3em
0
;
}
table
td
.filename
.nametext
{
width
:
80%
;
}
...
...
This diff is collapsed.
Click to expand it.
files/js/fileactions.js
+
4
−
0
View file @
a7748c14
...
...
@@ -54,6 +54,10 @@ FileActions={
display
:
function
(
parent
){
FileActions
.
currentFile
=
parent
;
var
actions
=
FileActions
.
get
(
FileActions
.
getCurrentMimeType
(),
FileActions
.
getCurrentType
());
var
file
=
FileActions
.
getCurrentFile
();
if
(
$
(
'
tr[data-file="
'
+
file
+
'
"]
'
).
data
(
'
renaming
'
)){
return
;
}
var
defaultAction
=
FileActions
.
getDefault
(
FileActions
.
getCurrentMimeType
(),
FileActions
.
getCurrentType
());
for
(
name
in
actions
){
if
((
name
==
'
Download
'
||
actions
[
name
]
!=
defaultAction
)
&&
name
!=
'
Delete
'
){
...
...
This diff is collapsed.
Click to expand it.
files/js/filelist.js
+
3
−
3
View file @
a7748c14
...
...
@@ -105,18 +105,17 @@ FileList={
},
rename
:
function
(
name
){
var
tr
=
$
(
'
tr[data-file="
'
+
name
+
'
"]
'
);
tr
.
data
(
'
renaming
'
,
true
);
var
td
=
tr
.
children
(
'
td.filename
'
);
var
input
=
$
(
'
<input value=
'
+
name
+
'
class="filename"></input>
'
);
var
button
=
$
(
'
<input type="submit" value="Ok"></input>
'
);
var
form
=
$
(
'
<form action="#"></form>
'
)
form
.
append
(
input
);
form
.
append
(
button
);
td
.
children
(
'
a.name
'
).
text
(
''
);
td
.
children
(
'
a.name
'
).
append
(
form
)
input
.
focus
();
td
.
children
(
'
a.name
'
).
append
(
button
);
form
.
submit
(
function
(
event
){
var
newname
=
input
.
val
();
tr
.
data
(
'
renaming
'
,
false
);
event
.
stopPropagation
();
event
.
preventDefault
();
tr
.
attr
(
'
data-file
'
,
newname
);
...
...
@@ -140,6 +139,7 @@ FileList={
event
.
preventDefault
();
});
input
.
blur
(
function
(){
tr
.
data
(
'
renaming
'
,
false
);
td
.
children
(
'
a.name
'
).
empty
();
if
(
name
.
indexOf
(
'
.
'
)
>
0
){
basename
=
name
.
substr
(
0
,
name
.
indexOf
(
'
.
'
));
...
...
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