@@ -35,7 +35,7 @@ window.home = function () {
35
35
var overlayElement = document . getElementsByClassName ( 'overlay-element' ) [ 0 ] ;
36
36
overlayElement . onclick = hideSideBar ;
37
37
window . onresize = onWindowResize ;
38
- window . onload = onWindowResize ;
38
+ // window.onload = onWindowResize;
39
39
document . onclick = documentClick ;
40
40
document . ondblclick = documentDoubleClick ;
41
41
renderMainSection ( ) ;
@@ -62,10 +62,8 @@ window.home = function () {
62
62
renderControl ( "reading-pane-popup" ) ;
63
63
window . readingpane ( ) ;
64
64
} ) ;
65
-
66
- if ( ej . base . Browser . isDevice ) {
67
- onWindowResize ( ) ;
68
- }
65
+ onWindowResize ( ) ;
66
+ setTimeout ( openPopup , 2000 ) ;
69
67
} ;
70
68
function renderMainSection ( ) {
71
69
treeDataSource = folderData ;
@@ -98,7 +96,7 @@ function renderMainSection() {
98
96
grpListObj = new ej . lists . ListView ( {
99
97
dataSource : messageDataSource ,
100
98
template : getListTemplate ( ) ,
101
- fields : { id : 'ContactID' } ,
99
+ fields : { id : 'ContactID' , text : 'text' } ,
102
100
sortOrder : 'None'
103
101
} ) ;
104
102
grpListObj . select = select ;
@@ -251,7 +249,7 @@ function renderToolbarMobile() {
251
249
function getListTemplate ( ) {
252
250
return '<div class="template-container ${ReadStyle}-parent">' +
253
251
'<div style="height:30px; pointer-events:none;">' +
254
- '<div class="sender-style" style="float:left; margin-top: 2px">${ContactName }</div>' +
252
+ '<div class="sender-style" style="float:left; margin-top: 2px">${text }</div>' +
255
253
'<div style="right:25px; position: absolute; margin-top: 2px; pointer-events:all;">' +
256
254
'<button id="btnListDelete" title="Delete" class="listview-btn">' +
257
255
'<span class="e-btn-icon ej-icon-Delete"></span>' +
@@ -497,7 +495,7 @@ function select(args) {
497
495
key = 'Image' ;
498
496
headerTitle . getElementsByClassName ( 'logo logo-style2' ) [ 0 ] . style . background =
499
497
'url(' + data [ key ] . toString ( ) . replace ( 'styles/images/images/' , 'content/images/images/' ) + ') no-repeat 50% 50%' ;
500
- key = 'ContactName ' ;
498
+ key = 'text ' ;
501
499
document . getElementById ( 'sub' ) . innerHTML = data [ key ] . toString ( ) ;
502
500
key = 'Date' ;
503
501
var dateString = data [ key ] . toString ( ) ;
@@ -892,7 +890,7 @@ function toolbarClick(args) {
892
890
var selectedMessage = getSelectedMessage ( ) ;
893
891
messageDataSource . splice ( messageDataSource . indexOf ( selectedMessage ) , 1 ) ;
894
892
var key = 'ContactID' ;
895
- grpListObj . removeItem ( { id : selectedMessage [ key ] . toString ( ) } ) ;
893
+ grpListObj . removeItem ( { id : selectedMessage [ key ] . toString ( ) , text : selectedMessage [ 'text' ] . toString ( ) } ) ;
896
894
if ( args . item . prefixIcon === 'ej-icon-Delete' && window . innerWidth < 605 ) {
897
895
contentElement = document . getElementsByClassName ( 'row content' ) [ 0 ] ;
898
896
contentElement . className = contentElement . className . replace ( 'show-reading-pane' , 'show-message-pane' ) ;
@@ -950,7 +948,7 @@ function showNewMailPopup(option) {
950
948
document . getElementsByClassName ( 'tb-item-mark-read' ) [ 0 ] . style . display = 'none' ;
951
949
showMailDialog ( option , selectedMessage ) ;
952
950
}
953
- function onWindowResize ( evt ) {
951
+ function onWindowResize ( ) {
954
952
var headerNode = document . getElementsByClassName ( 'header navbar' ) [ 0 ] ;
955
953
var contentArea = document . getElementsByClassName ( 'row content' ) [ 0 ] ;
956
954
var isReadingPane = ( contentArea . className . indexOf ( 'show-reading-pane' ) === - 1 ) ;
@@ -1133,8 +1131,8 @@ function documentClick(evt) {
1133
1131
if ( target . className . indexOf ( 'ej-icon-Delete' ) !== - 1 ) {
1134
1132
messageDataSource . splice ( messageDataSource . indexOf ( selectedMessage ) , 1 ) ;
1135
1133
key = 'ContactID' ;
1136
- grpListObj . removeItem ( { id : selectedMessage [ key ] . toString ( ) } ) ;
1137
- }
1134
+ grpListObj . removeItem ( { id : selectedMessage [ key ] . toString ( ) , text : selectedMessage [ 'text' ] . toString ( ) } ) ;
1135
+ }
1138
1136
else if ( target . className . indexOf ( 'ej-icon-Flag_1' ) !== - 1 ) {
1139
1137
flagListItem ( target , selectedMessage ) ;
1140
1138
}
@@ -1205,7 +1203,7 @@ function readingPaneItemClick() {
1205
1203
var selectedMessage = getSelectedMessage ( ) ;
1206
1204
messageDataSource . splice ( messageDataSource . indexOf ( selectedMessage ) , 1 ) ;
1207
1205
var key = 'ContactID' ;
1208
- grpListObj . removeItem ( { id : selectedMessage [ key ] . toString ( ) } ) ;
1206
+ grpListObj . removeItem ( { id : selectedMessage [ key ] . toString ( ) , text : selectedMessage [ 'text' ] . toString ( ) } ) ;
1209
1207
showEmptyMessage ( ) ;
1210
1208
dlgReplyAllWindow . hide ( ) ;
1211
1209
}
@@ -1288,7 +1286,7 @@ function hidePopup() {
1288
1286
}
1289
1287
function openPopup ( ) {
1290
1288
var newMessageData = cloneObject ( messageDataSource [ Math . floor ( Math . random ( ) * ( 50 - 3 ) + 2 ) ] ) ;
1291
- var key = 'ContactName ' ;
1289
+ var key = 'text ' ;
1292
1290
document . getElementById ( 'popup-contact' ) . innerHTML = newMessageData [ key ] . toString ( ) ;
1293
1291
key = 'ContactTitle' ;
1294
1292
document . getElementById ( 'popup-subject' ) . innerHTML = newMessageData [ key ] . toString ( ) ;
@@ -1329,5 +1327,4 @@ function openPopup() {
1329
1327
setReadCount ( 'Read' ) ;
1330
1328
setTimeout ( function ( ) { hidePopup ( ) ; } , 2000 ) ;
1331
1329
}
1332
- setTimeout ( openPopup , 3000 ) ;
1333
1330
0 commit comments