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