
/**
 * Minimal.View Limit
 * @since 0.1.9.1
 * @description Comes from Minimal View
 * @return {[type]} [description]
 */
UI.Container.implement({
	options: {
		toggleFx: {
			duration: 300,
		    transition: 'quart:out',
		    link: 'cancel'
		}
	},

	/**
	 * [_initToggle description]
	 * @return {[type]} [description]
	 */
	_initToggle: function() {
		 //_log('_initToggle', this.isOpen, this._modifier, this.element);

		var opts = this.options,
			self = this,
			modifier = 'width';

		var size = this.element[modifier];
		opts.toggleFx.property = modifier;
		this.toggleFx = this.toggleFx || new Fx.Tween(this.element, opts.toggleFx).addEvents({
			complete: function(ev) {
				//_log('toggle complete', ev);
				self.fireEvent('toggled');
			}
		});
	},

	/**
	 * Remove or Inject the Application Container in the DOM
	 * @return {[type]} [description]
	 */
	toggle: function() {
		//console.log('toggle', this.isOpen);

		var self = this,
			opts = this.options,
			modifier = 'width';

		var size = this[modifier] || 160;
		//_log('size', size || 100);
		//_log('--- isOpen', this.isOpen);
		if (this.isOpen === true) {
			//_log('--- close', this.isOpen);
			this.toggleClose();
		} else {
			//_log('--- open', this.isOpen);
			this.toggleOpen(size);
		}

		//return this.isOpen;
	},

	/**
	 * [toggleClose description]
	 * @return {[type]} [description]
	 */
	toggleClose: function() {
		//_log('toggleOpen');

		this.toggleFx.start(0);

		//console.log('close');
		this.element.removeClass('state-focus');

		/*(function() {
			self.container.setStyle('display', 'none');	
		}).delay(250);*/

		minimal.settings.set('layout.' + this.main + '.hidden', true);
		minimal.settings.save();

		this.isOpen = false;

		//view.container.addClass('state-focus');
	},

	/**
	 * [toggleOpen description]
	 * @param  {[type]} size [description]
	 * @return {[type]}      [description]
	 */
	toggleOpen: function(size) {
		//_log('toggleOpen', size);

		this.toggleFx.start(size);

		this.element.setStyle('display', null);
		this.element.addClass('state-focus');

		minimal.settings.set('layout.' + this.main + '.hidden', false);
		minimal.settings.save();

		//view.container.removeClass('state-focus');
		this.isOpen = true;
	}

});

@@ -184,10 +184,10 @@
 on: 
-30
+26
 0,%0A%09
@@ -208,13 +208,12 @@
 n: '
-quart
+sine
 :out
@@ -350,18 +350,16 @@
 () %7B%0A%09%09 
-//
 _log('_i
@@ -519,16 +519,48 @@
 ifier%5D;%0A
+%0A%09%09console.log('-----', size);%0A%0A
 %09%09opts.t
@@ -1054,26 +1054,24 @@
 %5D %7C%7C 160;%0A%09%09
-//
 _log('size',
@@ -1087,18 +1087,16 @@
 100);%0A%09%09
-//
 _log('--
@@ -1149,26 +1149,24 @@
  true) %7B%0A%09%09%09
-//
 _log('--- cl
@@ -1222,18 +1222,16 @@
 se %7B%0A%09%09%09
-//
 _log('--
@@ -1242,32 +1242,38 @@
 en', this.isOpen
+, size
 );%0A%09%09%09this.toggl
@@ -1419,26 +1419,24 @@
 ction() %7B%0A%09%09
-//
 _log('toggle
@@ -1626,16 +1626,41 @@
 250);*/%0A
+%09%09this.isOpen = false;%0A%09%09
 %0A%09%09minim
@@ -1747,36 +1747,16 @@
 e();%0A%0A%09%09
-this.isOpen = false;
 %0A%0A%09%09//vi
@@ -1949,18 +1949,16 @@
 ze) %7B%0A%09%09
-//
 _log('to
@@ -2089,16 +2089,39 @@
 cus');%0A%0A
+%09%09this.isOpen = true;%0A%0A
 %09%09minima
@@ -2255,35 +2255,16 @@
 us');%0A%09%09
-this.isOpen = true;
 %0A%09%7D%0A%0A%7D);

Enhance User Experience