Add new webradio button to be at the top? (Solved)

General discussion about RuneAudio. Do not post any support or feature requests here.

Add new webradio button to be at the top? (Solved)

Postby irishwill2008 » 29 Nov 2016, 11:56

At the moment my add a webradio button is at the end of the list so if i have 100 webradios, i got to scroll to the bottom to add a webradio (If that was the case). Wondering, how do i go about changing this to pop at the top of the list? Rather than the bottom! That would be great, i think many others would feel the same. I had a look at the code but cant seem to get my head around it.

Thanks!
Regards,
Will.
Last edited by irishwill2008 on 30 Nov 2016, 12:41, edited 1 time in total.
irishwill2008
 
Posts: 157
Joined: 26 Jul 2016, 14:49
Location: Ireland

Re: Add new webradio button to be at the top?

Postby hondagx35 » 29 Nov 2016, 17:39

Hi,

change:
Code: Select all
            for (i = 0; (row = data[i]); i += 1) {
                content += parseResponse({
                    inputArr: row,
                    respType: 'db',
                    i: i,
                    inpath: path
                });
            }
            if (path === 'Webradio') {
                content += '<li id="webradio-add" class="db-webradio-add"><i class="fa fa-plus-circle db-icon"></i><span class="sn"><em>add new</em></span><span class="bl">add a webradio to your library</span></li>';
            }

to:
Code: Select all
            if (path === 'Webradio') {
                content += '<li id="webradio-add" class="db-webradio-add"><i class="fa fa-plus-circle db-icon"></i><span class="sn"><em>add new</em></span><span class="bl">add a webradio to your library</span></li>';
            }
            for (i = 0; (row = data[i]); i += 1) {
                content += parseResponse({
                    inputArr: row,
                    respType: 'db',
                    i: i,
                    inpath: path
                });
            }


https://github.com/RuneAudio/RuneUI/blo ... i.js#L1165

Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Add new webradio button to be at the top?

Postby irishwill2008 » 30 Nov 2016, 12:41

Wow,

Did not see that one coming! Was expecting something more advanced rather than popping the code above the for loop xD.

Again Frank like always..

Thanks a million! Appreciate the help:) :mrgreen: :mrgreen:
irishwill2008
 
Posts: 157
Joined: 26 Jul 2016, 14:49
Location: Ireland

support RuneAudio Donate with PayPal


Return to General discussion

Who is online

Users browsing this forum: No registered users and 22 guests