@@ -44,14 +44,13 @@ Evol.ViewAction.Export = Backbone.View.extend({
4444 _renderHTML : function ( ) {
4545 var h = [ ] ,
4646 EvoUI = Evol . UI ,
47- opts = this . options ,
4847 fields = this . getFields ( ) ,
4948 iMax = fields . length ,
5049 useMore = iMax > 14 ;
5150
5251 //string fieldName, fieldlabel, expOut, buffer;
5352 h . push ( '<div class="evol-xpt-form"><div class="evol-xpt-flds">' ,
54- '<div ><label>' , i18nXpt . xpFields , '</label></div>' ,
53+ '<div><label>' , i18nXpt . xpFields , '</label></div>' ,
5554 '<fieldset>'
5655 ) ;
5756
@@ -77,7 +76,7 @@ Evol.ViewAction.Export = Backbone.View.extend({
7776 var fId = 'evol-xpt-format' ,
7877 formatsList = [ ] ;
7978 h . push ( '<label for="' , fId , '">' , i18nXpt . format , '</label>' ) ;
80- _ . each ( opts . formats , function ( format ) {
79+ _ . each ( this . options . formats , function ( format ) {
8180 formatsList . push ( { id : format , text : i18nXpt [ 'format' + format ] } ) ;
8281 } ) ;
8382 h . push ( EvoUI . input . select ( fId , '' , 'evol-xpt-format' , false , formatsList ) ) ;
@@ -143,7 +142,6 @@ Evol.ViewAction.Export = Backbone.View.extend({
143142 } ,
144143
145144 getFields : function ( ) {
146- var opts = this . options ;
147145 if ( ! this . fields ) {
148146 this . fields = Evol . Dico . getFields ( this . uiModel ) ;
149147 }
@@ -155,7 +153,7 @@ Evol.ViewAction.Export = Backbone.View.extend({
155153 return Evol . i18n . getLabel ( 'export.ExportEntit' + keyEnd , this . uiModel [ 'entit' + keyEnd ] ) ;
156154 } ,
157155
158- _preview : function ( format ) { // TODO add field ID
156+ _preview : function ( format ) {
159157 var h = [ ] ,
160158 $e = this . $ ( '.evol-xpt-val' ) ,
161159 fTypes = Evol . Dico . fieldTypes ,
@@ -192,7 +190,7 @@ Evol.ViewAction.Export = Backbone.View.extend({
192190 //header
193191 if ( useHeader ) {
194192 _ . each ( flds , function ( f , idx ) {
195- h . push ( f . label ) ; //TODO f.labelexported || f.label, // name when "exported"
193+ h . push ( f . label ) ;
196194 if ( idx < fMax ) {
197195 h . push ( sep ) ;
198196 }
@@ -358,7 +356,6 @@ Evol.ViewAction.Export = Backbone.View.extend({
358356 h . push ( '</xml>' ) ;
359357 break ;
360358 }
361- //this._resizeSampleBox();
362359 } else {
363360 h . push ( Evol . i18n . nodata ) ;
364361 }
@@ -414,11 +411,6 @@ Evol.ViewAction.Export = Backbone.View.extend({
414411 return v ;
415412 } ,
416413
417- //_resizeSampleBox: function(){
418- // TODO:code and plug to events
419- // this.$().height(xxxx);
420- //},
421-
422414 click_format : function ( evt ) {
423415 var format = $ ( evt . currentTarget ) . val ( ) ;
424416 if ( format === 'XML' ) {
0 commit comments