PageSourceSearch

https://busk.co/lib/js/newchanges.js

js busk.co collected 2026-09-24 19:35:16 UTC 6,585 bytes, 258 lines download raw bytes

1$(function(){
2  'use strict';
3  // Events
4  fullMenu();
5
6
7  // Full screen Menu
8
9  function fullMenu() {
10
11    $('.menu-toggle').on('click', function(e){
12      e.preventDefault();
13      $('.menu').toggleClass('off');
14      $(this).toggleClass('open');
15    });
16
17    $('#share-input').on('click', function() {
18      $('.share-hide').toggleClass('share-opt');
19    });
20  }
21
22  // Sign up + log in
23
24
25  var input = $(this).find('input[name=send]');
26
27  function changeContent(){
28
29    if (($(window).width() < 620)) {
30      input.val('Sign up');
31    }
32  }
33
34  changeContent();
35
36  // Settings menu behavior
37
38  $(window).scroll(function(){
39
40    var icon = $('.show-icon'),
41        inbox_alert = $('.settingNav-alert'),
42        flash = $('.flash.fixed');
43
44    if (($(window).scrollTop() > 60) && ($(window).width() < 769)){
45      icon.fadeOut('slow');
46      inbox_alert.addClass('alertMobile');
47      flash.addClass('scrollMobile');
48      
49    } else {
50      icon.show();
51      inbox_alert.removeClass('alertMobile');
52      flash.removeClass('scrollMobile');
53    }
54  });
55
56
57  // Click-fan button
58
59  var fan = $('.click-fan');
60  fan.on('click', function(e) {
61	  var $this = $(this);
62	  if($this.hasClass('loguedin'))
63	  {
64		  var bid = $('.click-fan').data('id');
65		  $.post('/profile/fan', { bid: bid }, function(data){
66			var response = jQuery.parseJSON(data);
67			if(response.success)
68			{
69				$('#fan').html((response.count)+' Fans');
70				fan.toggleClass('is-fan', response.is_fan);
71			}
72		  });
73	  }
74	  else
75	  {
76		  console.log('Paso por aqui');
77		  window.location.href = '/login';
78	  }
79  });
80
81  // GIGS
82
83  var gigs = $('#gigs'),
84      gigs_btn = $('#gigs-button'),
85      gigs_title = $('.gigsTitle'),
86      gigs_mobile_btn = $('.gigs-mobile'),
87      gigs_close = $('.mobile'),
88      gigs_backHire = $('#gigs-backHire'),
89      gigs_quote = $('.gigs-btnQoute'), // get quote
90      gigs_quoteA = $('#gigs-btnQuote2'), // get quote
91      gigs_one = $('#gigsOne'), // Form in profile
92      gigs_two = $('#gigsTwo'); // Default in profile
93
94
95  function showGigs(){
96
97    if ( gigs_btn.hasClass('btn-orange-big') ){
98      gigs.slideToggle();
99      // gigs_title.fadeIn( 3000 );
100      gigs_one.show();
101      gigs_two.hide();
102      gigs_btn.toggleClass('btn-orange-big closeGigs').html('<span class="icon-remove"></span>Close Gigs').animate({opacity: '1'}, 3000);
103    } else if ( gigs_btn.hasClass('closeGigs') ) {
104      // gigs_title.hide();
105      gigs.slideToggle();
106      gigs_btn.toggleClass('btn-orange-big closeGigs').html('HIRE ME');
107    }
108
109  }
110
111  function animateQuote(){
112    gigs_one.slideToggle('slow');
113    gigs_two.slideToggle('slow');
114  }
115
116  // Events Gigs
117
118  gigs_btn.click( showGigs );
119  gigs_quote.click( animateQuote );
120  gigs_quoteA.click( animateQuote );
121  gigs_backHire.click( animateQuote );
122
123  //gigs_mobile_btn.click( showMobile );
124
125  gigs_mobile_btn.on('click', function(e) {
126    gigs.slideToggle();
127    // gigs_title.fadeIn( 2000 );
128    gigs_mobile_btn.hide();
129    gigs_two.hide();
130  });
131
132  gigs_close.on('click', function(e) {
133    //e.preventDefault();
134    gigs.slideToggle();
135    // gigs_title.hide( 3000 );
136    gigs_mobile_btn.fadeIn('slow');
137  });
138
139
140  //New splashpage
141  var $banner_forum = $('.bannerForum'),
142      $banner_close = $('.banner_close');
143
144  $banner_close.on('click', function(e){
145    e.preventDefault();
146    $banner_forum.fadeOut();
147  });
148
149
150
151  //Smooth page scroll to an anchor on the same page - terms and conditions
152
153  $('a[href*=#]:not([href=#]):not([data-toggle=tab]):not([data-toggle=pill])').click(function() {
154    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
155      var target = $(this.hash);
156      target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
157      if (target.length) {
158        $('html,body').animate({
159          scrollTop: target.offset().top
160        }, 1000);
161        return false;
162      }
163    }
164  });
165
166
167// App support page
168
169var allPanels = $('.accordion > dd').hide();
170
171  $('.accordion > dt > a').click(function() {
172    allPanels.slideUp();
173    $(this).parent().next().slideDown();
174    return false;
175  });
176
177
178// Music
179
180  profile_albums();
181
182
183  function profile_albums(){
184
185    var $arrow = $('.music-selection-arrow');
186    var $select = $('.music-grid-itemDesc');
187    var $album_select = $('.music-selection');
188    var $get_album = $('.music-grid-itemBtn > .btn-get-album');
189
190    $get_album.on('click', function(e) {
191		var $this = $(this);
192		if($this.hasClass('albumR'))
193			$arrow.addClass('arrowRight');
194		else if($this.hasClass('albumC'))
195			$arrow.addClass('arrowCenter');
196		else if($this.hasClass('albumL'))
197			$arrow.addClass('arrowCenter');
198
199		var content = $this.closest(".music-grid-item").find(".album-content").html();
200    $select.removeClass('music-grid-itemSelect');
201    $this.parent().next('.music-grid-itemDesc').addClass('music-grid-itemSelect');
202        $album_select.html(content);
203        $album_select.fadeIn();
204        e.preventDefault();
205
206    });
207
208    $album_select.on('click', '.content-close', function(e) {
209		$arrow.removeClass('arrowRight');
210		$select.removeClass('music-grid-itemSelect');
211		$get_album.removeClass('btn-disabled');
212		$album_select.fadeOut();
213		e.preventDefault();
214    });
215
216	var $btnFavoriteButtons = $('.music-grid-item .btn-favorite');
217	$btnFavoriteButtons.click(function(e){
218		var $this = $(this);
219		var albumId = $this.data("id");
220		console.log("El id del album es", albumId);
221		$.post('/profile/album/favorite', { useralbum_id: albumId }, function(data){
222			try{
223				console.log("Procesando", data);
224				var response = $.parseJSON(data);
225				var count = response.count;
226				$this.children('.favorite-counter').html(count);
227				if(count > 0)
228					$this.removeClass("btn-lightgrey").addClass("btn-fucsia");
229				else
230					$this.addClass("btn-lightgrey").removeClass("btn-fucsia");
231			}
232			catch(e)
233			{
234				console.log(e);
235			}
236	    });
237		e.preventDefault();
238	});
239
240	//console.log($btnDonateAlbum.length);
241	//console.log($btnDonateAlbum.html());
242	$album_select.on('click', '.btn-donate-album', function(e) {
243		var $this = $(this);
244		var currency = $this.data("currency");
245		var amount = $this.data("amount");
246		var donateUrl = $this.data("donate-url");
247		var paypalDonateUrl = $this.data("donate-paypal-url");
248    var minimumDonation = $this.data("minimum");
249
250		$("#album-edit-currency").val(currency);
251		$("#album-edit-amount").val(amount);
252    $("#album-minimum").val(minimumDonation);
253		$("#album-stripe-form").attr('action', donateUrl);
254		$("#album-paypal-form").attr('action', paypalDonateUrl);
255
256	});
257  }
258});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.