Skip to content
This repository
Browse code

Removing methods that are being/moved removed.

Reformatting tests.
  • Loading branch information...
commit 6213b83f8d26c2bcc87b09043560245244a1e728 1 parent 3e0d645
Mark Story authored March 08, 2009
35  cake/libs/view/helpers/js.php
@@ -118,11 +118,6 @@ class JsHelper extends AppHelper {
118 118
  * @var array
119 119
  */
120 120
 	var $__objects = array();
121  
-
122  
-	var $effectMap = array(
123  
-		'Appear', 'Fade', 'Puff', 'BlindDown', 'BlindUp', 'SwitchOff', 'SlideDown', 'SlideUp',
124  
-		'DropOut', 'Shake', 'Pulsate', 'Squish', 'Fold', 'Grow', 'Shrink', 'Highlight', 'toggle'
125  
-	);
126 121
 /**
127 122
  * output
128 123
  *
@@ -244,34 +239,6 @@ function uses($url, $inline = true, $once = true) {
244 239
 			$view->addScript($out);
245 240
 		}
246 241
 	}
247  
-
248  
-	function if_($if, $then, $else = null, $elseIf = array()) {
249  
-		$len = strlen($if) - 1;
250  
-		if ($if{$len} == ';') {
251  
-			$if{$len} = null;
252  
-		}
253  
-
254  
-		$out = 'if (' . $if . ') { ' . $then . ' }';
255  
-
256  
-		foreach ($elseIf as $cond => $exec) {
257  
-			//$out .=
258  
-		}
259  
-
260  
-		if (!empty($else)) {
261  
-			$out .= ' else { ' . $else . ' }';
262  
-		}
263  
-
264  
-		return $out;
265  
-	}
266  
-
267  
-/*
268  
- * Tries a series of expressions, and executes after first successful completion.
269  
- * (See Prototype's Try.these).
270  
- *
271  
- * @return string
272  
- */
273  
-	function tryThese_($expr1, $expr2, $expr3) {
274  
-	}
275 242
 /**
276 243
  * Loads a remote URL
277 244
  *
@@ -280,7 +247,6 @@ function tryThese_($expr1, $expr2, $expr3) {
280 247
  * @return string
281 248
  */
282 249
 	function load_($url = null, $options = array()) {
283  
-
284 250
 		if (isset($options['update'])) {
285 251
 			if (!is_array($options['update'])) {
286 252
 				$func = "new Ajax.Updater('{$options['update']}',";
@@ -339,7 +305,6 @@ function __object($name, $var) {
339 305
 		return $this->__objects[$name];
340 306
 	}
341 307
 
342  
-
343 308
 }
344 309
 
345 310
 /**
21  cake/tests/cases/libs/view/helpers/js.test.php
@@ -333,12 +333,21 @@ function testObject() {
333 333
 
334 334
 		$result = $this->JsEngine->object(array(
335 335
 			'2007' => array(
336  
-				'Spring' => array('1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky')),
337  
-				'Fall' => array('1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky'))
338  
-			), '2006' => array(
339  
-				'Spring' => array('1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky')),
340  
-				'Fall' => array('1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky')
341  
-			))
  336
+				'Spring' => array(
  337
+					'1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky')
  338
+				),
  339
+				'Fall' => array(
  340
+					'1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky')
  341
+				)
  342
+			), 
  343
+			'2006' => array(
  344
+				'Spring' => array(
  345
+				    '1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky')
  346
+				),
  347
+				'Fall' => array(
  348
+				    '1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky')
  349
+				)
  350
+			)
342 351
 		));
343 352
 		$expected = '{"2007":{"Spring":{"1":{"id":1,"name":"Josh"},"2":{"id":2,"name":"Becky"}},"Fall":{"1":{"id":1,"name":"Josh"},"2":{"id":2,"name":"Becky"}}},"2006":{"Spring":{"1":{"id":1,"name":"Josh"},"2":{"id":2,"name":"Becky"}},"Fall":{"1":{"id":1,"name":"Josh"},"2":{"id":2,"name":"Becky"}}}}';
344 353
 		$this->assertEqual($result, $expected);

0 notes on commit 6213b83

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