mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 13:07:59 +01:00
Fixed track publishing on FF
Fixed date display on non-webkit browsers
This commit is contained in:
parent
1e45e5ddd1
commit
8431943351
3 changed files with 9 additions and 8 deletions
|
@ -52,7 +52,7 @@
|
|||
if ($isVocal)
|
||||
$rules['lyrics'] = 'required';
|
||||
|
||||
if ($this->_input['track_type_id'] == 2)
|
||||
if (isset($this->_input['track_type_id']) && $this->_input['track_type_id'] == 2)
|
||||
$rules['show_song_ids'] = 'required|exists:show_songs,id';
|
||||
|
||||
$validator = \Validator::make($this->_input, $rules);
|
||||
|
@ -63,8 +63,8 @@
|
|||
$track = $this->_track;
|
||||
$track->title = $this->_input['title'];
|
||||
$track->released_at = $this->_input['released_at'] != "" ? strtotime($this->_input['released_at']) : null;
|
||||
$track->description = $this->_input['description'];
|
||||
$track->lyrics = $this->_input['lyrics'];
|
||||
$track->description = isset($this->_input['description']) ? $this->_input['description'] : '';
|
||||
$track->lyrics = isset($this->_input['lyrics']) ? $this->_input['lyrics'] : '';
|
||||
$track->license_id = $this->_input['license_id'];
|
||||
$track->genre_id = $this->_input['genre_id'];
|
||||
$track->track_type_id = $this->_input['track_type_id'];
|
||||
|
|
|
@ -93,7 +93,7 @@ angular.module('ponyfm').controller "account-track", [
|
|||
return if value == null
|
||||
if typeof(value) == 'object'
|
||||
formData.append name, value, value.name
|
||||
else
|
||||
else if value != null
|
||||
formData.append name, value
|
||||
|
||||
if $scope.edit.track_type_id == 2
|
||||
|
@ -105,6 +105,7 @@ angular.module('ponyfm').controller "account-track", [
|
|||
xhr.send formData
|
||||
|
||||
tracks.getEdit($state.params.track_id).done (track) ->
|
||||
console.log (track.album_id);
|
||||
$scope.edit =
|
||||
id: track.id
|
||||
title: track.title
|
||||
|
|
|
@ -178,6 +178,10 @@ angular.module('ponyfm').filter('pfmdate', [
|
|||
parts = [],
|
||||
fn, match;
|
||||
|
||||
if (typeof(date) == 'object' && date.date) {
|
||||
date = date.date;
|
||||
}
|
||||
|
||||
format = format || 'mediumDate';
|
||||
format = $locale.DATETIME_FORMATS[format] || format;
|
||||
if (isString(date)) {
|
||||
|
@ -192,10 +196,6 @@ angular.module('ponyfm').filter('pfmdate', [
|
|||
date = new Date(date);
|
||||
}
|
||||
|
||||
if (typeof(date) == 'object' && date.date) {
|
||||
date = new Date(date.date);
|
||||
}
|
||||
|
||||
if (!isDate(date)) {
|
||||
return date;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue