apps/homescreen/js/grid.js
/*
   * Shows a dialog to confirm the download retry
   * calls the method 'download'. That's applied
   * to an icon, that has associated an app already.
   */
Shows a dialog to confirm the download retry
calls the method 'download'. That's applied
to an icon, that has associated an app already.
Shows a dialog to confirm the download retry calls the method ' download ' . That ' s applied to an icon that has associated an app already .
function showRestartDownloadDialog(icon) {
    var app = icon.app;
    var _ = navigator.mozL10n.get;
    var confirm = {
      title: _('download'),
      callback: function onAccept() {
        app.download();
        app.ondownloaderror = function(evt) {
          icon.showCancelled();
          icon.updateAppStatus(evt.application);
        };
        app.onprogress = function onProgress(evt) {
          app.onprogress = null;
          icon.updateAppStatus(evt.application);
        };
        icon.showDownloading();
        ConfirmDialog.hide();
      },
      applyClass: 'recommend'
    };
    var cancel = {
      title: _('cancel'),
      callback: ConfirmDialog.hide
    };
    var localizedName = icon.descriptor.localizedName || icon.descriptor.name;
    ConfirmDialog.show(_('restart-download-title'),
      _('restart-download-body', {'name': localizedName}),
      cancel,
      confirm);
    return;
  }
function showRestartDownloadDialog ( icon ) { var app = icon . app ; var _ = navigator . mozL10n . get ; var confirm = { title : _ ( 'download' ) , callback : function onAccept ( ) { app . download ( ) ; app . ondownloaderror = function ( evt ) { icon . showCancelled ( ) ; icon . updateAppStatus ( evt . application ) ; } ; app . onprogress = function onProgress ( evt ) { app . onprogress = null ; icon . updateAppStatus ( evt . application ) ; } ; icon . showDownloading ( ) ; ConfirmDialog . hide ( ) ; } , applyClass : 'recommend' } ; var cancel = { title : _ ( 'cancel' ) , callback : ConfirmDialog . hide } ; var localizedName = icon . descriptor . localizedName || icon . descriptor . name ; ConfirmDialog . show ( _ ( 'restart-download-title' ) , _ ( 'restart-download-body' , { 'name' : localizedName } ) , cancel , confirm ) ; return ; }
Shows a dialog to confirm the download retry
 calls the method 'download'.
Shows a dialog to confirm the download retry calls the method ' download ' .