Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MINOR Removed SideReportsForm JS logic, interface element no longer e…

…xists
  • Loading branch information...
commit f26d0bc1585e960db0819cbf9b933226a69acf00 1 parent 2592d62
@chillu chillu authored
Showing with 0 additions and 123 deletions.
  1. +0 −123 javascript/CMSMain.js
View
123 javascript/CMSMain.js
@@ -149,128 +149,5 @@
}
});
-
- /**
- * Class: Form_SideReportsForm
- *
- * Simple form with a page type dropdown
- * which creates a new page through .cms-edit-form and adds a new tree node.
- */
- $('#Form_SideReportsForm').entwine(/** @lends ss.reports_holder */{
- ReportContainer: null,
-
- /**
- * Constructor: onmatch
- */
- onmatch: function() {
- var self = this;
-
- this.setReportContainer($('#SideReportsHolder'))
-
- // integrate with sitetree selection changes
- // TODO Only trigger when report is visible
- jQuery('.cms-tree').bind('select_node.jstree', function(e, data) {
- var node = data.rslt.obj;
- self.find(':input[name=ID]').val(node ? $(node).data('id') : null);
- self.trigger('submit');
- });
-
- // move submit button to the top
- //this.find('#ReportClass').after(this.find('.Actions'));
-
- this._super();
- },
-
- /**
- * Function: onsubmit
- *
- * Parameters:
- * (Event) e
- */
- onsubmit: function(e) {
- var self = this;
-
- // dont process if no report is selected
- var reportClass = this.find(':input[name=ReportClass]').val();
- if(!reportClass) return false;
-
- var button = this.find(':submit:first');
- button.addClass('loading');
-
- jQuery.ajax({
- url: this.attr('action'),
- data: this.serializeArray(),
- dataType: 'html',
- success: function(data, status) {
- // replace current form
- self.getReportContainer().html(data);
- },
- complete: function(xmlhttp, status) {
- button.removeClass('loading');
- }
- });
-
- return false;
- }
- });
-
- /**
- * Class: #SideReportsHolder form
- *
- * All forms loaded via ajax from the Form_SideReports dropdown.
- */
- $("#SideReportsHolder form").entwine({
-
- /**
- * Function: onsubmit
- */
- onsubmit: function() {
- var self = this;
-
- var button = this.find(':submit:first');
- button.addClass('loading');
-
- jQuery.ajax({
- url: this.attr('action'),
- data: this.serializeArray(),
- dataType: 'html',
- success: function(data, status) {
- // replace current form
- self.html(data);
- },
- complete: function(xmlhttp, status) {
- button.removeClass('loading');
- }
- });
-
- return false;
- }
-
- });
-
- /**
- * Register the onclick handler that loads the page into EditForm
- */
- $("#SideReportsHolder form ul a").entwine({
-
- /**
- * Function: onclick
- */
- onclick: function(e) {
- if (e.button!=2) {
- var $link = $(this);
- $link.addClass('loading');
- jQuery('.cms-content').entwine('ss').loadForm(
- $(this).attr('href'),
- null,
- function(e) {
- $link.removeClass('loading');
- }
- );
- }
-
- return false;
- }
- });
});
})(jQuery);
Please sign in to comment.
Something went wrong with that request. Please try again.