Skip to content
This repository
Browse code

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

…xists
  • Loading branch information...
commit f26d0bc1585e960db0819cbf9b933226a69acf00 1 parent 2592d62
Ingo Schommer authored April 12, 2012

Showing 1 changed file with 0 additions and 123 deletions. Show diff stats Hide diff stats

  1. 123  javascript/CMSMain.js
123  javascript/CMSMain.js
@@ -149,128 +149,5 @@
149 149
 
150 150
 			}
151 151
 		});
152  
-	
153  
-		/**
154  
-		 * Class: Form_SideReportsForm
155  
-		 * 
156  
-		 * Simple form with a page type dropdown
157  
-		 * which creates a new page through .cms-edit-form and adds a new tree node.
158  
-		 */
159  
-		$('#Form_SideReportsForm').entwine(/** @lends ss.reports_holder */{
160  
-			ReportContainer: null,
161  
-			
162  
-			/**
163  
-			 * Constructor: onmatch
164  
-			 */
165  
-			onmatch: function() {
166  
-				var self = this;
167  
-				
168  
-				this.setReportContainer($('#SideReportsHolder'))
169  
-					
170  
-				// integrate with sitetree selection changes
171  
-				// TODO Only trigger when report is visible
172  
-				jQuery('.cms-tree').bind('select_node.jstree', function(e, data) {
173  
-					var node = data.rslt.obj;
174  
-					self.find(':input[name=ID]').val(node ? $(node).data('id') : null);
175  
-					self.trigger('submit');
176  
-				});
177  
-			
178  
-				// move submit button to the top
179  
-				//this.find('#ReportClass').after(this.find('.Actions'));
180  
-			
181  
-				this._super();
182  
-			},
183  
-		
184  
-			/**
185  
-			 * Function: onsubmit
186  
-			 * 
187  
-			 * Parameters:
188  
-			 *  (Event) e
189  
-			 */
190  
-			onsubmit: function(e) {
191  
-				var self = this;
192  
-			
193  
-				// dont process if no report is selected
194  
-				var reportClass = this.find(':input[name=ReportClass]').val();
195  
-				if(!reportClass) return false;
196  
-			
197  
-				var button = this.find(':submit:first');
198  
-				button.addClass('loading');
199  
-			
200  
-				jQuery.ajax({
201  
-					url: this.attr('action'),
202  
-					data: this.serializeArray(),
203  
-					dataType: 'html',
204  
-					success: function(data, status) {
205  
-						// replace current form
206  
-						self.getReportContainer().html(data);
207  
-					},
208  
-					complete: function(xmlhttp, status) {
209  
-						button.removeClass('loading');
210  
-					}
211  
-				});
212  
-			
213  
-				return false;
214  
-			}
215  
-		});
216  
-		
217  
-		/**
218  
-		 * Class: #SideReportsHolder form
219  
-		 * 
220  
-		 * All forms loaded via ajax from the Form_SideReports dropdown.
221  
-		 */
222  
-		$("#SideReportsHolder form").entwine({
223  
-			
224  
-			/**
225  
-			 * Function: onsubmit
226  
-			 */
227  
-			onsubmit: function() {
228  
-				var self = this;
229  
-
230  
-				var button = this.find(':submit:first');
231  
-				button.addClass('loading');
232  
-			
233  
-				jQuery.ajax({
234  
-					url: this.attr('action'),
235  
-					data: this.serializeArray(),
236  
-					dataType: 'html',
237  
-					success: function(data, status) {
238  
-						// replace current form
239  
-						self.html(data);
240  
-					},
241  
-					complete: function(xmlhttp, status) {
242  
-						button.removeClass('loading');
243  
-					}
244  
-				});
245  
-			
246  
-				return false;
247  
-			}
248  
-			
249  
-		});
250  
-		
251  
-		/**
252  
-		 * Register the onclick handler that loads the page into EditForm
253  
-		 */
254  
-		$("#SideReportsHolder form ul a").entwine({
255  
-			
256  
-			/**
257  
-			 * Function: onclick
258  
-			 */
259  
-			onclick: function(e) {
260  
-				if (e.button!=2) {
261  
-					var $link = $(this);
262  
-					$link.addClass('loading');
263  
-					jQuery('.cms-content').entwine('ss').loadForm(
264  
-						$(this).attr('href'),
265  
-						null,
266  
-						function(e) {
267  
-							$link.removeClass('loading');
268  
-						}
269  
-					);
270  
-				}
271  
-				
272  
-				return false;
273  
-			}
274  
-		});
275 152
 	});
276 153
 })(jQuery);

0 notes on commit f26d0bc

Please sign in to comment.
Something went wrong with that request. Please try again.