Ejemplo n.º 1
0
 _renderLoadingView: function () {
   this.$el.html(
     renderLoading({
       title: _t('dataset.delete.loading', { tableName: this._tableModel.getUnquotedName() })
     })
   );
 },
Ejemplo n.º 2
0
 _renderLoading: function () {
   this.$el.html(
     renderLoading({
       title: _t('components.table.rows.loading.title')
     })
   );
 },
Ejemplo n.º 3
0
 _renderLoading: function () {
   this.$el.html(
     templateLoading({
       title: _t('components.modals.dataset-metadata.loading')
     })
   );
 },
Ejemplo n.º 4
0
 render: function () {
   if (this.model.get('isLoading')) {
     this.$el.html(
       loadingView({
         title: 'Creating group'
       })
     );
   } else {
     this.$el.html(createGroupTemplate());
   }
   return this;
 },
Ejemplo n.º 5
0
  _initViews: function () {
    this._panes = new TabPane({
      el: this._$tabPane()
    });

    this.addView(this._panes);

    this._panes.addTab('list',
      ViewFactory.createListView([
        () => this._createListView(),

        () => new PaginationView({
          className: 'CDB-Text CDB-Size-medium Pagination Pagination--shareList',
          model: this.paginationModel
        })
      ])
    );

    this._panes.addTab('error',
      ViewFactory.createByHTML(errorTemplate({
        msg: ''
      })).render()
    );

    this._panes.addTab('no_results',
      ViewFactory.createByHTML(noResultsView({
        icon: this.options.noResults.icon || 'CDB-IconFont-defaultUser',
        title: this.options.noResults.title || 'Oh! No results',
        msg: this.options.noResults.msg || 'Unfortunately we could not find anything with these parameters'
      })).render()
    );

    this._panes.addTab('loading',
      ViewFactory.createByHTML(loadingView({
        title: 'Searching'
      })).render()
    );

    if (this._pagedSearchModel.get('q')) {
      this._focusSearchInput();
    }

    this._activatePane(this._chooseActivePaneName(this._collection.totalCount()));
  },
Ejemplo n.º 6
0
  _initViews: function () {
    var state = this._stateModel.get('state');
    var view;

    this.$el.append(this._paginationView.render().el);

    if (state === 'loading') {
      this._content().html(renderLoading({
        title: _t('components.pagination-search.loading.title')
      }));
    }

    if (state === 'error') {
      var errorView = new ErrorView({
        title: _t('components.pagination-search.error.title'),
        desc: _t('components.pagination-search.error.desc')
      });
      this._content().html(errorView.render().el);
      this.addView(errorView);
    }

    if (state === 'show') {
      view = this._createContentView({
        hasOrganization: this._paginationSearchModel.get('q') === ''
      });
      this._content().html(view.render().el);
      this.addView(view);
    }

    if (state === 'no-results') {
      this._content().html(renderNoResults({
        icon: 'CDB-IconFont-defaultUser',
        title: _t('components.pagination-search.no-results.title'),
        desc: _t('components.pagination-search.no-results.desc')
      }));
    }
  },
Ejemplo n.º 7
0
 const modalModel = this._modals.create(function (modalModel) {
   return ViewFactory.createByHTML(loadingView({}));
 });
Ejemplo n.º 8
0
 _renderLoadingPrerequisites: function () {
   return loadingView({
     title: `Checking what consequences deleting the selected ${this._pluralizedContentType()} would have...`
   });
 },
Ejemplo n.º 9
0
 _renderDeletingItems: function () {
   return loadingView({
     title: `Deleting the selected ${this._pluralizedContentType()}...`
   });
 },
Ejemplo n.º 10
0
  render: function () {
    this.clearSubViews();

    this._updateOkBtn();
    this._disableOkBtn(true);

    var view;

    switch (this.model.get('currentView')) {
      case 'savingLayer':
        this._disableModalFooter(true);

        view = ViewFactory.createByHTML(
          renderLoading({
            title: _t('components.modals.add-basemap.saving')
          })
        );
        break;
      case 'selectLayer':
        this._disableModalFooter(true);

        view = new SelectLayerView({
          model: this.model,
          customBaselayersCollection: this._customBaselayersCollection
        });
        break;
      case 'saveFail':
        this._disableModalFooter(true);

        view = new ErrorView({
          title: _t('components.modals.add-basemap.add-basemap-error')
        });
        break;
      case 'fetchingLayers':
        this._disableModalFooter(true);

        view = ViewFactory.createByHTML(
          renderLoading({
            title: _t('components.modals.add-basemap.fetching')
          })
        );
        break;
      case 'enterURL':
      default:
        this._disableModalFooter(false);

        view = ViewFactory.createByHTML(
          enterUrl({
            layersFetched: this.model.get('layersFetched'),
            layers: this.model.wmsLayersCollection
          })
        );
        break;
    }
    this.addView(view);
    this.$el.append(view.render().el);

    this.$('.js-search-input').focus();

    return this;
  },