Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
officejs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
officejs
Commits
33236ff1
Commit
33236ff1
authored
Jul 11, 2014
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add remove music functionality
parent
da5be247
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
11 deletions
+46
-11
src/audioplayer/audioplayer.js
src/audioplayer/audioplayer.js
+13
-0
src/audioplayer_bridge/audiogadget.js
src/audioplayer_bridge/audiogadget.js
+11
-5
src/audioplayer_playlist/index.html
src/audioplayer_playlist/index.html
+9
-3
src/audioplayer_playlist/playlist.js
src/audioplayer_playlist/playlist.js
+12
-2
src/audioplayer_upload/upload.js
src/audioplayer_upload/upload.js
+1
-1
No files found.
src/audioplayer/audioplayer.js
View file @
33236ff1
...
@@ -77,6 +77,11 @@
...
@@ -77,6 +77,11 @@
return
this
.
save
[
param_list
[
0
]];
return
this
.
save
[
param_list
[
0
]];
})
})
.
allowPublicAcquisition
(
"
allDocs
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
allDocs
"
,
function
(
param_list
)
{
if
(
this
.
storageType
!==
0
)
{
param_list
[
0
].
save
=
true
;
}
else
{
param_list
[
0
].
save
=
false
;
}
return
this
.
getDeclaredGadget
(
storageType
(
this
.
storageType
))
return
this
.
getDeclaredGadget
(
storageType
(
this
.
storageType
))
.
push
(
function
(
jio_gadget
)
{
.
push
(
function
(
jio_gadget
)
{
return
jio_gadget
.
allDocs
.
apply
(
jio_gadget
,
param_list
);
return
jio_gadget
.
allDocs
.
apply
(
jio_gadget
,
param_list
);
...
@@ -118,6 +123,14 @@
...
@@ -118,6 +123,14 @@
return
jio_gadget
.
get
.
apply
(
jio_gadget
,
param_list
);
return
jio_gadget
.
get
.
apply
(
jio_gadget
,
param_list
);
});
});
})
})
.
allowPublicAcquisition
(
"
jio_remove
"
,
function
(
param_list
)
{
if
(
this
.
storageType
===
0
)
{
return
this
.
getDeclaredGadget
(
storageType
(
this
.
storageType
))
.
push
(
function
(
jio_gadget
)
{
return
jio_gadget
.
remove
.
apply
(
jio_gadget
,
param_list
);
});
}
})
.
allowPublicAcquisition
(
"
displayThisTitle
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
displayThisTitle
"
,
function
(
param_list
)
{
var
header
=
this
.
__element
.
getElementsByTagName
(
"
h1
"
)[
0
];
var
header
=
this
.
__element
.
getElementsByTagName
(
"
h1
"
)[
0
];
header
.
innerHTML
=
param_list
[
0
];
header
.
innerHTML
=
param_list
[
0
];
...
...
src/audioplayer_bridge/audiogadget.js
View file @
33236ff1
...
@@ -13,15 +13,17 @@
...
@@ -13,15 +13,17 @@
.
declareMethod
(
'
createJio
'
,
function
(
jio_options
)
{
.
declareMethod
(
'
createJio
'
,
function
(
jio_options
)
{
this
.
state_parameter_dict
.
jio_storage
=
jIO
.
createJIO
(
jio_options
);
this
.
state_parameter_dict
.
jio_storage
=
jIO
.
createJIO
(
jio_options
);
})
})
.
declareMethod
(
'
allDocs
'
,
function
()
{
.
declareMethod
(
'
allDocs
'
,
function
(
options
)
{
var
storage
=
this
.
state_parameter_dict
.
jio_storage
,
var
storage
=
this
.
state_parameter_dict
.
jio_storage
,
that
=
this
;
that
=
this
;
/*
if (that.save.data !== undefined) {
if
(
that
.
save
.
data
!==
undefined
)
{
return
that
.
save
;
return
that
.
save
;
}
*/
}
return
storage
.
allDocs
.
apply
(
storage
,
argument
s
)
return
storage
.
allDocs
(
option
s
)
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
that
.
save
=
result
;
if
(
options
.
save
)
{
that
.
save
=
result
;
}
return
result
;
return
result
;
});
});
})
})
...
@@ -62,6 +64,10 @@
...
@@ -62,6 +64,10 @@
var
storage
=
this
.
state_parameter_dict
.
jio_storage
;
var
storage
=
this
.
state_parameter_dict
.
jio_storage
;
return
storage
.
post
.
apply
(
storage
,
arguments
);
return
storage
.
post
.
apply
(
storage
,
arguments
);
})
})
.
declareMethod
(
'
remove
'
,
function
()
{
var
storage
=
this
.
state_parameter_dict
.
jio_storage
;
return
storage
.
remove
.
apply
(
storage
,
arguments
);
})
.
declareMethod
(
'
put
'
,
function
()
{
.
declareMethod
(
'
put
'
,
function
()
{
var
storage
=
this
.
state_parameter_dict
.
jio_storage
;
var
storage
=
this
.
state_parameter_dict
.
jio_storage
;
return
storage
.
put
.
apply
(
storage
,
arguments
);
return
storage
.
put
.
apply
(
storage
,
arguments
);
...
...
src/audioplayer_playlist/index.html
View file @
33236ff1
...
@@ -14,7 +14,13 @@
...
@@ -14,7 +14,13 @@
{{
#
each
rows
}}
{{
#
each
rows
}}
<
li
>
<
li
>
<
a
href
=
#
page
=
control
&
id
=
{{
this
.
id
}}
>
<
a
href
=
#
page
=
control
&
id
=
{{
this
.
id
}}
>
{{
this
.
doc
.
title
}}
<
/a></
li
>
{{
this
.
doc
.
title
}}
<
/a
>
<
a
href
=
#
page
=
playlist
&
id
=
{{
this
.
id
}}
&
action
=
delete
>
data
-
rel
=
popup
data
-
position
-
to
=
window
<
/a
>
<
/li>
{{
/
each
}}
{{
/
each
}}
</script>
</script>
...
@@ -30,12 +36,12 @@
...
@@ -30,12 +36,12 @@
<input
type=
"search"
class=
"research"
placeholder=
"research..."
/>
<input
type=
"search"
class=
"research"
placeholder=
"research..."
/>
<div
data-role=
"content"
>
<div
data-role=
"content"
>
<ul
data-role=
"listview"
data-split-theme=
"d"
>
<ul
data-role=
"listview"
data-split-
icon=
"delete"
data-split-
theme=
"d"
>
</ul>
</ul>
</div>
</div>
<div
data-role=
"footer"
data-position=
"fixed"
data-theme=
"b"
>
<div
data-role=
"footer"
data-position=
"fixed"
data-theme=
"b"
>
<div
data-role=
"navbar"
>
<div
data-role=
"navbar"
>
<ul>
<ul>
<li><a
data-role=
"button"
class=
"offline"
data-icon=
"search"
>
offline
</a></li>
<li><a
data-role=
"button"
class=
"offline"
data-icon=
"search"
>
offline
</a></li>
...
...
src/audioplayer_playlist/playlist.js
View file @
33236ff1
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
.
getElementById
(
'
rows-template
'
).
innerHTML
,
.
getElementById
(
'
rows-template
'
).
innerHTML
,
rows_template
=
Handlebars
.
compile
(
rows_template_source
);
rows_template
=
Handlebars
.
compile
(
rows_template_source
);
gk
.
declareAcquiredMethod
(
"
allDocs
"
,
"
allDocs
"
)
gk
.
declareAcquiredMethod
(
"
allDocs
"
,
"
allDocs
"
)
.
declareAcquiredMethod
(
"
jio_remove
"
,
"
jio_remove
"
)
.
declareAcquiredMethod
(
"
displayThisPage
"
,
"
displayThisPage
"
)
.
declareAcquiredMethod
(
"
displayThisPage
"
,
"
displayThisPage
"
)
.
declareAcquiredMethod
(
"
displayThisTitle
"
,
"
displayThisTitle
"
)
.
declareAcquiredMethod
(
"
displayThisTitle
"
,
"
displayThisTitle
"
)
.
declareAcquiredMethod
(
"
plCreateHttpStorage
"
,
"
plCreateHttpStorage
"
)
.
declareAcquiredMethod
(
"
plCreateHttpStorage
"
,
"
plCreateHttpStorage
"
)
...
@@ -40,6 +41,13 @@
...
@@ -40,6 +41,13 @@
gadget
.
__element
.
getElementsByClassName
(
'
online
'
)[
0
]
gadget
.
__element
.
getElementsByClassName
(
'
online
'
)[
0
]
.
href
=
param_list
[
2
];
.
href
=
param_list
[
2
];
})
})
.
push
(
function
()
{
var
id
=
options
.
id
;
if
(
options
.
action
===
"
delete
"
)
{
delete
options
.
id
;
return
gadget
.
jio_remove
({
"
_id
"
:
id
});
}
})
.
push
(
function
()
{
.
push
(
function
()
{
return
gadget
.
allDocs
({
"
include_docs
"
:
true
});
return
gadget
.
allDocs
({
"
include_docs
"
:
true
});
})
})
...
@@ -67,8 +75,10 @@
...
@@ -67,8 +75,10 @@
$
(
list
).
listview
(
"
refresh
"
);
$
(
list
).
listview
(
"
refresh
"
);
})
})
.
fail
(
function
(
error
)
{
.
fail
(
function
(
error
)
{
document
.
getElementsByTagName
(
'
body
'
)[
0
].
textContent
=
if
((
error
instanceof
RSVP
.
CancellationError
))
{
"
network error: ip maybe not defined
"
;
document
.
getElementsByTagName
(
'
body
'
)[
0
].
textContent
=
JSON
.
stringify
(
error
);
}
});
});
})
})
.
declareMethod
(
'
startService
'
,
function
()
{
.
declareMethod
(
'
startService
'
,
function
()
{
...
...
src/audioplayer_upload/upload.js
View file @
33236ff1
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
if
(
!
(
error
instanceof
RSVP
.
CancellationError
))
{
if
(
!
(
error
instanceof
RSVP
.
CancellationError
))
{
info_context
.
innerHTML
+=
info_context
.
innerHTML
+=
input_context
.
files
[
uploaded
].
name
+
input_context
.
files
[
uploaded
].
name
+
"
failed : storage insufficient
"
;
"
failed : storage
maybe
insufficient
"
;
return
g
.
plEnablePage
();
return
g
.
plEnablePage
();
}
}
document
.
getElementsByTagName
(
'
body
'
)[
0
].
textContent
=
document
.
getElementsByTagName
(
'
body
'
)[
0
].
textContent
=
...
...
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