@ -252,6 +252,7 @@ var Renderer = function (Cryptpad) {
var makeRemoveElement = Render . makeRemoveElement = function ( id ) {
var makeRemoveElement = Render . makeRemoveElement = function ( id ) {
return [ 'SPAN' , {
return [ 'SPAN' , {
'data-rt-id' : id ,
'data-rt-id' : id ,
'title' : Cryptpad . Messages . poll _remove ,
class : 'remove' ,
class : 'remove' ,
} , [ '✖' ] ] ;
} , [ '✖' ] ] ;
} ;
} ;
@ -259,6 +260,7 @@ var Renderer = function (Cryptpad) {
var makeEditElement = Render . makeEditElement = function ( id ) {
var makeEditElement = Render . makeEditElement = function ( id ) {
return [ 'SPAN' , {
return [ 'SPAN' , {
'data-rt-id' : id ,
'data-rt-id' : id ,
'title' : Cryptpad . Messages . poll _edit ,
class : 'edit' ,
class : 'edit' ,
} , [ '✐' ] ] ;
} , [ '✐' ] ] ;
} ;
} ;
@ -266,6 +268,7 @@ var Renderer = function (Cryptpad) {
var makeLockElement = Render . makeLockElement = function ( id ) {
var makeLockElement = Render . makeLockElement = function ( id ) {
return [ 'SPAN' , {
return [ 'SPAN' , {
'data-rt-id' : id ,
'data-rt-id' : id ,
'title' : Cryptpad . Messages . poll _locked ,
class : 'lock' ,
class : 'lock' ,
} , [ [ 'i' , {
} , [ [ 'i' , {
class : 'fa fa-lock' ,
class : 'fa fa-lock' ,
@ -277,14 +280,11 @@ var Renderer = function (Cryptpad) {
var makeHeadingCell = Render . makeHeadingCell = function ( cell , readOnly ) {
var makeHeadingCell = Render . makeHeadingCell = function ( cell , readOnly ) {
if ( ! cell ) { return [ 'TD' , { } , [ ] ] ; }
if ( ! cell ) { return [ 'TD' , { } , [ ] ] ; }
if ( cell . type === 'text' ) {
if ( cell . type === 'text' ) {
var removeElement = makeRemoveElement ( cell [ 'data-rt-id' ] ) ;
var editElement = makeEditElement ( cell [ 'data-rt-id' ] ) ;
var lockElement = makeLockElement ( cell [ 'data-rt-id' ] ) ;
var elements = [ [ 'INPUT' , cell , [ ] ] ] ;
var elements = [ [ 'INPUT' , cell , [ ] ] ] ;
if ( ! readOnly ) {
if ( ! readOnly ) {
elements . unshift ( removeElement ) ;
elements . unshift ( makeRemoveElement ( cell [ 'data-rt-id' ] ) ) ;
elements . unshift ( lockElement ) ;
elements . unshift ( makeLockElement( cell [ 'data-rt-id' ] ) ) ;
elements . unshift ( editElement) ;
elements . unshift ( mak eE ditElement( cell [ 'data-rt-id' ] ) ) ;
}
}
return [ 'TD' , { } , elements ] ;
return [ 'TD' , { } , elements ] ;
}
}
@ -321,12 +321,10 @@ var Renderer = function (Cryptpad) {
var makeBodyCell = Render . makeBodyCell = function ( cell , readOnly ) {
var makeBodyCell = Render . makeBodyCell = function ( cell , readOnly ) {
if ( cell && cell . type === 'text' ) {
if ( cell && cell . type === 'text' ) {
var removeElement = makeRemoveElement ( cell [ 'data-rt-id' ] ) ;
var editElement = makeEditElement ( cell [ 'data-rt-id' ] ) ;
var elements = [ [ 'INPUT' , cell , [ ] ] ] ;
var elements = [ [ 'INPUT' , cell , [ ] ] ] ;
if ( ! readOnly ) {
if ( ! readOnly ) {
elements . push ( removeElement ) ;
elements . push ( makeRemoveElement( cell [ 'data-rt-id' ] ) ) ;
elements . push ( editElement) ;
elements . push ( mak eE ditElement( cell [ 'data-rt-id' ] ) ) ;
}
}
return [ 'TD' , { } , [
return [ 'TD' , { } , [
[ 'DIV' , { class : 'text-cell' } , elements ]
[ 'DIV' , { class : 'text-cell' } , elements ]