Sha256: 008677e138afde25dada0ee23c55e440eeed148ca61eac547ce5a4055cea64b9

Contents?: true

Size: 1.07 KB

Versions: 12

Compression:

Stored size: 1.07 KB

Contents

pageflow.EditorView = Backbone.View.extend({
  events: {
    'click a': function(event) {
      // prevent default for all links
      if (!$(event.target).attr('target') &&
          !$(event.target).attr('download') &&
          !$(event.target).attr('href')) {
        return false;
      }
    }
  },

  initialize: function() {
    $(window).on('beforeunload', function(event) {
      if (pageflow.entry.get('uploading_files_count') > 0)  {
        return 'Es werden noch Dateien hochgeladen. Wenn Sie die Seite verlassen werden die Uploads abgebrochen.';
      }
    });
  },

  render: function() {
    this.$el.layout({
      minSize: 300,
      togglerTip_closed: 'Editorleiste einblenden',
      togglerTip_open: 'Editorleiste ausblenden',
      resizerTip: 'Größe der Editorleiste ändern',
      onresize: function() {
        pageflow.app.trigger('resize');
      }
    });

    new pageflow.UploaderView().render();

    this.$el.append(new pageflow.LockedView({
      model: pageflow.editLock
    }).render().el);

    this.$el.append(new pageflow.HelpView().render().el);
  }
});

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pageflow-0.6.0 app/assets/javascripts/pageflow/editor/views/editor_view.js
pageflow-0.5.0 app/assets/javascripts/pageflow/editor/views/editor_view.js
pageflow-0.4.0 app/assets/javascripts/pageflow/editor/views/editor_view.js
pageflow-0.3.0 app/assets/javascripts/pageflow/editor/views/editor_view.js
pageflow-0.2.1 app/assets/javascripts/pageflow/editor/views/editor_view.js
pageflow-0.2.0 app/assets/javascripts/pageflow/editor/views/editor_view.js
pageflow-0.1.0 app/assets/javascripts/pageflow/editor/views/editor_view.js
pageflow-0.0.5 app/assets/javascripts/pageflow/editor/views/editor_view.js
pageflow-0.0.4 app/assets/javascripts/pageflow/editor/views/editor_view.js
pageflow-0.0.3 app/assets/javascripts/pageflow/editor/views/editor_view.js
pageflow-0.0.2 app/assets/javascripts/pageflow/editor/views/editor_view.js
pageflow-0.0.1 app/assets/javascripts/pageflow/editor/views/editor_view.js