Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
98ed740e
Commit
98ed740e
authored
8 years ago
by
OzzieIsaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed missing js files for sorting shelfs
parent
7957827b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
Sortable.min.js
cps/static/js/Sortable.min.js
+2
-0
shelforder.js
cps/static/js/shelforder.js
+30
-0
No files found.
cps/static/js/Sortable.min.js
0 → 100644
View file @
98ed740e
This diff is collapsed.
Click to expand it.
cps/static/js/shelforder.js
0 → 100644
View file @
98ed740e
Sortable
.
create
(
sortTrue
,
{
group
:
"sorting"
,
sort
:
true
});
function
sendData
(
path
){
var
elements
;
var
counter
;
var
maxElements
;
var
tmp
=
[];
elements
=
Sortable
.
utils
.
find
(
sortTrue
,
"div"
);
maxElements
=
elements
.
length
;
var
form
=
document
.
createElement
(
"form"
);
form
.
setAttribute
(
"method"
,
"post"
);
form
.
setAttribute
(
"action"
,
path
);
for
(
counter
=
0
;
counter
<
maxElements
;
counter
++
){
tmp
[
counter
]
=
elements
[
counter
].
getAttribute
(
"id"
);
var
hiddenField
=
document
.
createElement
(
"input"
);
hiddenField
.
setAttribute
(
"type"
,
"hidden"
);
hiddenField
.
setAttribute
(
"name"
,
elements
[
counter
].
getAttribute
(
"id"
));
hiddenField
.
setAttribute
(
"value"
,
counter
+
1
);
form
.
appendChild
(
hiddenField
);
}
document
.
body
.
appendChild
(
form
);
form
.
submit
();
}
This diff is collapsed.
Click to expand it.
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