Skip to content

Commit 0112036

Browse files
committed
update to webstack
1 parent 893c198 commit 0112036

File tree

5 files changed

+64
-17
lines changed

5 files changed

+64
-17
lines changed

web/browse/browse.html

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,42 @@
103103
<a onclick="back_to_playlists_page()" style="display: block;background-color: rgba(36, 142, 179, 0.5)" class="ui-mini ui-btn ui-icon-back ui-btn-icon-left ui-corner-all" data-transition="slidefade" href="#">Back to playlists</a>
104104
</div>
105105
</div>
106+
<div id="recommendation_page" data-role="page" data-theme="b" data-title="RECOMMENDATION">
107+
<div role="main" class="ui-content">
108+
<input type="search" id='manual_search' value='' placeholder="Type a song name, ex- the river - aurora">
109+
<ul class="list" id="recommendation_page_suggestions" data-filter="true" data-input="#manual_search" data-role="listview" data-split-icon="bars" data-split-theme="b" data-inset="true">
110+
<!-- load suggestions here -->
111+
</ul>
112+
<div id="result_div" style="visibility:hidden;">
113+
<div id="HEADER_DIV" style="text-align:center;background-position: center;text-shadow: 1px 3px 14px rgb(0, 0, 0);box-shadow:rgb(0, 0, 0) 0px 0px 30px;">
114+
<div id="HEADER_WRAPPER" style="background-color:rgba(0, 0, 0, 0.27);padding-bottom:25px;">
115+
<h2 style="padding:10px;background-color:rgba(0,0,0,0.53)" >Recommendations</h2>
116+
<div id="wrapper" style="margin:0 auto;width:200px;height:200px;" onMouseOver="show_playOriginal()" onMouseOut="hide_playOriginal()">
117+
<img style="max-height:200px;max-width:200px; box-shadow: 3px 2px 95px rgb(0, 0, 0);opacity: 0.8;" id="ALBUM_ART"/>
118+
<a href="#" id="playOriginalButton" style="height:100%;line-height:200px;text-decoration:none;display:block;" >
119+
<div style="visibility:hidden;" id="playOriginal">
120+
<p>Add this track</p>
121+
</div>
122+
</a>
123+
</div>
124+
<br>
125+
<p style="display: block;background-color: rgba(0, 0, 0, 0.53);padding: 12px;bottom: -41px;position: relative;">
126+
<b>Based on : </b><b id="BASETRACK"></b>
127+
<br>
128+
</p>
129+
</div>
130+
</div>
131+
<hr>
132+
<h5 style="margin: 0px 0px -12px 0px;">Tracks:</h5>
133+
134+
<ul class="list" id="tracks_result_view" data-role="listview" data-split-icon="bars" data-split-theme="b" data-inset="true">
135+
<!-- load result here -->
136+
</ul>
137+
138+
</div>
139+
<hr>
140+
</div>
141+
</div>
106142

107143
</body>
108144
</html>

web/browse/main.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@
7777
background: transparent !important;
7878
}
7979

80+
#recommendation_page{
81+
background: transparent !important;
82+
}
83+
84+
8085
/*list element*/
8186
#country {
8287
background: transparent !important;

web/browse/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function overview(){
116116

117117
function track_option(track_id){
118118
// var channelHref = $('#'+track_id).parent().attr("data-channelhref");
119-
var searchterm = $('#'+track_id).parent().attr("onclick").split("gettrackinfo(\'")[1].split(");")[0];
119+
var searchterm = $('#'+track_id).parent().attr("onclick").split("gettrackinfo(\"")[1].split("\");")[0];
120120
var arr = searchterm.split("!=-=!")
121121
title = arr[0];
122122
artist = arr[1];

web/js/common.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,28 @@ $( document ).ajaxError(function( event, request, settings) {
4141
hideLoading();
4242
});
4343

44+
45+
function msToTime(s) {
46+
47+
// Pad to 2 or 3 digits, default is 2
48+
function pad(n, z) {
49+
z = z || 2;
50+
return ('00' + n).slice(-z);
51+
}
52+
var ms = s % 1000;
53+
s = (s - ms) / 1000;
54+
var secs = s % 60;
55+
s = (s - secs) / 60;
56+
var mins = s % 60;
57+
var hrs = (s - mins) / 60;
58+
59+
return pad(hrs) + ':' + pad(mins) + ':' + pad(secs);
60+
}
61+
62+
function quoteEscape(string) {
63+
return string.replace(/'/g, '\\\\\"');
64+
}
65+
4466
function changeBg(rgba){ // sets bg color var in mainwindow and changes bg color of webview
4567
themeColor = rgba;
4668
var arr = rgba.split(",");

web/recommendation/main.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -150,22 +150,6 @@ function hide_playOriginal()
150150
}
151151

152152

153-
function msToTime(s) {
154-
155-
// Pad to 2 or 3 digits, default is 2
156-
function pad(n, z) {
157-
z = z || 2;
158-
return ('00' + n).slice(-z);
159-
}
160-
var ms = s % 1000;
161-
s = (s - ms) / 1000;
162-
var secs = s % 60;
163-
s = (s - secs) / 60;
164-
var mins = s % 60;
165-
var hrs = (s - mins) / 60;
166-
167-
return pad(hrs) + ':' + pad(mins) + ':' + pad(secs);
168-
}
169153

170154
function quoteEscape(string) {
171155
return string.replace(/'/g, '\\\\\"');

0 commit comments

Comments
 (0)