Sha256: 2369440394c219c31d2fbd750befc04497c436c847ee06e26291fb67e5054caa

Contents?: true

Size: 826 Bytes

Versions: 11

Compression:

Stored size: 826 Bytes

Contents

//= require 'cms/namespace'

Cms.NewContentButton = function() {

};

// Setting the 'New Page' path should update the global menu
Cms.NewContentButton.prototype.addPagePath = function(path) {
  $('#new-content-button').attr('href', path);
  $('.add-page-button').attr('href', path);
};

Cms.NewContentButton.prototype.addSectionPath = function(path) {
  $('.add-link-button').attr('href', path);
};

Cms.NewContentButton.prototype.addLinkPath = function(path) {
  $('.add-section-button').attr('href', path);
};

Cms.NewContentButton.prototype.updateButtons = function(selectedElement) {
  this.addPagePath(selectedElement.data('add-page-path'));
  this.addLinkPath(selectedElement.data('add-link-path'));
  this.addSectionPath(selectedElement.data('add-section-path'));
};

var newContentButton = new Cms.NewContentButton();

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
browsercms-artirix-4.0.4 app/assets/javascripts/cms/new_content_button.js
browsercms-artirix-4.0.3.3 app/assets/javascripts/cms/new_content_button.js
browsercms-artirix-4.0.3.2 app/assets/javascripts/cms/new_content_button.js
browsercms-artirix-4.0.3.1 app/assets/javascripts/cms/new_content_button.js
browsercms-artirix-4.0.3 app/assets/javascripts/cms/new_content_button.js
browsercms-artirix-4.0.2 app/assets/javascripts/cms/new_content_button.js
browsercms-artirix-4.0.1.1 app/assets/javascripts/cms/new_content_button.js
browsercms-artirix-4.0.0.rc1.art4 app/assets/javascripts/cms/new_content_button.js
browsercms-4.0.0.rc1 app/assets/javascripts/cms/new_content_button.js
browsercms-4.0.0.beta app/assets/javascripts/cms/new_content_button.js
browsercms-4.0.0.alpha app/assets/javascripts/cms/new_content_button.js