Commit 1bd101f2 authored by Xiaowu Zhang's avatar Xiaowu Zhang

add home url in playlist gadget

parent ea1a9ba8
......@@ -51,6 +51,9 @@
return value;
});
})
.allowPublicAcquisition("plShowPage", function (param_list) {
return this.aq_pleasePublishMyState({page: param_list[0]});
})
.allowPublicAcquisition("nextToPlay", function () {
var id = nextId(),
name = playlist[id];
......@@ -262,6 +265,11 @@
list.noDisplay();
io.noDisplay();
that.display();
control.isPaused().then(function (paused) {
if (!paused) {
animation.showAnimation();
}
});
}
});
}(window, rJS, jQuery, RSVP));
......@@ -16,6 +16,16 @@
<script src="./playlist.js" type="text/javascript"></script>
<body>
<div data-role="header" data-position="fullscreen">
<div data-role="navbar">
<ul>
<li><a href="#page" class="home">home</a></li>
</ul>
</div>
</div>
<div data-role="content">
<ul data-role="listview" data-autodividers="true" data-filter="true" data-split-icon="delete" data-split-theme="d">
</ul>
......
......@@ -7,9 +7,11 @@
var gk = rJS(window);
gk.declareMethod('display', function (attachment) {
this.playlist.style.display = "";
this.home.style.display = "";
})
.declareMethod('noDisplay', function (attachment) {
this.playlist.style.display = "none";
this.home.style.display = "none";
})
.declareMethod('initList', function (array) {
var i,
......@@ -36,8 +38,9 @@
$(this.list).listview("refresh");
});
gk.ready(function (g) {
g.playlist = g.__element.getElementsByTagName('div')[0];
g.list = g.__element.getElementsByTagName('ul')[0];
g.playlist = g.__element.getElementsByTagName('div')[2];
g.list = g.__element.getElementsByTagName('ul')[1];
g.home = g.__element.getElementsByTagName('div')[0];
$(g.__element).trigger("create");
});
}(window, rJS, jQuery));
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