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

add home url in playlist gadget

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