Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
621b3715
authored
Mar 07, 2013
by
Bence Dányi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webui: fix file sorting
fixes #86
parent
b7f905d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
one/static/script/store.js
+6
-7
No files found.
one/static/script/store.js
View file @
621b3715
...
@@ -35,11 +35,6 @@ var cloud = (function(cloud) {
...
@@ -35,11 +35,6 @@ var cloud = (function(cloud) {
},
self
);
},
self
);
self
.
sortBy
=
ko
.
observable
(
'name'
);
self
.
sortBy
=
ko
.
observable
(
'name'
);
$
(
'#current-location select'
).
on
(
'change'
,
function
()
{
self
.
sortBy
(
$
(
'#current-location select'
).
val
());
sortFiles
();
})
/**
/**
* Loads the parent folder
* Loads the parent folder
*/
*/
...
@@ -48,7 +43,7 @@ var cloud = (function(cloud) {
...
@@ -48,7 +43,7 @@ var cloud = (function(cloud) {
loadFolder
(
s
.
substr
(
0
,
s
.
substr
(
0
,
s
.
length
-
1
).
lastIndexOf
(
'/'
)
+
1
));
loadFolder
(
s
.
substr
(
0
,
s
.
substr
(
0
,
s
.
length
-
1
).
lastIndexOf
(
'/'
)
+
1
));
};
};
var
sortFiles
=
(
function
()
{
self
.
sortFiles
=
(
function
()
{
self
.
files
.
sort
({
self
.
files
.
sort
({
name
:
function
(
a
,
b
)
{
name
:
function
(
a
,
b
)
{
if
(
a
.
type
===
b
.
type
)
{
if
(
a
.
type
===
b
.
type
)
{
...
@@ -170,7 +165,7 @@ var cloud = (function(cloud) {
...
@@ -170,7 +165,7 @@ var cloud = (function(cloud) {
for
(
var
i
in
data
)
{
for
(
var
i
in
data
)
{
addFile
(
data
[
i
]);
addFile
(
data
[
i
]);
}
}
sortFiles
();
s
elf
.
s
ortFiles
();
}
}
/**
/**
...
@@ -528,6 +523,10 @@ var cloud = (function(cloud) {
...
@@ -528,6 +523,10 @@ var cloud = (function(cloud) {
$
(
'.key'
).
slideDown
(
700
);
$
(
'.key'
).
slideDown
(
700
);
$
(
'#keys'
).
slideUp
(
700
);
$
(
'#keys'
).
slideUp
(
700
);
});
});
$
(
'#current-location select'
).
on
(
'change'
,
function
()
{
model
.
sortBy
(
$
(
'#current-location select'
).
val
());
model
.
sortFiles
();
})
});
});
document
.
addEventListener
(
'dragenter'
,
function
(
e
)
{
document
.
addEventListener
(
'dragenter'
,
function
(
e
)
{
e
.
stopPropagation
();
e
.
stopPropagation
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment