B2G/gaia/apps/sms/js/thread_ui.js
// the classNames array also passed in, returns an HTML string
the classNames array also passed in, returns an HTML string
the classNames array also passed in returns an HTML string
function thui_createNotDownloadedHTML(message, classNames) {
    var _ = navigator.mozL10n.get;
    var messageString = 'not-downloaded-mms';
    var downloadString = 'download';
    var status = message.deliveryStatus[0];
    var expireFormatted = Utils.date.format.localeFormat(
      message.expiryDate, _('dateTimeFormat_%x')
    );
    var expired = +message.expiryDate < Date.now();
    if (expired) {
      classNames.push('expired');
      messageString = 'expired-mms';
    }
    if (status === 'error') {
      classNames.push('error');
    }
    if (status === 'pending') {
      downloadString = 'downloading';
      classNames.push('pending');
    }
    messageString = _(messageString, { date: expireFormatted });
    return this.tmpl.notDownloaded.interpolate({
      message: messageString,
      download: _(downloadString)
    });
  }
function thui_createNotDownloadedHTML ( message , classNames ) { var _ = navigator . mozL10n . get ; var messageString = 'not-downloaded-mms' ; var downloadString = 'download' ; var status = message . deliveryStatus [ 0 ] ; var expireFormatted = Utils . date . format . localeFormat ( message . expiryDate , _ ( 'dateTimeFormat_%x' ) ) ; var expired = + message . expiryDate < Date . now ( ) ; if ( expired ) { classNames . push ( 'expired' ) ; messageString = 'expired-mms' ; } if ( status === 'error' ) { classNames . push ( 'error' ) ; } if ( status === 'pending' ) { downloadString = 'downloading' ; classNames . push ( 'pending' ) ; } messageString = _ ( messageString , { date : expireFormatted } ) ; return this . tmpl . notDownloaded . interpolate ( { message : messageString , download : _ ( downloadString ) } ) ; }
the classNames array also passed in, returns an HTML string
the classNames array also passed in returns an HTML string
// default strings: // assuming that incoming message only has one deliveryStatus