Commit d6665300 authored by Vincent Bechu's avatar Vincent Bechu

erp5_officejs: add audioplayer app with export zip

/reviewed-on !305
parent 02a31024
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>018d2ac351d2f2de9b77e870f29894e1</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/gif</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>audioplayer/lib/images/ajax-loader.gif</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>filename</string> </key>
<value> <string>ajax-loader.gif</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>512</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>officejs_audioplayer_lib_images_ajax-loader_gif</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Image</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>512</int> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1498120350.12</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>draft</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record id="7" aka="AAAAAAAAAAc=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>960.13953.39809.6007</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1498120438.51</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>b04244ac970ec2a221d43f1ca0e19e8b</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/jpeg</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>audioplayer/unknown.jpg</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>filename</string> </key>
<value> <string>unknown.jpg</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>400</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>officejs_audioplayer_unknown_jpg</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Image</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>400</int> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1498122746.72</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>draft</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record id="7" aka="AAAAAAAAAAc=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>960.13993.16915.14028</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1498122811.31</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
......@@ -47,6 +47,8 @@
<option>Awesome Free Software Publisher List</option>
<option>Jabber Client</option>
<option>Appstore</option>
<option>MediaPlayer</option>
<option>Trade Application</option>
</select>
</div>
</div>
......
......@@ -231,7 +231,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>960.4028.46236.64119</string> </value>
<value> <string>960.15342.25021.61081</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -249,7 +249,7 @@
</tuple>
<state>
<tuple>
<float>1497880992.36</float>
<float>1498204265.35</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -81,6 +81,18 @@
"no_installer": true,
"sub_gadget": []
},
"MediaPlayer": {
"url": "officejs_audioplayer/",
"cache": "gadget_officejs_audioplayer.appcache",
"no_installer": true,
"sub_gadget": []
},
"Trade Application": {
"url": "osp-9/",
"cache": "gadget_trade_application.appcache",
"no_installer": true,
"sub_gadget": []
},
"connection": {
"cache": "gadget_jabberconnection.appcache",
"no_installer": true
......
......@@ -227,7 +227,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>960.4028.46236.64119</string> </value>
<value> <string>960.14254.57744.3293</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -245,7 +245,7 @@
</tuple>
<state>
<tuple>
<float>1497881106.09</float>
<float>1498139865.81</float>
<string>UTC</string>
</tuple>
</state>
......
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>Jio Gadget</title>
<!-- renderjs -->
<script src="source/audioplayer/lib/rsvp.min.js" type="text/javascript"></script>
<script src="source/audioplayer/lib/uritemplate.min.js" type="text/javascript"></script>
<script src="source/audioplayer/lib/renderjs.min.js" type="text/javascript"></script>
<script src="source/audioplayer/lib/URI.js" type="text/javascript"></script>
<script src="source/audioplayer/lib/jio.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_officejs_audioplayer_bridge.js" type="text/javascript"></script>
</head>
<body>
</body>
</html>
/*global rJS, jIO, console, RSVP, encodeURI, window */
/*jslint nomen: true*/
(function(rJS, jIO, window) {
"use strict";
rJS(window).ready(function(gadget) {
// Initialize the gadget local parameters
gadget.state_parameter_dict = {};
gadget.save = {};
}).declareMethod("createJio", function(jio_options) {
this.state_parameter_dict.jio_storage = jIO.createJIO(jio_options);
this.save = {};
}).declareMethod("allDocs", function(options) {
var storage = this.state_parameter_dict.jio_storage, that = this;
if (that.save.data !== undefined) {
return that.save;
}
return storage.allDocs(options).then(function(result) {
if (options.save) {
that.save = result;
}
return result;
});
}).declareMethod("get", function(param) {
var storage = this.state_parameter_dict.jio_storage, result = this.save, length, i;
if (result.data !== undefined) {
length = result.data.rows.length;
for (i = 0; i < length; i += 1) {
if (result.data.rows[i].id === encodeURI(param._id) || result.data.rows[i].id === param._id) {
return {
data: {
title: result.data.rows[i].doc.title,
type: result.data.rows[i].doc.type
}
};
}
}
}
return storage.get.apply(storage, arguments);
}).declareMethod("getAttachment", function() {
var storage = this.state_parameter_dict.jio_storage;
return storage.getAttachment.apply(storage, arguments).then(function(response) {
return response.data;
});
}).declareMethod("putAttachment", function() {
var storage = this.state_parameter_dict.jio_storage;
return storage.putAttachment.apply(storage, arguments);
}).declareMethod("post", function() {
var storage = this.state_parameter_dict.jio_storage;
return storage.post.apply(storage, arguments);
}).declareMethod("remove", function() {
var storage = this.state_parameter_dict.jio_storage;
return storage.remove.apply(storage, arguments);
}).declareMethod("removeAttachment", function() {
var storage = this.state_parameter_dict.jio_storage;
return storage.removeAttachment.apply(storage, arguments);
}).declareMethod("put", function() {
var storage = this.state_parameter_dict.jio_storage;
return storage.put.apply(storage, arguments);
});
})(rJS, jIO, window);
\ No newline at end of file
button.loop{width:10em}#visualizer{text-align:center}canvas#can{width:50%;height:20%}progress.bar{position:inherit;display:block;height:1em;width:100%;-moz-border-radius:.5em;-webkit-border-radius:.5em;border-radius:.5em;-moz-box-shadow:0 .1em .5em #000 inset,0 .1em 0 #444;-webkit-box-shadow:0 .1em .5em #000 inset,0 .1em 0 #444;box-shadow:0 .1em .5em #000 inset,0 .1em 0 #444}
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<title>audio control</title>
<!-- renderjs -->
<script src="source/audioplayer/lib/rsvp.min.js" type="text/javascript"></script>
<script src="source/audioplayer/lib/renderjs.min.js" type="text/javascript"></script>
<script src="source/audioplayer/lib/jquery.js" type="text/javascript"></script>
<script src="source/audioplayer/lib/URI.js" type="text/javascript"></script>
<script src="source/audioplayer/lib/uritemplate.min.js" type="text/javascript"></script>
<script src="source/audioplayer/lib/jio.js" type="text/javascript"></script>
<script src="source/audioplayer/mixin_promise.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_officejs_audioplayer_control.js" type="text/javascript"></script>
<link rel="stylesheet" href="gadget_officejs_audioplayer_control.css" media="screen" >
</head>
<body>
\ No newline at end of file
.page{position:absolute;top:30%;left:50%}.loader{position:relative}.loader .circle{position:absolute;width:2.5em;height:2.5em;opacity:0;transform:rotate(225deg);animation-iteration-count:infinite;animation-name:orbit;animation-duration:5.5s;-webkit-transform:rotate(225deg);-webkit-animation-iteration-count:infinite;-webkit-animation-name:orbit;-webkit-animation-duration:5.5s;-moz-transform:rotate(225deg);-moz-animation-iteration-count:infinite;-moz-animation-name:orbit;-moz-animation-duration:5.5s}.loader .circle:after{content:'';position:absolute;width:.3em;height:.3em;border-radius:.3em;background:#0e0d0d}.loader .circle:nth-child(2){animation-delay:240ms;-webkit-delay:240ms;-moz-delay:240ms}.loader .circle:nth-child(3){animation-delay:480ms;-webkit-animation-delay:480ms;-moz-animation-delay:480ms}.loader .circle:nth-child(4){animation-delay:720ms;-webkit-animation-delay:720ms;-moz-animation-delay:720ms}.loader .circle:nth-child(5){animation-delay:960ms;-webkit-animation-delay:960ms;-moz-animation-delay:960ms}@keyframes orbit{0%{transform:rotate(225deg);opacity:1;animation-timing-function:ease-out}7%{transform:rotate(345deg);animation-timing-function:linear}30%{transform:rotate(455deg);animation-timing-function:ease-in-out}39%{transform:rotate(690deg);animation-timing-function:linear}70%{transform:rotate(815deg);opacity:1;animation-timing-function:ease-out}75%{transform:rotate(945deg);animation-timing-function:ease-out}76%{transform:rotate(945deg);opacity:0}100%{transform:rotate(945deg);opacity:0}}@-webkit-keyframes orbit{0%{-webkit-transform:rotate(225deg);opacity:1;-webkit-animation-timing-function:ease-out}7%{-webkit-transform:rotate(345deg);-webkit-animation-timing-function:linear}30%{-webkit-transform:rotate(455deg);-webkit-animation-timing-function:ease-in-out}39%{-webkit-transform:rotate(690deg);-webkit-animation-timing-function:linear}70%{-webkit-transform:rotate(815deg);opacity:1;-webkit-animation-timing-function:ease-out}75%{-webkit-transform:rotate(945deg);-webkit-animation-timing-function:ease-out}76%{-webkit-transform:rotate(945deg);opacity:0}100%{-webkit-transform:rotate(945deg);opacity:0}}@-moz-keyframes orbit{0%{-moz-transform:rotate(225deg);opacity:1;-moz-animation-timing-function:ease-out}7%{-moz-transform:rotate(345deg);-moz-animation-timing-function:linear}30%{-moz-transform:rotate(455deg);-moz-animation-timing-function:ease-in-out}39%{-moz-transform:rotate(690deg);-moz-animation-timing-function:linear}70%{-moz-transform:rotate(815deg);opacity:1;-moz-animation-timing-function:ease-out}75%{-moz-transform:rotate(945deg);-moz-animation-timing-function:ease-out}76%{-moz-transform:rotate(945deg);opacity:0}100%{-moz-transform:rotate(945deg);opacity:0}}
\ No newline at end of file
/*global window, rJS, RSVP, console, $, jQuery, URL, location, webkitURL */
/*jslint nomen: true*/
(function (window, rJS, $, RSVP, document) {
"use strict";
$.mobile.ajaxEnabled = false;
$.mobile.linkBindingEnabled = false;
$.mobile.hashListeningEnabled = false;
$.mobile.pushStateEnabled = false;
var gadget_list = {
upload: {
"0": "gadget_officejs_audioplayer_upload.html",
"1": "gadget_officejs_audioplayer_playlist_local.html",
"2": "gadget_officejs_audioplayer_upload.html"
},
playlist: {
"0": "gadget_officejs_audioplayer_playlist_offline.html",
"1": "gadget_officejs_audioplayer_playlist_local.html",
"2": "gadget_officejs_audioplayer_playlist_online.html"
},
control: {
"0": "gadget_officejs_audioplayer_control.html",
"1": "gadget_officejs_audioplayer_control.html",
"2": "gadget_officejs_audioplayer_control.html"
},
video_control: {
"0": "gadget_officejs_audioplayer_video_control.html",
"1": "gadget_officejs_audioplayer_video_control.html",
"2": "gadget_officejs_audioplayer_video_control.html"
}
}, allStorageType = ["offline", "localhost", "online"];
function storageType(type) {
return allStorageType[type];
}
function disablePage(g) {
var overlay = document.createElement("div"), loader = document.createElement("div"), controlPanel = g.__element.getElementsByClassName("page")[0], i = 0, circle;
if (controlPanel.firstChild) {
return;
}
overlay.className = "overlay";
loader.className = "loader";
while (i < 5) {
circle = document.createElement("div");
circle.className = "circle";
loader.appendChild(circle);
i += 1;
}
overlay.appendChild(loader);
controlPanel.appendChild(overlay);
}
rJS(window)
.declareAcquiredMethod("pleaseRedirectMyHash", "pleaseRedirectMyHash")
.allowPublicAcquisition("plEnablePage", function () {
var controlPanel = this.__element.getElementsByClassName("page")[0];
if (controlPanel) {
while (controlPanel.firstChild) {
controlPanel.removeChild(controlPanel.firstChild);
}
}
}).allowPublicAcquisition("plDisablePage", function() {
disablePage(this);
}).allowPublicAcquisition("plCreateDavStorage", function(list) {
return this.getDeclaredGadget("online").push(function(gadget) {
return gadget.createJio({
type: "dav",
url: list[0]
});
});
}).allowPublicAcquisition("displayThisPage", function(param_list) {
// Hey, I want to display this page
return this.aq_pleasePublishMyState(param_list[0]);
}).allowPublicAcquisition("plSave", function(param_list) {
this.save = this.save || [];
var key = Object.keys(param_list[0]);
this.save[key[0]] = param_list[0][key[0]];
}).allowPublicAcquisition("plGiveStorageType", function() {
return this.storageType;
}).allowPublicAcquisition("plGive", function(param_list) {
if (this.save === undefined) {
return this.save;
}
return this.save[param_list[0]];
}).allowPublicAcquisition("allDocs", function(param_list) {
if (this.storageType === 1) {
param_list[0].save = true;
} else {
param_list[0].save = false;
}
return this.getDeclaredGadget(storageType(this.storageType)).push(function(jio_gadget) {
return jio_gadget.allDocs.apply(jio_gadget, param_list);
});
}).allowPublicAcquisition("jio_post", function(param_list) {
var type;
if (param_list[1] === 0 || param_list[1] === 1) {
type = param_list[1];
} else {
type = this.storageType;
}
return this.getDeclaredGadget(storageType(type)).push(function(jio_gadget) {
return jio_gadget.post.apply(jio_gadget, param_list);
});
}).allowPublicAcquisition("jio_putAttachment", function(param_list) {
var type;
if (param_list[1] === 0 || param_list[1] === 1) {
type = param_list[1];
} else {
type = this.storageType;
}
return this.getDeclaredGadget(storageType(type)).push(function(jio_gadget) {
return jio_gadget.putAttachment.apply(jio_gadget, param_list);
});
}).allowPublicAcquisition("jio_getAttachment", function(param_list) {
return this.getDeclaredGadget(storageType(this.storageType)).push(function(jio_gadget) {
return jio_gadget.getAttachment.apply(jio_gadget, param_list);
});
}).allowPublicAcquisition("jio_get", function(param_list) {
return this.getDeclaredGadget(storageType(this.storageType)).push(function(jio_gadget) {
return jio_gadget.get.apply(jio_gadget, param_list);
});
}).allowPublicAcquisition("jio_remove", function(param_list) {
return this.getDeclaredGadget(storageType(this.storageType)).push(function(jio_gadget) {
return jio_gadget.remove.apply(jio_gadget, param_list);
});
}).allowPublicAcquisition("jio_removeAttachment", function(param_list) {
return this.getDeclaredGadget(storageType(this.storageType)).push(function(jio_gadget) {
return jio_gadget.removeAttachment.apply(jio_gadget, param_list);
});
}).allowPublicAcquisition("displayThisTitle", function(param_list) {
var header = this.__element.getElementsByTagName("h1")[0];
header.innerHTML = param_list[0];
});
rJS(window).ready(function(g) {
return g.getDeclaredGadget("localhost").push(function(gadget) {
return gadget.createJio({
type: "http",
database: "http://localhost:8080/"
});
}).push(function() {
return g.getDeclaredGadget("offline");
}).push(function(gadget) {
return gadget.createJio({
type: "indexeddb",
database: "musicLibrary",
_unite: 5e6
});
}).push(function() {
var controlPanel = g.__element.getElementsByClassName("page")[0];
if (controlPanel) {
while (controlPanel.firstChild) {
controlPanel.removeChild(controlPanel.firstChild);
}
}
});
}).declareMethod("render", function(options) {
var gadget = this, page_gadget, element, page_element;
element = gadget.__element.getElementsByClassName("gadget_container")[0];
if (options.page === undefined) {
// Redirect to the about page
return gadget.aq_pleasePublishMyState({
page: "playlist"
}).push(gadget.pleaseRedirectMyHash.bind(gadget));
}
gadget.__element.getElementsByClassName("console")[0].innerHTML = "";
gadget.storageType = gadget.storageType || 0;
if (options.page === "playlist") {
if (options.id === "offline") {
gadget.storageType = 0;
gadget.__element.getElementsByClassName("addMusic")[0].style.display = "";
} else if (options.id === "localhost") {
gadget.storageType = 1;
gadget.__element.getElementsByClassName("addMusic")[0].style.display = "none";
} else if (options.id === "online") {
gadget.storageType = 2;
gadget.__element.getElementsByClassName("addMusic")[0].style.display = "";
}
}
return gadget.declareGadget(gadget_list[options.page][gadget.storageType]).push(function(g) {
disablePage(gadget);
page_gadget = g;
return page_gadget.getElement();
}).push(function(result) {
page_element = result;
while (element.firstChild) {
element.removeChild(element.firstChild);
}
element.appendChild(page_element);
$(element).trigger("create");
if (page_gadget.render !== undefined) {
return page_gadget.render(options);
}
}).push(function() {
// XXX RenderJS hack to start sub gadget services
// Only work if this gadget has no parent.
if (page_gadget.startService !== undefined) {
return page_gadget.startService(options);
}
}).fail(function(e) {
gadget.__element.getElementsByClassName("console")[0].innerHTML = e;
});
});
})(window, rJS, jQuery, RSVP, document);
\ No newline at end of file
<!DOCTYPE html>
<html manifest="gadget_officejs_audioplayer.appcache">
<head>
<!-- renderjs -->
<base href="">
<script src="source/audioplayer/lib/rsvp.min.js" type="text/javascript"></script>
<script src="source/audioplayer/lib/renderjs.min.js" type="text/javascript"></script>
<script src="source/audioplayer/lib/jquery.js" type="text/javascript"></script>
<script src="source/audioplayer/lib/jquerymobile.js"></script>
<link rel="stylesheet" href="source/audioplayer/lib/jquerymobile.css">
<!-- custom script -->
<script src="gadget_officejs_audioplayer.js" type="text/javascript"></script>
<link rel="stylesheet" href="gadget_officejs_audioplayer.css" media="screen">
</head>
<body>
<div data-role="page" class="ui-page" >
<div class="nav" data-role="header" data-theme="b">
<h1>media player</h1>
<a class="addMusic" data-icon="plus" href="#page=upload">add</a>
<a data-icon="grid" href="#page=playlist" >media library</a>
</div>
<div class="page">
</div>
<div class="console">
</div>
<div class="offline" data-gadget-url="gadget_officejs_audioplayer_bridge.html" data-gadget-scope="offline" >
</div>
<div class="localhost" data-gadget-url="gadget_officejs_audioplayer_bridge.html" data-gadget-scope="localhost" >
</div>
<div class="online" data-gadget-url="gadget_officejs_audioplayer_bridge.html" data-gadget-scope="online" >
</div>
<article class="gadget_container"></article>
</div>
</body>
</html>
!function(e){"use strict";function t(e){var n;if(null===e||void 0===e)return!1;if(r.isArray(e))return e.length>0;if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return!0;for(n in e)if(e.hasOwnProperty(n)&&t(e[n]))return!0;return!1}var n=function(){function e(e){this.options=e}return e.prototype.toString=function(){return JSON&&JSON.stringify?JSON.stringify(this.options):this.options},e}(),r=function(){function e(e){return"[object Array]"===Object.prototype.toString.apply(e)}function t(e){return"[object String]"===Object.prototype.toString.apply(e)}function n(e){return"[object Number]"===Object.prototype.toString.apply(e)}function r(e){return"[object Boolean]"===Object.prototype.toString.apply(e)}function i(e,t){var n,r="",i=!0;for(n=0;n<e.length;n+=1)i?i=!1:r+=t,r+=e[n];return r}function o(e,t){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}function s(e,t){for(var n=[],r=0;r<e.length;r+=1)t(e[r])&&n.push(e[r]);return n}function a(e){if("object"!=typeof e||null===e)return e;Object.freeze(e);var t,n;for(n in e)e.hasOwnProperty(n)&&(t=e[n],"object"==typeof t&&u(t));return e}function u(e){return"function"==typeof Object.freeze?a(e):e}return{isArray:e,isString:t,isNumber:n,isBoolean:r,join:i,map:o,filter:s,deepFreeze:u}}(),i=function(){function e(e){return e>="a"&&"z">=e||e>="A"&&"Z">=e}function t(e){return e>="0"&&"9">=e}function n(e){return t(e)||e>="a"&&"f">=e||e>="A"&&"F">=e}return{isAlpha:e,isDigit:t,isHexDigit:n}}(),o=function(){function e(e){var t,n,r="",i=s.encode(e);for(n=0;n<i.length;n+=1)t=i.charCodeAt(n),r+="%"+(16>t?"0":"")+t.toString(16).toUpperCase();return r}function t(e,t){return"%"===e.charAt(t)&&i.isHexDigit(e.charAt(t+1))&&i.isHexDigit(e.charAt(t+2))}function n(e,t){return parseInt(e.substr(t,2),16)}function r(e){if(!t(e,0))return!1;var r=n(e,1),i=s.numBytes(r);if(0===i)return!1;for(var o=1;i>o;o+=1)if(!t(e,3*o)||!s.isValidFollowingCharCode(n(e,3*o+1)))return!1;return!0}function o(e,r){var i=e.charAt(r);if(!t(e,r))return i;var o=n(e,r+1),a=s.numBytes(o);if(0===a)return i;for(var u=1;a>u;u+=1)if(!t(e,r+3*u)||!s.isValidFollowingCharCode(n(e,r+3*u+1)))return i;return e.substr(r,3*a)}var s={encode:function(e){return unescape(encodeURIComponent(e))},numBytes:function(e){return 127>=e?1:e>=194&&223>=e?2:e>=224&&239>=e?3:e>=240&&244>=e?4:0},isValidFollowingCharCode:function(e){return e>=128&&191>=e}};return{encodeCharacter:e,isPctEncoded:r,pctCharAt:o}}(),s=function(){function e(e){return i.isAlpha(e)||i.isDigit(e)||"_"===e||o.isPctEncoded(e)}function t(e){return i.isAlpha(e)||i.isDigit(e)||"-"===e||"."===e||"_"===e||"~"===e}function n(e){return":"===e||"/"===e||"?"===e||"#"===e||"["===e||"]"===e||"@"===e||"!"===e||"$"===e||"&"===e||"("===e||")"===e||"*"===e||"+"===e||","===e||";"===e||"="===e||"'"===e}return{isVarchar:e,isUnreserved:t,isReserved:n}}(),a=function(){function e(e,t){var n,r="",i="";for(("number"==typeof e||"boolean"==typeof e)&&(e=e.toString()),n=0;n<e.length;n+=i.length)i=e.charAt(n),r+=s.isUnreserved(i)||t&&s.isReserved(i)?i:o.encodeCharacter(i);return r}function t(t){return e(t,!0)}function n(e,t){var n=o.pctCharAt(e,t);return n.length>1?n:s.isReserved(n)||s.isUnreserved(n)?n:o.encodeCharacter(n)}function r(e){var t,n="",r="";for(t=0;t<e.length;t+=r.length)r=o.pctCharAt(e,t),n+=r.length>1?r:s.isReserved(r)||s.isUnreserved(r)?r:o.encodeCharacter(r);return n}return{encode:e,encodePassReserved:t,encodeLiteral:r,encodeLiteralCharacter:n}}(),u=function(){function e(e){t[e]={symbol:e,separator:"?"===e?"&":""===e||"+"===e||"#"===e?",":e,named:";"===e||"&"===e||"?"===e,ifEmpty:"&"===e||"?"===e?"=":"",first:"+"===e?"":e,encode:"+"===e||"#"===e?a.encodePassReserved:a.encode,toString:function(){return this.symbol}}}var t={};return e(""),e("+"),e("#"),e("."),e("/"),e(";"),e("?"),e("&"),{valueOf:function(e){return t[e]?t[e]:"=,!@|".indexOf(e)>=0?null:t[""]}}}(),p=function(){function e(e){this.literal=a.encodeLiteral(e)}return e.prototype.expand=function(){return this.literal},e.prototype.toString=e.prototype.expand,e}(),f=function(){function e(e){function t(){var t=e.substring(h,p);if(0===t.length)throw new n({expressionText:e,message:"a varname must be specified",position:p});c={varname:t,exploded:!1,maxLength:null},h=null}function r(){if(d===p)throw new n({expressionText:e,message:"after a ':' you have to specify the length",position:p});c.maxLength=parseInt(e.substring(d,p),10),d=null}var a,p,f=[],c=null,h=null,d=null,g="";for(a=function(t){var r=u.valueOf(t);if(null===r)throw new n({expressionText:e,message:"illegal use of reserved operator",position:p,operator:t});return r}(e.charAt(0)),p=a.symbol.length,h=p;p<e.length;p+=g.length){if(g=o.pctCharAt(e,p),null!==h){if("."===g){if(h===p)throw new n({expressionText:e,message:"a varname MUST NOT start with a dot",position:p});continue}if(s.isVarchar(g))continue;t()}if(null!==d){if(p===d&&"0"===g)throw new n({expressionText:e,message:"A :prefix must not start with digit 0",position:p});if(i.isDigit(g)){if(p-d>=4)throw new n({expressionText:e,message:"A :prefix must have max 4 digits",position:p});continue}r()}if(":"!==g)if("*"!==g){if(","!==g)throw new n({expressionText:e,message:"illegal character",character:g,position:p});f.push(c),c=null,h=p+1}else{if(null===c)throw new n({expressionText:e,message:"exploded without varspec",position:p});if(c.exploded)throw new n({expressionText:e,message:"exploded twice",position:p});if(c.maxLength)throw new n({expressionText:e,message:"an explode (*) MUST NOT follow to a prefix",position:p});c.exploded=!0}else{if(null!==c.maxLength)throw new n({expressionText:e,message:"only one :maxLength is allowed per varspec",position:p});if(c.exploded)throw new n({expressionText:e,message:"an exploeded varspec MUST NOT be varspeced",position:p});d=p+1}}return null!==h&&t(),null!==d&&r(),f.push(c),new l(e,a,f)}function t(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function r(r){var i,o,s,a=[],u=null,f="",l=!0,h=0;for(i=0;i<r.length;i+=1)if(o=r.charAt(i),null===h){if(null===u)throw new Error("reached unreachable code");if("{"===o)throw new n({templateText:r,message:"brace already opened",position:i});if("}"===o){if(u+1===i)throw new n({templateText:r,message:"empty braces",position:u});try{s=e(r.substring(u+1,i))}catch(d){if(d.prototype===n.prototype)throw new n({templateText:r,message:d.options.message,position:u+d.options.position,details:d.options});throw d}a.push(s),0===s.operator.symbol.length?f+="([^/]+)":l=!1,u=null,h=i+1}}else{if("}"===o)throw new n({templateText:r,message:"unopened brace closed",position:i});"{"===o&&(i>h&&(s=new p(r.substring(h,i)),a.push(s),f+=t(s.literal)),h=null,u=i)}if(null!==u)throw new n({templateText:r,message:"unclosed brace",position:u});return h<r.length&&(s=new p(r.substring(h)),a.push(s),f+=t(s.literal)),l===!1&&(f=void 0),new c(r,a,f)}return r}(),l=function(){function e(e){return JSON&&JSON.stringify?JSON.stringify(e):e}function n(e){if(!t(e))return!0;if(r.isString(e))return""===e;if(r.isNumber(e)||r.isBoolean(e))return!1;if(r.isArray(e))return 0===e.length;for(var n in e)if(e.hasOwnProperty(n))return!1;return!0}function i(e){var t,n=[];for(t in e)e.hasOwnProperty(t)&&n.push({name:t,value:e[t]});return n}function o(e,t,n){this.templateText=e,this.operator=t,this.varspecs=n}function s(e,t,n){var r="";if(n=n.toString(),t.named){if(r+=a.encodeLiteral(e.varname),""===n)return r+=t.ifEmpty;r+="="}return null!==e.maxLength&&(n=n.substr(0,e.maxLength)),r+=t.encode(n)}function u(e){return t(e.value)}function p(e,o,s){var p=[],f="";if(o.named){if(f+=a.encodeLiteral(e.varname),n(s))return f+=o.ifEmpty;f+="="}return r.isArray(s)?(p=s,p=r.filter(p,t),p=r.map(p,o.encode),f+=r.join(p,",")):(p=i(s),p=r.filter(p,u),p=r.map(p,function(e){return o.encode(e.name)+","+o.encode(e.value)}),f+=r.join(p,",")),f}function f(e,o,s){var p=r.isArray(s),f=[];return p?(f=s,f=r.filter(f,t),f=r.map(f,function(t){var r=a.encodeLiteral(e.varname);return r+=n(t)?o.ifEmpty:"="+o.encode(t)})):(f=i(s),f=r.filter(f,u),f=r.map(f,function(e){var t=a.encodeLiteral(e.name);return t+=n(e.value)?o.ifEmpty:"="+o.encode(e.value)})),r.join(f,o.separator)}function l(e,n){var o=[],s="";return r.isArray(n)?(o=n,o=r.filter(o,t),o=r.map(o,e.encode),s+=r.join(o,e.separator)):(o=i(n),o=r.filter(o,function(e){return t(e.value)}),o=r.map(o,function(t){return e.encode(t.name)+"="+e.encode(t.value)}),s+=r.join(o,e.separator)),s}return o.prototype.toString=function(){return this.templateText},o.prototype.expand=function(i){var o,a,u,c,h=[],d=!1,g=this.operator;for(o=0;o<this.varspecs.length;o+=1)if(a=this.varspecs[o],u=i[a.varname],null!==u&&void 0!==u)if(a.exploded&&(d=!0),c=r.isArray(u),"string"==typeof u||"number"==typeof u||"boolean"==typeof u)h.push(s(a,g,u));else{if(a.maxLength&&t(u))throw new Error("Prefix modifiers are not applicable to variables that have composite values. You tried to expand "+this+" with "+e(u));a.exploded?t(u)&&(g.named?h.push(f(a,g,u)):h.push(l(g,u))):(g.named||!n(u))&&h.push(p(a,g,u))}return 0===h.length?"":g.first+r.join(h,g.separator)},o}(),c=function(){function e(e,t,n){this.templateText=e,this.expressions=t,void 0!==n&&(this.regexp=new RegExp("^"+n+"$")),r.deepFreeze(this)}return e.prototype.toString=function(){return this.templateText},e.prototype.expand=function(e){var t,n="";for(t=0;t<this.expressions.length;t+=1)n+=this.expressions[t].expand(e);return n},e.prototype.extract=function(e){var t,n,r,i,o=1,s=!0,a={};if(void 0!==this.regexp&&this.regexp.test(e)){for(i=this.regexp.exec(e),t=0;t<this.expressions.length;t+=1)n=this.expressions[t],void 0===n.literal&&(void 0!==n.operator&&0===n.operator.symbol.length&&1===n.varspecs.length?(r=n.varspecs[0],r.exploded===!1&&null===r.maxLength?-1===i[o].indexOf(",")?(a[r.varname]=decodeURIComponent(i[o]),o+=1):s=!1:s=!1):s=!1);if(s)return a}return!1},e.parse=f,e.UriTemplateError=n,e}();e(c)}(function(e){"use strict";"undefined"!=typeof module?module.exports=e:"function"==typeof define?define([],function(){return e}):"undefined"!=typeof window?window.UriTemplate=e:global.UriTemplate=e});
\ No newline at end of file
/*global RSVP, FileReader */
/*jslint unparam: true */
(function(window, RSVP, FileReader) {
"use strict";
window.loopEventListener = function(target, type, useCapture, callback, allowDefault) {
//////////////////////////
// Infinite event listener (promise is never resolved)
// eventListener is removed when promise is cancelled/rejected
//////////////////////////
var handle_event_callback, callback_promise;
function cancelResolver() {
if (callback_promise !== undefined && typeof callback_promise.cancel === "function") {
callback_promise.cancel();
}
}
function canceller() {
if (handle_event_callback !== undefined) {
target.removeEventListener(type, handle_event_callback, useCapture);
}
cancelResolver();
}
function itsANonResolvableTrap(resolve, reject) {
handle_event_callback = function(evt) {
evt.stopPropagation();
if (allowDefault !== true) {
evt.preventDefault();
}
cancelResolver();
callback_promise = new RSVP.Queue().push(function() {
return callback(evt);
}).push(undefined, function(error) {
if (!(error instanceof RSVP.CancellationError)) {
canceller();
reject(error);
}
});
};
target.addEventListener(type, handle_event_callback, useCapture);
}
return new RSVP.Promise(itsANonResolvableTrap, canceller);
};
window.promiseEventListener = function(target, type, useCapture) {
//////////////////////////
// Resolve the promise as soon as the event is triggered
// eventListener is removed when promise is cancelled/resolved/rejected
//////////////////////////
var handle_event_callback;
function canceller() {
target.removeEventListener(type, handle_event_callback, useCapture);
}
function resolver(resolve) {
handle_event_callback = function(evt) {
canceller();
evt.stopPropagation();
evt.preventDefault();
resolve(evt);
return false;
};
target.addEventListener(type, handle_event_callback, useCapture);
}
return new RSVP.Promise(resolver, canceller);
};
window.promiseReadAsText = function(file) {
return new RSVP.Promise(function(resolve, reject) {
var reader = new FileReader();
reader.onload = function(evt) {
resolve(evt.target.result);
};
reader.onerror = function(evt) {
reject(evt);
};
reader.readAsText(file);
});
};
})(window, RSVP, FileReader);
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<!-- renderjs -->
<script src="source/audioplayer/lib/rsvp.min.js" type="text/javascript"></script>
<script src="source/audioplayer/lib/renderjs.min.js" type="text/javascript"></script>
<script src="source/audioplayer/lib/jquery.js" type="text/javascript"></script>
<script src="source/audioplayer/lib/handlebars.min.js"></script>
<script src="source/audioplayer/mixin_promise.js" type="text/javascript"></script>
<script id="network" type="text/x-handlebars-template">
{{#each rows}}
<li>
{{#compare this.doc.type}}
<a href=#page=control&id={{this.id}}&action=local>
{{this.doc.title}}
</a>
{{else}}
<a href=#page=video_control&id={{this.id}}&action=local>
{{this.doc.title}}
</a>
{{/compare}}
</li>
{{/each}}
</script>
<!-- custom script -->
<script src="gadget_officejs_audioplayer_playlist_local.js" type="text/javascript"></script>
<body>
<input type="search" class="research" placeholder="research..."/>
<div data-role="content">
<ul data-role="listview" data-split-icon="delete" data-split-theme="d">
</ul>
</div>
<div class="info">
</div>
<div data-role="footer" data-position="fixed" data-theme="b">
<div data-role="navbar" >
<ul>
<li><a data-role="button" class="offline" data-icon="search">offline</a></li>
<li><a data-role="button" class="online" data-icon="search">online</a></li>
</ul>
</div><!-- /navbar -->
</div><!-- /footer -->
</body>
</html>
/*global window, rJS, RSVP, console, jQuery, $, JSON, Handlebars,
loopEventListener, RegExp */
/*jslint maxlen:80, nomen: true */
(function(window, rJS, $, Handlebars, loopEventListener) {
"use strict";
var gk = rJS(window), network_source = gk.__template_element.getElementById("network").innerHTML, network = Handlebars.compile(network_source);
gk.declareAcquiredMethod("allDocs", "allDocs").declareAcquiredMethod("displayThisPage", "displayThisPage").declareAcquiredMethod("displayThisTitle", "displayThisTitle").declareAcquiredMethod("plEnablePage", "plEnablePage").declareAcquiredMethod("pleaseRedirectMyHash", "pleaseRedirectMyHash").declareMethod("render", function(options) {
var gadget = this, list = gadget.__element.getElementsByTagName("ul")[0];
return new RSVP.Queue().push(function() {
return RSVP.all([ gadget.displayThisPage({
page: "playlist",
id: "offline"
}), gadget.displayThisPage({
page: "playlist",
id: "online"
}) ]);
}).push(function(param_list) {
gadget.__element.getElementsByClassName("offline")[0].href = param_list[0];
gadget.__element.getElementsByClassName("online")[0].href = param_list[1];
}).push(function() {
return gadget.allDocs({
include_docs: true
});
}).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) {
exp = new RegExp(options.id, "i");
if (e.data.rows[i].doc.title.search(exp) !== -1) {
tmp[j] = e.data.rows[i];
j += 1;
}
}
gadget.id = options.id;
}
list.innerHTML = network({
rows: tmp
});
$(list).listview("refresh");
return gadget.displayThisTitle("localhost playlist: " + tmp.length + " media");
}).fail(function(error) {
if (!(error instanceof RSVP.CancellationError)) {
gadget.__element.getElementsByClassName("info")[0].innerHTML = "please enable local server";
}
});
}).declareMethod("startService", function() {
var g = this, research = g.__element.getElementsByClassName("research")[0];
if (g.id !== undefined) {
research.value = g.id;
}
return new RSVP.Queue().push(function() {
return g.plEnablePage();
}).push(function() {
return loopEventListener(research, "change", false, function() {
return new RSVP.Queue().push(function() {
return g.displayThisPage({
page: "playlist",
id: research.value
});
}).push(function(url) {
window.location = url;
});
});
});
});
})(window, rJS, jQuery, Handlebars, loopEventListener);
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<head>
<title>audioplayer io</title>
<!-- renderjs -->
<script src="source/audioplayer/lib/rsvp.min.js" type="text/javascript"></script>
<script src="source/audioplayer/lib/renderjs.min.js" type="text/javascript"></script>
<!-- jio core dependencies -->
<script src="source/audioplayer/lib/URI.js" type="text/javascript"></script>
<script src="source/audioplayer/lib/uritemplate.min.js" type="text/javascript"></script>
<script src="source/audioplayer/lib/jio.js" type="text/javascript"></script>
<script src="source/audioplayer/mixin_promise.js" type="text/javascript"></script>
<script src="source/audioplayer/lib/id3-minimized.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_officejs_audioplayer_upload.js" type="text/javascript"></script>
</head>
<body>
<h1> the music uploaded is duplicated in browser, using of localhost or online is recommmended </h1>
<input type="file" multiple />
<ul class="info">
</ul>
</body>
</html>
button.loop{width:10em}#visualizer{text-align:center}#video{text-align:center}video#videoControl{width:50%;height:20%}canvas#can{width:50%;height:20%}progress.bar{position:inherit;display:block;height:1em;width:100%;-moz-border-radius:.5em;-webkit-border-radius:.5em;border-radius:.5em;-moz-box-shadow:0 .1em .5em #000 inset,0 .1em 0 #444;-webkit-box-shadow:0 .1em .5em #000 inset,0 .1em 0 #444;box-shadow:0 .1em .5em #000 inset,0 .1em 0 #444}
\ No newline at end of file
image_module/officejs_audioplayer_*
web_page_module/officejs_audioplayer_*
web_site_module/officejs_audioplayer
web_site_module/officejs_audioplayer/**
web_page_module/ckeditor_*
image_module/ckeditor_*
web_page_module/gadget_ckeditor_*
......
......@@ -26,4 +26,8 @@ web_site_module/officejs_cribjs/**
web_site_module/officejs_whiteboard
web_site_module/officejs_export
web_site_module/officejsoldv1
web_site_module/officejsoldv1/**
\ No newline at end of file
web_site_module/officejsoldv1/**
image_module/officejs_audioplayer_*
web_page_module/officejs_audioplayer_*
web_site_module/officejs_audioplayer
web_site_module/officejs_audioplayer/**
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment