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
a9a8596e
Commit
a9a8596e
authored
Aug 04, 2014
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add jio excepted when getattachment with option _start, _end
parent
92d7f2c7
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
170 additions
and
151 deletions
+170
-151
dev/audioplayer_control/control.js
dev/audioplayer_control/control.js
+7
-4
dev/audioplayer_playlist_local/index.html
dev/audioplayer_playlist_local/index.html
+11
-1
dev/audioplayer_playlist_local/playlist.js
dev/audioplayer_playlist_local/playlist.js
+6
-0
dev/audioplayer_playlist_online/index.html
dev/audioplayer_playlist_online/index.html
+11
-1
dev/audioplayer_playlist_online/playlist.js
dev/audioplayer_playlist_online/playlist.js
+6
-0
dev/audioplayer_video_control/control.js
dev/audioplayer_video_control/control.js
+10
-6
dev/lib/jio.js
dev/lib/jio.js
+64
-128
src/audioplayer_control/control.js
src/audioplayer_control/control.js
+7
-3
src/audioplayer_playlist_local/index.html
src/audioplayer_playlist_local/index.html
+11
-1
src/audioplayer_playlist_local/playlist.js
src/audioplayer_playlist_local/playlist.js
+6
-0
src/audioplayer_playlist_online/index.html
src/audioplayer_playlist_online/index.html
+11
-1
src/audioplayer_playlist_online/playlist.js
src/audioplayer_playlist_online/playlist.js
+6
-0
src/audioplayer_video_control/control.js
src/audioplayer_video_control/control.js
+14
-6
No files found.
dev/audioplayer_control/control.js
View file @
a9a8596e
...
...
@@ -184,11 +184,11 @@
});
}
}).
declareMethod
(
"
startService
"
,
function
()
{
var
g
=
this
,
command_context
=
g
.
__element
.
getElementsByClassName
(
"
command
"
)[
0
],
mute_context
=
g
.
__element
.
getElementsByClassName
(
"
mute
"
)[
0
],
bar_context
=
g
.
__element
.
getElementsByClassName
(
"
bar
"
)[
0
],
box_context
=
g
.
__element
.
getElementsByClassName
(
"
box
"
)[
0
],
filter_context
=
g
.
__element
.
getElementsByClassName
(
"
filter
"
)[
0
],
filter_type
=
$
(
"
select
"
),
loop_context
=
g
.
__element
.
getElementsByClassName
(
"
loop
"
)[
0
],
loop
=
false
,
time_context
=
g
.
__element
.
getElementsByClassName
(
"
time
"
)[
0
];
var
g
=
this
,
blob
,
command_context
=
g
.
__element
.
getElementsByClassName
(
"
command
"
)[
0
],
mute_context
=
g
.
__element
.
getElementsByClassName
(
"
mute
"
)[
0
],
bar_context
=
g
.
__element
.
getElementsByClassName
(
"
bar
"
)[
0
],
box_context
=
g
.
__element
.
getElementsByClassName
(
"
box
"
)[
0
],
filter_context
=
g
.
__element
.
getElementsByClassName
(
"
filter
"
)[
0
],
filter_type
=
$
(
"
select
"
),
loop_context
=
g
.
__element
.
getElementsByClassName
(
"
loop
"
)[
0
],
loop
=
false
,
time_context
=
g
.
__element
.
getElementsByClassName
(
"
time
"
)[
0
];
bar_context
.
value
=
0
;
return
new
RSVP
.
Queue
().
push
(
function
()
{
set
.
call
(
g
);
return
RSVP
.
all
([
g
.
pl
EnablePage
(),
g
.
pl
Give
(
"
loop
"
),
g
.
plGive
(
"
mute
"
)
]);
return
RSVP
.
all
([
g
.
plGive
(
"
loop
"
),
g
.
plGive
(
"
mute
"
)
]);
}).
push
(
function
(
list
)
{
if
(
list
[
1
])
{
loop
=
true
;
...
...
@@ -209,9 +209,12 @@
_attachment
:
"
enclosure
"
});
}
}).
push
(
function
(
blob
)
{
}).
push
(
function
(
result
)
{
blob
=
result
;
return
g
.
plEnablePage
();
}).
push
(
function
()
{
if
(
blob
)
{
g
.
audio
.
src
=
URL
.
createObjectURL
(
g
.
blob
);
g
.
audio
.
src
=
URL
.
createObjectURL
(
blob
);
g
.
audio
.
load
();
g
.
audio
.
play
();
}
...
...
dev/audioplayer_playlist_local/index.html
View file @
a9a8596e
...
...
@@ -13,9 +13,19 @@
<script
id=
"network"
type=
"text/x-handlebars-template"
>
{{
#
each
rows
}}
<
li
>
<
a
href
=
#
page
=
control
&
id
=
{{
this
.
id
}}
&
action
=
localhost
>
{{
#
compare
this
.
doc
.
type
}}
<
a
href
=
#
page
=
control
&
id
=
{{
this
.
id
}}
&
action
=
offline
>
{{
this
.
doc
.
title
}}
<
/a
>
{{
else
}}
<
a
href
=
#
page
=
video_control
&
id
=
{{
this
.
id
}}
&
action
=
offline
>
{{
this
.
doc
.
title
}}
<
/a
>
{{
/
compare
}}
<
a
href
=
#
page
=
playlist
&
id
=
{{
this
.
id
}}
&
action
=
delete
>
data
-
rel
=
popup
data
-
position
-
to
=
window
<
/a
>
<
/li>
{{
/
each
}}
</script>
...
...
dev/audioplayer_playlist_local/playlist.js
View file @
a9a8596e
...
...
@@ -23,6 +23,12 @@
});
}).
push
(
function
(
e
)
{
var
tmp
=
e
.
data
.
rows
,
i
,
j
,
exp
;
Handlebars
.
registerHelper
(
"
compare
"
,
function
(
v1
,
options
)
{
if
(
v1
===
"
audio/mp3
"
||
v1
===
"
audio/mpeg
"
)
{
return
options
.
fn
(
this
);
}
return
options
.
inverse
(
this
);
});
if
(
options
.
id
!==
undefined
&&
options
.
id
!==
"
localhost
"
)
{
tmp
=
[];
for
(
i
=
0
,
j
=
0
;
i
<
e
.
data
.
rows
.
length
;
i
+=
1
)
{
...
...
dev/audioplayer_playlist_online/index.html
View file @
a9a8596e
...
...
@@ -13,9 +13,19 @@
<script
id=
"network"
type=
"text/x-handlebars-template"
>
{{
#
each
rows
}}
<
li
>
<
a
href
=
#
page
=
control
&
id
=
{{
this
.
id
}}
&
action
=
online
>
{{
#
compare
this
.
doc
.
type
}}
<
a
href
=
#
page
=
control
&
id
=
{{
this
.
id
}}
&
action
=
offline
>
{{
this
.
doc
.
title
}}
<
/a
>
{{
else
}}
<
a
href
=
#
page
=
video_control
&
id
=
{{
this
.
id
}}
&
action
=
offline
>
{{
this
.
doc
.
title
}}
<
/a
>
{{
/
compare
}}
<
a
href
=
#
page
=
playlist
&
id
=
{{
this
.
id
}}
&
action
=
delete
>
data
-
rel
=
popup
data
-
position
-
to
=
window
<
/a
>
<
/li>
{{
/
each
}}
</script>
...
...
dev/audioplayer_playlist_online/playlist.js
View file @
a9a8596e
...
...
@@ -100,6 +100,12 @@
}).
push
(
function
(
e
)
{
if
(
e
.
data
)
{
var
tmp
=
e
.
data
.
rows
,
i
,
j
,
exp
;
Handlebars
.
registerHelper
(
"
compare
"
,
function
(
v1
,
options
)
{
if
(
v1
===
"
audio/mp3
"
||
v1
===
"
audio/mpeg
"
)
{
return
options
.
fn
(
this
);
}
return
options
.
inverse
(
this
);
});
if
(
options
.
id
!==
undefined
&&
options
.
id
!==
"
online
"
)
{
tmp
=
[];
for
(
i
=
0
,
j
=
0
;
i
<
e
.
data
.
rows
.
length
;
i
+=
1
)
{
...
...
dev/audioplayer_video_control/control.js
View file @
a9a8596e
...
...
@@ -22,6 +22,7 @@
var
share_context
=
g
.
__element
.
getElementsByClassName
(
"
share
"
)[
0
];
share_context
.
href
=
"
https://twitter.com/intent/tweet?hashtags=MusicPlayer&text=
"
+
encodeURI
(
result
.
data
.
title
);
g
.
size
=
result
.
data
.
size
;
g
.
format
=
result
.
data
.
format
;
return
g
.
displayThisTitle
(
options
.
action
+
"
:
"
+
result
.
data
.
title
);
}).
push
(
function
()
{
return
g
.
allDocs
({
...
...
@@ -72,23 +73,26 @@
});
}
}).
declareMethod
(
"
startService
"
,
function
()
{
var
g
=
this
;
var
g
=
this
,
blob
;
return
new
RSVP
.
Queue
().
push
(
function
()
{
return
g
.
plEnablePage
();
}).
push
(
function
()
{
if
(
g
.
rebuild
)
{
return
g
.
jio_getAttachment
({
_id
:
g
.
id
,
_attachment
:
"
enclosure
"
});
}
}).
push
(
function
(
blob
)
{
}).
push
(
function
(
result
)
{
blob
=
result
;
return
g
.
plEnablePage
();
}).
push
(
function
()
{
if
(
blob
)
{
g
.
video
.
src
=
URL
.
createObjectURL
(
g
.
blob
);
g
.
video
.
src
=
URL
.
createObjectURL
(
blob
);
g
.
video
.
load
();
g
.
video
.
play
();
}
return
RSVP
.
any
([
loopEventListener
(
g
.
sourceBuffer
,
"
updateend
"
,
false
,
function
()
{
return
RSVP
.
any
([
loopEventListener
(
g
.
video
,
"
ended
"
,
false
,
function
()
{
window
.
location
=
g
.
__element
.
getElementsByClassName
(
"
next
"
)[
0
].
href
;
}),
loopEventListener
(
g
.
sourceBuffer
,
"
updateend
"
,
false
,
function
()
{
if
(
!
g
.
fin
)
{
return
;
}
...
...
dev/lib/jio.js
View file @
a9a8596e
This diff is collapsed.
Click to expand it.
src/audioplayer_control/control.js
View file @
a9a8596e
...
...
@@ -252,6 +252,7 @@
})
.
declareMethod
(
"
startService
"
,
function
()
{
var
g
=
this
,
blob
,
command_context
=
g
.
__element
.
getElementsByClassName
(
"
command
"
)[
0
],
mute_context
=
g
.
__element
.
getElementsByClassName
(
"
mute
"
)[
0
],
bar_context
=
g
.
__element
.
getElementsByClassName
(
"
bar
"
)[
0
],
...
...
@@ -266,7 +267,6 @@
.
push
(
function
()
{
set
.
call
(
g
);
return
RSVP
.
all
([
g
.
plEnablePage
(),
g
.
plGive
(
"
loop
"
),
g
.
plGive
(
"
mute
"
)
]);
...
...
@@ -290,9 +290,13 @@
"
_attachment
"
:
"
enclosure
"
});
}
})
.
push
(
function
(
blob
)
{
.
push
(
function
(
result
)
{
blob
=
result
;
return
g
.
plEnablePage
();
})
.
push
(
function
()
{
if
(
blob
)
{
g
.
audio
.
src
=
URL
.
createObjectURL
(
g
.
blob
);
g
.
audio
.
src
=
URL
.
createObjectURL
(
blob
);
g
.
audio
.
load
();
g
.
audio
.
play
();
}
...
...
src/audioplayer_playlist_local/index.html
View file @
a9a8596e
...
...
@@ -13,9 +13,19 @@
<script
id=
"network"
type=
"text/x-handlebars-template"
>
{{
#
each
rows
}}
<
li
>
<
a
href
=
#
page
=
control
&
id
=
{{
this
.
id
}}
&
action
=
localhost
>
{{
#
compare
this
.
doc
.
type
}}
<
a
href
=
#
page
=
control
&
id
=
{{
this
.
id
}}
&
action
=
offline
>
{{
this
.
doc
.
title
}}
<
/a
>
{{
else
}}
<
a
href
=
#
page
=
video_control
&
id
=
{{
this
.
id
}}
&
action
=
offline
>
{{
this
.
doc
.
title
}}
<
/a
>
{{
/
compare
}}
<
a
href
=
#
page
=
playlist
&
id
=
{{
this
.
id
}}
&
action
=
delete
>
data
-
rel
=
popup
data
-
position
-
to
=
window
<
/a
>
<
/li>
{{
/
each
}}
</script>
...
...
src/audioplayer_playlist_local/playlist.js
View file @
a9a8596e
...
...
@@ -40,6 +40,12 @@
i
,
j
,
exp
;
Handlebars
.
registerHelper
(
"
compare
"
,
function
(
v1
,
options
)
{
if
(
v1
===
"
audio/mp3
"
||
v1
===
"
audio/mpeg
"
)
{
return
options
.
fn
(
this
);
}
return
options
.
inverse
(
this
);
});
if
(
options
.
id
!==
undefined
&&
options
.
id
!==
"
localhost
"
)
{
tmp
=
[];
for
(
i
=
0
,
j
=
0
;
i
<
e
.
data
.
rows
.
length
;
i
+=
1
)
{
...
...
src/audioplayer_playlist_online/index.html
View file @
a9a8596e
...
...
@@ -13,9 +13,19 @@
<script
id=
"network"
type=
"text/x-handlebars-template"
>
{{
#
each
rows
}}
<
li
>
<
a
href
=
#
page
=
control
&
id
=
{{
this
.
id
}}
&
action
=
online
>
{{
#
compare
this
.
doc
.
type
}}
<
a
href
=
#
page
=
control
&
id
=
{{
this
.
id
}}
&
action
=
offline
>
{{
this
.
doc
.
title
}}
<
/a
>
{{
else
}}
<
a
href
=
#
page
=
video_control
&
id
=
{{
this
.
id
}}
&
action
=
offline
>
{{
this
.
doc
.
title
}}
<
/a
>
{{
/
compare
}}
<
a
href
=
#
page
=
playlist
&
id
=
{{
this
.
id
}}
&
action
=
delete
>
data
-
rel
=
popup
data
-
position
-
to
=
window
<
/a
>
<
/li>
{{
/
each
}}
</script>
...
...
src/audioplayer_playlist_online/playlist.js
View file @
a9a8596e
...
...
@@ -139,6 +139,12 @@
i
,
j
,
exp
;
Handlebars
.
registerHelper
(
"
compare
"
,
function
(
v1
,
options
)
{
if
(
v1
===
"
audio/mp3
"
||
v1
===
"
audio/mpeg
"
)
{
return
options
.
fn
(
this
);
}
return
options
.
inverse
(
this
);
});
if
(
options
.
id
!==
undefined
&&
options
.
id
!==
"
online
"
)
{
tmp
=
[];
for
(
i
=
0
,
j
=
0
;
i
<
e
.
data
.
rows
.
length
;
i
+=
1
)
{
...
...
src/audioplayer_video_control/control.js
View file @
a9a8596e
...
...
@@ -41,6 +41,7 @@
"
https://twitter.com/intent/tweet?hashtags=MusicPlayer&text=
"
+
encodeURI
(
result
.
data
.
title
);
g
.
size
=
result
.
data
.
size
;
g
.
format
=
result
.
data
.
format
;
return
g
.
displayThisTitle
(
options
.
action
+
"
:
"
+
result
.
data
.
title
);
})
...
...
@@ -104,24 +105,31 @@
}
})
.
declareMethod
(
"
startService
"
,
function
()
{
var
g
=
this
;
var
g
=
this
,
blob
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
g
.
plEnablePage
();
})
.
push
(
function
()
{
if
(
g
.
rebuild
)
{
return
g
.
jio_getAttachment
({
"
_id
"
:
g
.
id
,
"
_attachment
"
:
"
enclosure
"
});
}
})
.
push
(
function
(
blob
)
{
.
push
(
function
(
result
)
{
blob
=
result
;
return
g
.
plEnablePage
();
})
.
push
(
function
()
{
if
(
blob
)
{
g
.
video
.
src
=
URL
.
createObjectURL
(
g
.
blob
);
g
.
video
.
src
=
URL
.
createObjectURL
(
blob
);
g
.
video
.
load
();
g
.
video
.
play
();
}
return
RSVP
.
any
([
loopEventListener
(
g
.
video
,
"
ended
"
,
false
,
function
()
{
window
.
location
=
g
.
__element
.
getElementsByClassName
(
"
next
"
)[
0
].
href
;
}),
loopEventListener
(
g
.
sourceBuffer
,
"
updateend
"
,
false
,
function
()
{
if
(
!
g
.
fin
)
{
return
;
...
...
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