Ejemplo n.º 1
0
		init: function(value, bindingContext){
			this.callParent(value, bindingContext);
			/*History.prototype.constructor.apply(this, arguments);*/
			var me = this;
			this.$el = $(this.domNode);

			var m = this.getModel(),
				xids = [],
				promises = [];
			$('>.x-contents-content', this.$el).each(function(){
				xids.push($(this).attr('xid'));
			});
			justep.Array.each(xids, function(xid){
				promises.push(m.componentPromise(xid));
			});
			var loadedDtd = m.getLoadedDeferred();
			$.when.apply($, promises).done(function(){
				me.to(me.active,function(){
					me.beginInterval();
					loadedDtd.resolve();
				});
				me.inited();
			});
			if(this.swipe){
				this.supportContentsTouchMove();
			}
			if(this.swipe || this.slidable){
				$(this.domNode).addClass('slidable');
				this.optimizePerformanceForKeyboard();
			}
			this.optimizePerformance();
			this.fixWebkitBug();
        	return {dependence: true};
		},
Ejemplo n.º 2
0
		init: function(value, bindingContext){
			this.callParent(value, bindingContext);
			this.$el = $(this.domNode);
			this.$column = $('>.x-column', this.$el);
			this.$widget = $('>.x-column>.x-widget', this.$el); 
			
			var m = this.getModel(),
				xids = [],
				promises = []; 
			this.$widget.each(function(){
				xids.push($(this).attr('xid'));
			});
			justep.Array.each(xids, function(xid){
				promises.push(m.componentPromise(xid));
			});
			$.when.apply($, promises).done(function(){
			});
			this._draggable();
			return;
		},
Ejemplo n.º 3
0
		remove: function(index, to){
			if(index === undefined)
				index = this.active;
			if(typeof index == 'string')
				index = this.getIndexByXid(index);
			if(typeof to == 'string')
				to = this.getIndexByXid(to);
			var length = this.getLength();
			if(length>1){
				var me = this;
				this.to(to || 0, function(){
					var content = me.contents[index];
					justep.Array.remove(me.contents, content);
					Component.removeComponent(content);
				});
			}else{
				var content = this.contents[index];
				justep.Array.remove(this.contents, content);
				Component.removeComponent(content);
				delete this.active;
			}
		},
Ejemplo n.º 4
0
		init: function(value, bindingContext){
			this.callParent(value, bindingContext);
			/*History.prototype.constructor.apply(this, arguments);*/
			var me = this;
			this.$el = $(this.domNode);

			var m = this.getModel(),
				xids = [],
				promises = [];
			$('>.x-contents-content', this.$el).each(function(){
				xids.push($(this).attr('xid'));
			});
			justep.Array.each(xids, function(xid){
				promises.push(m.componentPromise(xid));
			});
			$.when.apply($, promises).done(function(){
				me.to(me.active);
				me._inited = true;
			});
			if(this.swipe){
				this.supportContentsTouchMove();
			}
		},
Ejemplo n.º 5
0
				this.to(to || 0, function(){
					var content = me.contents[index];
					justep.Array.remove(me.contents, content);
					Component.removeComponent(content);
				});