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