2012-10-06 16:36:05 +00:00
|
|
|
(function(context,$) {
|
|
|
|
|
|
2012-12-07 00:28:48 +00:00
|
|
|
"use strict";
|
|
|
|
|
|
2012-10-06 16:36:05 +00:00
|
|
|
context.JK = context.JK || {};
|
|
|
|
|
context.JK.CreateSessionScreen = function(app) {
|
2012-10-14 15:48:56 +00:00
|
|
|
var logger = context.JK.logger;
|
2013-11-27 05:57:49 +00:00
|
|
|
var rest = context.JK.Rest();
|
2012-10-17 02:30:00 +00:00
|
|
|
var realtimeMessaging = context.JK.JamServer;
|
2013-10-21 22:13:53 +00:00
|
|
|
var invitationDialog = null;
|
2014-01-14 06:12:00 +00:00
|
|
|
var inviteMusiciansUtil = null;
|
2013-02-05 07:58:19 +00:00
|
|
|
var MAX_GENRES = 1;
|
2013-09-22 01:25:20 +00:00
|
|
|
var sessionSettings = {};
|
2014-03-13 08:47:27 +00:00
|
|
|
var friendInput = null;
|
2012-10-06 16:36:05 +00:00
|
|
|
|
2012-11-08 15:13:47 +00:00
|
|
|
function beforeShow(data) {
|
2014-01-14 06:12:00 +00:00
|
|
|
inviteMusiciansUtil.clearSelections();
|
2013-06-09 17:02:53 +00:00
|
|
|
context.JK.GenreSelectorHelper.render('#create-session-genre');
|
2012-11-08 15:13:47 +00:00
|
|
|
resetForm();
|
|
|
|
|
}
|
|
|
|
|
|
2013-02-01 02:42:07 +00:00
|
|
|
function afterShow(data) {
|
2014-01-14 06:12:00 +00:00
|
|
|
inviteMusiciansUtil.loadFriends();
|
2014-04-01 23:38:36 +00:00
|
|
|
|
|
|
|
|
context.JK.guardAgainstBrowser(app);
|
2013-02-01 02:42:07 +00:00
|
|
|
}
|
|
|
|
|
|
2012-11-08 15:13:47 +00:00
|
|
|
function resetForm() {
|
2014-02-10 22:43:09 +00:00
|
|
|
<% if Rails.application.config.autocheck_create_session_agreement %>
|
|
|
|
|
$('#intellectual-property').iCheck('check').attr('checked', true);
|
|
|
|
|
<% else %>
|
2013-10-23 16:57:38 +00:00
|
|
|
$('#intellectual-property').iCheck('uncheck').attr('checked', false);
|
2014-02-10 22:43:09 +00:00
|
|
|
<% end %>
|
2013-07-25 05:41:26 +00:00
|
|
|
|
2012-12-07 00:28:48 +00:00
|
|
|
var $form = $('#create-session-form');
|
2013-07-12 07:50:34 +00:00
|
|
|
var description = sessionSettings.hasOwnProperty('description') ? sessionSettings.description : '';
|
|
|
|
|
$('textarea[name="description"]', $form).val(description);
|
|
|
|
|
var genre = sessionSettings.hasOwnProperty('genres') && sessionSettings.genres.length > 0 ? sessionSettings.genres[0].id : '';
|
|
|
|
|
context.JK.GenreSelectorHelper.reset('#create-session-genre', genre);
|
|
|
|
|
|
2014-02-18 05:33:16 +00:00
|
|
|
var bandId = sessionSettings.hasOwnProperty('band_id') ? sessionSettings.band_id : '';
|
|
|
|
|
$('#band-list', $form).val(bandId);
|
|
|
|
|
|
2014-02-18 20:32:54 +00:00
|
|
|
var musician_access = sessionSettings.hasOwnProperty('musician_access') ? sessionSettings.musician_access : true;
|
2014-02-18 22:35:23 +00:00
|
|
|
$('#musician-access').val(musician_access.toString());
|
2014-02-18 05:33:16 +00:00
|
|
|
|
2013-07-24 06:57:47 +00:00
|
|
|
toggleMusicianAccess();
|
|
|
|
|
|
|
|
|
|
if (musician_access) {
|
|
|
|
|
var approval_required = sessionSettings.hasOwnProperty('approval_required') ? sessionSettings.approval_required : false;
|
2013-10-23 18:45:46 +00:00
|
|
|
$('#musician-access-option-' + approval_required).iCheck('check').attr('checked', 'checked');
|
2013-07-24 06:57:47 +00:00
|
|
|
}
|
|
|
|
|
|
2014-02-18 20:32:54 +00:00
|
|
|
var fan_access = sessionSettings.hasOwnProperty('fan_access') ? sessionSettings.fan_access : true;
|
2014-02-18 22:35:23 +00:00
|
|
|
$('#fan-access').val(fan_access.toString());
|
2013-07-24 06:57:47 +00:00
|
|
|
toggleFanAccess();
|
|
|
|
|
|
|
|
|
|
if (fan_access) {
|
2014-02-18 20:32:54 +00:00
|
|
|
var fan_chat = sessionSettings.hasOwnProperty('fan_chat') ? sessionSettings.fan_chat : true;
|
2013-10-23 18:45:46 +00:00
|
|
|
$('#fan-chat-option-' + fan_chat).iCheck('check').attr('checked', 'checked');
|
2013-07-24 06:57:47 +00:00
|
|
|
}
|
2014-01-07 23:30:23 +00:00
|
|
|
|
2014-02-18 05:33:16 +00:00
|
|
|
context.JK.dropdown($('#musician-access', $form));
|
|
|
|
|
context.JK.dropdown($('#fan-access', $form));
|
|
|
|
|
|
2014-03-13 08:47:27 +00:00
|
|
|
$(friendInput)
|
2014-01-07 23:30:23 +00:00
|
|
|
.unbind('blur')
|
|
|
|
|
.attr("placeholder", "Looking up friends...")
|
|
|
|
|
.prop('disabled', true)
|
2012-11-08 15:13:47 +00:00
|
|
|
}
|
|
|
|
|
|
2014-04-22 17:53:41 +00:00
|
|
|
function validateForm() {
|
2013-07-25 05:41:26 +00:00
|
|
|
//var errors = [];
|
|
|
|
|
var isValid = true;
|
2012-11-22 17:21:50 +00:00
|
|
|
var $form = $('#create-session-form');
|
|
|
|
|
|
2013-01-14 01:43:48 +00:00
|
|
|
// Description can't be empty
|
|
|
|
|
var description = $('#description').val();
|
|
|
|
|
if (!description) {
|
2013-07-25 05:41:26 +00:00
|
|
|
$('#divDescription .error-text').remove();
|
|
|
|
|
$('#divDescription').addClass("error");
|
2013-07-25 05:47:54 +00:00
|
|
|
$('#description').after("<ul class='error-text'><li>Description is required</li></ul>");
|
2013-07-25 05:41:26 +00:00
|
|
|
isValid = false;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$('#divDescription').removeClass("error");
|
2012-11-22 17:21:50 +00:00
|
|
|
}
|
2013-01-14 01:43:48 +00:00
|
|
|
|
2013-06-09 17:02:53 +00:00
|
|
|
var genres = context.JK.GenreSelectorHelper.getSelectedGenres('#create-session-genre');
|
2013-01-14 01:43:48 +00:00
|
|
|
|
2013-02-16 13:51:28 +00:00
|
|
|
if (genres.length === 0) {
|
2013-07-25 05:41:26 +00:00
|
|
|
$('#divGenre .error-text').remove();
|
|
|
|
|
$('#divGenre').addClass("error");
|
2013-07-25 05:47:54 +00:00
|
|
|
$('#create-session-genre').after("<ul class='error-text'><li>You must select a genre.</li></ul>");
|
2013-07-25 05:41:26 +00:00
|
|
|
isValid = false;
|
2012-11-03 00:29:58 +00:00
|
|
|
}
|
2013-07-25 05:41:26 +00:00
|
|
|
else {
|
|
|
|
|
$('#divGenre').removeClass("error");
|
2012-11-22 17:21:50 +00:00
|
|
|
}
|
|
|
|
|
|
2013-07-25 05:41:26 +00:00
|
|
|
// if (genres.length > MAX_GENRES) {
|
|
|
|
|
// errors.push(['#genre-list', "No more than " + MAX_GENRES + "genres are allowed."]);
|
|
|
|
|
// }
|
|
|
|
|
|
2013-07-09 05:37:58 +00:00
|
|
|
var intellectualPropertyChecked = $('#intellectual-property').is(':checked');
|
|
|
|
|
if (!intellectualPropertyChecked) {
|
2013-07-25 05:41:26 +00:00
|
|
|
$('#divIntellectualProperty .error-text').remove();
|
|
|
|
|
$('#divIntellectualProperty').addClass("error");
|
2013-07-25 05:47:54 +00:00
|
|
|
$('#divTerms').after("<ul class='error-text'><li>You must accept the JamKazam Terms of Service.</li></ul>");
|
2013-07-25 05:41:26 +00:00
|
|
|
isValid = false;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$('#divIntellectualProperty').removeClass("error");
|
2013-07-09 05:37:58 +00:00
|
|
|
}
|
|
|
|
|
|
2013-07-25 05:41:26 +00:00
|
|
|
return isValid;
|
2012-11-03 00:29:58 +00:00
|
|
|
}
|
|
|
|
|
|
2012-10-06 16:36:05 +00:00
|
|
|
function submitForm(evt) {
|
2013-02-16 13:51:28 +00:00
|
|
|
evt.preventDefault();
|
2013-01-14 01:43:48 +00:00
|
|
|
|
2014-04-01 23:38:36 +00:00
|
|
|
if(!gon.isNativeClient) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2014-04-09 17:25:52 +00:00
|
|
|
if(!context.JK.JamServer.connected) {
|
|
|
|
|
app.notifyAlert("Not Connected", 'To create or join a session, you must be connected to the server.');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2013-11-05 22:44:40 +00:00
|
|
|
// If user hasn't completed FTUE - do so now.
|
2014-03-01 14:58:42 +00:00
|
|
|
if (!(context.JK.hasOneConfiguredDevice())) {
|
2013-11-05 22:44:40 +00:00
|
|
|
app.afterFtue = function() { submitForm(evt); };
|
2014-02-21 22:02:51 +00:00
|
|
|
app.layout.startNewFtue();
|
2014-04-01 23:38:36 +00:00
|
|
|
return false;
|
2013-11-05 22:44:40 +00:00
|
|
|
}
|
|
|
|
|
|
2014-03-06 17:56:15 +00:00
|
|
|
// if for some reason there are 0 tracks, show FTUE
|
|
|
|
|
var tracks = context.JK.TrackHelpers.getUserTracks(context.jamClient);
|
|
|
|
|
if(tracks.length == 0) {
|
|
|
|
|
logger.error("we should never have 0 tracks and have gotten this far. Launch FTUE is the best we can do right now")
|
|
|
|
|
// If user hasn't completed FTUE - do so now.
|
|
|
|
|
app.afterFtue = function() { submitForm(evt); };
|
|
|
|
|
app.layout.startNewFtue();
|
2014-04-01 23:38:36 +00:00
|
|
|
return false;
|
2014-03-06 17:56:15 +00:00
|
|
|
}
|
|
|
|
|
|
2013-07-25 05:41:26 +00:00
|
|
|
var isValid = validateForm();
|
|
|
|
|
if (!isValid) {
|
|
|
|
|
// app.notify({
|
|
|
|
|
// title: "Validation Errors",
|
|
|
|
|
// text: JSON.stringify(formErrors)
|
|
|
|
|
// });
|
2012-11-03 00:29:58 +00:00
|
|
|
return false;
|
|
|
|
|
}
|
2013-01-30 02:32:12 +00:00
|
|
|
|
2013-01-14 01:43:48 +00:00
|
|
|
var data = {};
|
2012-10-26 03:24:05 +00:00
|
|
|
data.client_id = app.clientId;
|
2013-02-16 13:51:28 +00:00
|
|
|
data.description = $('#description').val();
|
2012-12-02 21:12:25 +00:00
|
|
|
data.as_musician = true;
|
2013-02-16 13:51:28 +00:00
|
|
|
data.legal_terms = true; // this overrides the default of 'on', which isn't satisfying our concept of boolean
|
2013-07-09 05:37:58 +00:00
|
|
|
data.intellectual_property = $('#intellectual-property').is(':checked');
|
2013-01-14 01:43:48 +00:00
|
|
|
|
2013-06-09 17:02:53 +00:00
|
|
|
data.genres = context.JK.GenreSelectorHelper.getSelectedGenres('#create-session-genre');
|
2013-01-14 01:43:48 +00:00
|
|
|
|
|
|
|
|
data.musician_access = $('#musician-access option:selected').val() === "true" ? true : false;
|
|
|
|
|
data.approval_required = $("input[name='musician-access-option']:checked").val() === "true" ? true : false;
|
|
|
|
|
|
|
|
|
|
data.fan_access = $('#fan-access option:selected').val() === "true" ? true : false;
|
|
|
|
|
data.fan_chat = $("input[name='fan-chat-option']:checked").val() === "true" ? true : false;
|
|
|
|
|
|
2013-02-16 13:51:28 +00:00
|
|
|
if ($('#band-list option:selected').val() !== '') {
|
2013-01-14 01:43:48 +00:00
|
|
|
data.band = $('#band-list option:selected').val();
|
2012-11-03 00:29:58 +00:00
|
|
|
}
|
2014-06-09 20:43:16 +00:00
|
|
|
data.audio_latency = context.jamClient.FTUEGetExpectedLatency().latency;
|
2012-11-08 15:13:47 +00:00
|
|
|
|
2012-11-23 19:09:01 +00:00
|
|
|
// 1. If no previous session data, a single stereo track with the
|
|
|
|
|
// top instrument in the user's profile.
|
|
|
|
|
// 2. Otherwise, use the tracks from the last created session.
|
2013-02-16 13:51:28 +00:00
|
|
|
// Defaulting to 1st instrument in profile always at the moment.
|
2014-03-06 17:56:15 +00:00
|
|
|
data.tracks = tracks;
|
2012-11-08 15:13:47 +00:00
|
|
|
|
2013-09-10 06:14:23 +00:00
|
|
|
$('#btn-create-session').addClass('button-disabled');
|
|
|
|
|
$('#btn-create-session').bind('click', false);
|
|
|
|
|
|
2014-05-06 21:17:26 +00:00
|
|
|
rest.legacyCreateSession(data)
|
|
|
|
|
.done(function(response) {
|
|
|
|
|
var newSessionId = response.id;
|
|
|
|
|
var invitationCount = inviteMusiciansUtil.createInvitations(newSessionId, function() {
|
|
|
|
|
context.location = '/client#/session/' + newSessionId;
|
|
|
|
|
});
|
|
|
|
|
// Re-loading the session settings will cause the form to reset with the right stuff in it.
|
|
|
|
|
// This is an extra xhr call, but it keeps things to a single codepath
|
|
|
|
|
loadSessionSettings();
|
|
|
|
|
$('#btn-create-session').removeClass('button-disabled');
|
|
|
|
|
$('#btn-create-session').unbind('click', false);
|
|
|
|
|
|
|
|
|
|
context.JK.GA.trackSessionCount(data.musician_access, data.fan_access, invitationCount);
|
|
|
|
|
|
|
|
|
|
context.JK.GA.trackSessionMusicians(context.JK.GA.SessionCreationTypes.create);
|
|
|
|
|
})
|
|
|
|
|
.fail(function(jqXHR) {
|
|
|
|
|
var handled = false;
|
|
|
|
|
if(jqXHR.status = 422) {
|
|
|
|
|
var response = JSON.parse(jqXHR.responseText);
|
|
|
|
|
if(response["errors"] && response["errors"]["tracks"] && response["errors"]["tracks"][0] == "Please select at least one track") {
|
|
|
|
|
app.notifyAlert("No Inputs Configured", $('<span>You will need to reconfigure your audio device.</span>'));
|
|
|
|
|
handled = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(!handled) {
|
|
|
|
|
app.notifyServerError(jqXHR, "Unable to Create Session");
|
2013-09-10 06:14:23 +00:00
|
|
|
}
|
2014-05-06 21:17:26 +00:00
|
|
|
$('#btn-create-session').removeClass('button-disabled');
|
|
|
|
|
$('#btn-create-session').unbind('click', false);
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
2012-10-06 16:36:05 +00:00
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function events() {
|
2014-01-07 23:30:23 +00:00
|
|
|
$('#create-session-form').on('submit', submitForm);
|
2013-02-01 06:05:57 +00:00
|
|
|
$('#btn-create-session').on("click", submitForm);
|
2013-01-11 03:43:30 +00:00
|
|
|
$('#musician-access').change(toggleMusicianAccess);
|
|
|
|
|
$('#fan-access').change(toggleFanAccess);
|
2012-11-08 15:13:47 +00:00
|
|
|
|
2013-10-21 22:13:53 +00:00
|
|
|
$('div[layout-id="createSession"] .btn-email-invitation').click(function() {
|
2013-09-25 15:34:53 +00:00
|
|
|
invitationDialog.showEmailDialog();
|
2013-07-31 02:10:36 +00:00
|
|
|
});
|
|
|
|
|
|
2013-09-27 02:45:40 +00:00
|
|
|
$('div[layout-id="createSession"] .btn-gmail-invitation').click(function() {
|
2013-09-25 15:34:53 +00:00
|
|
|
invitationDialog.showGoogleDialog();
|
2013-09-07 07:59:55 +00:00
|
|
|
});
|
|
|
|
|
|
2014-01-30 05:03:12 +00:00
|
|
|
$('div[layout-id="createSession"] .btn-facebook-invitation').click(function(e) {
|
|
|
|
|
invitationDialog.showFacebookDialog(e);
|
2013-09-07 07:59:55 +00:00
|
|
|
});
|
|
|
|
|
|
2014-03-13 08:47:27 +00:00
|
|
|
$(friendInput).focus(function() { $(this).val(''); })
|
2013-01-14 01:43:48 +00:00
|
|
|
}
|
|
|
|
|
|
2013-01-11 03:43:30 +00:00
|
|
|
function toggleMusicianAccess() {
|
|
|
|
|
var value = $("#musician-access option:selected").val();
|
2013-01-14 01:43:48 +00:00
|
|
|
if (value == "false") {
|
|
|
|
|
$("input[name='musician-access-option']").attr('disabled', 'disabled');
|
2014-02-18 06:01:14 +00:00
|
|
|
$("input[name='musician-access-option']").parent().addClass("op10");
|
2013-01-11 03:43:30 +00:00
|
|
|
}
|
|
|
|
|
else {
|
2013-01-14 01:43:48 +00:00
|
|
|
$("input[name='musician-access-option']").removeAttr('disabled');
|
2014-02-18 06:01:14 +00:00
|
|
|
$("input[name='musician-access-option']").parent().removeClass("op10");
|
2013-01-11 03:43:30 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function toggleFanAccess() {
|
|
|
|
|
var value = $("#fan-access option:selected").val();
|
2013-01-14 01:43:48 +00:00
|
|
|
if (value == "false") {
|
|
|
|
|
$("input[name='fan-chat-option']").attr('disabled', 'disabled');
|
2014-02-18 06:01:14 +00:00
|
|
|
$("input[name='fan-chat-option']").parent().addClass("op10");
|
2013-01-11 03:43:30 +00:00
|
|
|
}
|
|
|
|
|
else {
|
2013-01-14 01:43:48 +00:00
|
|
|
$("input[name='fan-chat-option']").removeAttr('disabled');
|
2014-02-18 06:01:14 +00:00
|
|
|
$("input[name='fan-chat-option']").parent().removeClass("op10");
|
2013-01-11 03:43:30 +00:00
|
|
|
}
|
2012-11-22 17:21:50 +00:00
|
|
|
}
|
|
|
|
|
|
2013-01-11 03:43:30 +00:00
|
|
|
function loadBands() {
|
|
|
|
|
var url = "/api/users/" + context.JK.currentUserId + "/bands";
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "GET",
|
|
|
|
|
url: url,
|
|
|
|
|
success: bandsLoaded
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function bandsLoaded(response) {
|
|
|
|
|
$.each(response, function() {
|
|
|
|
|
var template = $('#template-band-option').html();
|
|
|
|
|
var bandOptionHtml = context.JK.fillTemplate(template, {value: this.id, label: this.name});
|
|
|
|
|
$('#band-list').append(bandOptionHtml);
|
|
|
|
|
});
|
2014-02-10 22:43:09 +00:00
|
|
|
context.JK.dropdown($('#band-list'));
|
2013-01-11 03:43:30 +00:00
|
|
|
}
|
|
|
|
|
|
2013-07-12 07:50:34 +00:00
|
|
|
function loadSessionSettings() {
|
|
|
|
|
var url = "/api/users/" + context.JK.currentUserId + "/session_settings";
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "GET",
|
|
|
|
|
url: url,
|
|
|
|
|
success: sessionSettingsLoaded
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function sessionSettingsLoaded(response) {
|
2014-02-18 05:33:16 +00:00
|
|
|
if (response != null) {
|
2013-07-24 06:06:44 +00:00
|
|
|
sessionSettings = response;
|
|
|
|
|
}
|
2013-07-12 07:50:34 +00:00
|
|
|
resetForm();
|
|
|
|
|
}
|
|
|
|
|
|
2013-10-23 16:32:15 +00:00
|
|
|
// this exists solely due to a bug in Windows QTWebkit: https://bugreports.qt-project.org/browse/QTBUG-30072
|
|
|
|
|
function initializeButtons() {
|
2013-10-23 18:45:46 +00:00
|
|
|
$('div[layout-id="createSession"] .icheckbuttons input').iCheck({
|
2013-10-23 16:32:15 +00:00
|
|
|
checkboxClass: 'icheckbox_minimal',
|
2013-10-23 18:45:46 +00:00
|
|
|
radioClass: 'iradio_minimal',
|
|
|
|
|
inheritClass: true
|
2013-10-23 16:32:15 +00:00
|
|
|
});
|
|
|
|
|
}
|
2013-10-23 18:45:46 +00:00
|
|
|
|
2014-01-14 06:12:00 +00:00
|
|
|
function initialize(invitationDialogInstance, inviteMusiciansUtilInstance) {
|
2013-10-21 22:13:53 +00:00
|
|
|
invitationDialog = invitationDialogInstance;
|
2014-01-14 06:12:00 +00:00
|
|
|
inviteMusiciansUtil = inviteMusiciansUtilInstance;
|
2014-03-13 09:23:22 +00:00
|
|
|
friendInput = inviteMusiciansUtil.inviteSessionCreate('#create-session-invite-musicians', "<div style='margin-right:140px;'>Start typing friends' names or:</div>"); //'
|
2013-01-14 01:43:48 +00:00
|
|
|
events();
|
2013-01-11 03:43:30 +00:00
|
|
|
loadBands();
|
2013-07-12 07:50:34 +00:00
|
|
|
loadSessionSettings();
|
2013-10-23 16:32:15 +00:00
|
|
|
initializeButtons();
|
2013-02-01 02:42:07 +00:00
|
|
|
var screenBindings = { 'beforeShow': beforeShow, 'afterShow': afterShow };
|
2012-11-08 15:13:47 +00:00
|
|
|
app.bindScreen('createSession', screenBindings);
|
2012-11-22 17:21:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Expose publics
|
|
|
|
|
this.initialize = initialize;
|
|
|
|
|
this.resetForm = resetForm;
|
|
|
|
|
this.submitForm = submitForm;
|
2013-01-14 01:43:48 +00:00
|
|
|
this.validateForm = validateForm;
|
2013-01-11 03:43:30 +00:00
|
|
|
this.loadBands = loadBands;
|
2012-10-06 16:36:05 +00:00
|
|
|
|
2012-11-22 17:21:50 +00:00
|
|
|
return this;
|
2012-10-06 16:36:05 +00:00
|
|
|
};
|
|
|
|
|
|
2013-11-05 22:44:40 +00:00
|
|
|
})(window,jQuery);
|