Skip to content

Commit

Permalink
update size of the cell
Browse files Browse the repository at this point in the history
  • Loading branch information
badetitou committed Jun 13, 2019
1 parent 1d5890c commit 8d9d480
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/EMM-Importer/EMMLibraryImporter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ EMMLibraryImporter >> createSongFromFile: file [
folder := (self ensureFolderFromFileReference: file parent).
folder addSong: song.
song folder: folder.
song title: id3parser id3v2Tag title.
song path: file.
^ song
]
Expand Down
1 change: 0 additions & 1 deletion src/EMM-WebApplication/EMMFoldersModule.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ EMMFoldersModule >> renderContentOn: html [
mdlTextColorAccent;
with: 'Selected element: ' , (selectedElement ifNil: [ 'No element selected' ] ifNotNil: [ selectedElement name ]).
html div
style: 'height: 400px';
with:
((MDLNestedList elements: self session model directories values children: [ :child | #() ])
format: [ :emmmDirectory | emmmDirectory name ];
Expand Down
23 changes: 16 additions & 7 deletions src/EMM-WebApplication/EMMListModule.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,41 @@ EMMListModule >> initialize [
{ #category : #rendering }
EMMListModule >> renderContentOn: html [
html mdlTable
attributeAt: 'width' put: '100%';
with: [ html
tableHead: [ html
tableRow: [ html mdlTableHeading
nonNumerical;
with: 'Title'.
html mdlTableHeading
nonNumerical;
with: 'Author'.
html mdlTableHeading: 'Lenght'.
html mdlTableHeading: 'Author'.
html mdlTableHeading: 'Play' ] ].

html mdlTableHeading
nonNumerical;
with: 'Play' ] ].
html
tableBody: [ datas
do: [ :song |
html
tableRow: [ html mdlTableCell
nonNumerical;
with: song name.
html mdlTableCell
nonNumerical;
with: 'le'.
with: song title.
html mdlTableCell
nonNumerical;
with: song artists asOrderedCollection first name.
html mdlTableCell with: 'le'.
html mdlTableCell
nonNumerical;
with: [ html mdlAnchorButton
callback: [ (EMMMusicPlayer new playSong: song) play. ];
callback: [ (EMMMusicPlayer new playSong: song) play ];
colored;
icon;
with: [ html mdlIcon: 'play_arrow' ] ] ] ] ] ]
]

{ #category : #accessing }
EMMListModule >> size [
^ 8
]
5 changes: 5 additions & 0 deletions src/EMM-WebApplication/EMMModule.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ EMMModule class >> modulesToDisplay [
EMMModule class >> priority [
^ self subclassResponsibility
]

{ #category : #accessing }
EMMModule >> size [
^ 4
]
3 changes: 2 additions & 1 deletion src/EMM-WebApplication/EMMOverviewPage.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ EMMOverviewPage >> renderContentOn: html [
with: [ EMMModule modulesToDisplay
do: [ :module |
html mdlCell
size: 4;
style: 'height: 400px; overflow: auto';
size: (self moduleInstanceOf: module) size;
shadow: 2;
with: [ html render: (self moduleInstanceOf: module) ] ] ]
]
13 changes: 12 additions & 1 deletion src/EMM/EMMMSong.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Class {
'folder',
'name',
'artists',
'path'
'path',
'title'
],
#category : #EMM
}
Expand Down Expand Up @@ -60,3 +61,13 @@ EMMMSong >> path: anObject [
EMMMSong >> printOn: aStream [
aStream nextPutAll: self name
]

{ #category : #accessing }
EMMMSong >> title [
^ title
]

{ #category : #accessing }
EMMMSong >> title: anObject [
title := anObject
]

0 comments on commit 8d9d480

Please sign in to comment.