@@ -74,15 +74,16 @@ templates.resource_tree =
7474
7575 var triggers =
7676 {
77- 'image' :
78- [
79- 'span' ,
80- '**gallery**' ,
81- [ ] ,
82- 'title' , 'Gallery' ,
83- 'handler' , 'resource-group' ,
84- 'class' , 'resource-group-trigger resource-group-images-trigger'
85- ]
77+ // WIP: soon there will be some triggers to display a whole group of resource, e.g. gallery of images, videos, fonts, audios, ...
78+ // 'image':
79+ // [
80+ // 'span',
81+ // 'gallery',
82+ // [],
83+ // 'title','Gallery',
84+ // 'handler','resource-group',
85+ // 'class','resource-group-trigger resource-group-images-trigger'
86+ // ]
8687 }
8788
8889 for ( var groupName in groups )
@@ -161,6 +162,7 @@ templates.resource_detail =
161162 return this . no_data_available ( resource ) ;
162163
163164 var specificTemplate = this [ resource . type ] ?resource . type :'text' ;
165+ if ( ! this [ resource . type ] ) debugger ;
164166
165167 return (
166168 [ 'div' ,
@@ -203,8 +205,8 @@ templates.resource_detail =
203205
204206 return (
205207 [ 'div' ,
206- 'Formatting the resource ' + resource . url + '… ' ,
207- 'class' , 'resource-detail-container-empty'
208+ 'Formatting the resource ' + resource . url + '... ' ,
209+ 'class' , 'resource-detail-container-empty'
208210 ] ) ;
209211 } ,
210212
@@ -247,7 +249,6 @@ templates.resource_detail =
247249
248250 text :function ( resource )
249251 {
250- this . name = 'text' ;
251252 return (
252253 [
253254 [ 'pre' , resource . data . content . stringData ] ,
@@ -300,8 +301,6 @@ templates.resource_detail =
300301
301302 font :function ( resource )
302303 {
303- this . name = 'font' ;
304-
305304 var styleRule = '@font-face{font-family:"resource-' + resource . id + '";src:url("' + resource . data . content . stringData + '");}' ;
306305
307306 return (
@@ -316,9 +315,21 @@ templates.resource_detail =
316315 ] ) ;
317316 } ,
318317
318+ flash :function ( resource )
319+ {
320+ return (
321+ [ 'object' ,
322+ [ 'div' ,
323+ 'Type not supported'
324+ ] ,
325+ 'type' , 'resource.mimeType' ,
326+ 'data' , resource . data . content . stringData ,
327+ 'class' , 'resource-detail-flash'
328+ ] ) ;
329+ } ,
330+
319331 image :function ( resource )
320332 {
321- this . name = 'image' ;
322333 return (
323334 [ 'img' ,
324335 'src' , resource . data . content . stringData ,
0 commit comments