| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | /********************************************************************** | 
					
						
							|  |  |  | *  | 
					
						
							|  |  |  | * | 
					
						
							|  |  |  | * | 
					
						
							|  |  |  | **********************************************************************/ | 
					
						
							| 
									
										
										
										
											2016-08-21 02:19:24 +03:00
										 |  |  | ((typeof define)[0]=='u'?function(f){module.exports=f(require)}:define) | 
					
						
							|  |  |  | (function(require){ var module={} // make module AMD/node compatible...
 | 
					
						
							| 
									
										
										
										
											2016-08-20 22:49:36 +03:00
										 |  |  | /*********************************************************************/ | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | var actions = require('lib/actions') | 
					
						
							|  |  |  | var features = require('lib/features') | 
					
						
							|  |  |  | var toggler = require('lib/toggler') | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | var core = require('features/core') | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /*********************************************************************/ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // helper...
 | 
					
						
							|  |  |  | function didAdvance(indicator){ | 
					
						
							|  |  |  | 	return function(){ | 
					
						
							| 
									
										
										
										
											2016-11-28 20:08:08 +03:00
										 |  |  | 		var img = this.data ? this.data.current : null | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 		return function(){ | 
					
						
							| 
									
										
										
										
											2016-11-28 20:08:08 +03:00
										 |  |  | 			if(img == null || img == this.data.current){ | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 				this.flashIndicator(indicator) | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | var BoundsIndicatorsActions = actions.Actions({ | 
					
						
							|  |  |  | 	flashIndicator: ['- Interface/Flash an indicator', | 
					
						
							|  |  |  | 		function(direction){ | 
					
						
							|  |  |  | 			if(this.ribbons.getRibbonSet().length == 0){ | 
					
						
							|  |  |  | 				return | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 			var cls = { | 
					
						
							|  |  |  | 				// shift up/down...
 | 
					
						
							|  |  |  | 				up: '.up-indicator', | 
					
						
							|  |  |  | 				down: '.down-indicator', | 
					
						
							|  |  |  | 				// hit start/end/top/bottom of view...
 | 
					
						
							|  |  |  | 				start: '.start-indicator', | 
					
						
							|  |  |  | 				end: '.end-indicator', | 
					
						
							|  |  |  | 				top: '.top-indicator', | 
					
						
							|  |  |  | 				bottom: '.bottom-indicator', | 
					
						
							|  |  |  | 			}[direction] | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-16 00:26:37 +03:00
										 |  |  | 			var indicator = this.dom.find(cls) | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 			if(indicator.length == 0){ | 
					
						
							|  |  |  | 				indicator = $('<div>') | 
					
						
							| 
									
										
										
										
											2016-05-27 00:57:48 +03:00
										 |  |  | 					.addClass(cls.replace('.', '')) | 
					
						
							| 
									
										
										
										
											2017-05-16 00:26:37 +03:00
										 |  |  | 					.appendTo(this.dom) | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 			} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 			return indicator | 
					
						
							|  |  |  | 				// NOTE: this needs to be visible in all cases and key press 
 | 
					
						
							|  |  |  | 				// 		rhythms... 
 | 
					
						
							|  |  |  | 				.show() | 
					
						
							|  |  |  | 				.delay(100) | 
					
						
							|  |  |  | 				.fadeOut(300) | 
					
						
							|  |  |  | 		}], | 
					
						
							|  |  |  | }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | var BoundsIndicators =  | 
					
						
							|  |  |  | module.BoundsIndicators = core.ImageGridFeatures.Feature({ | 
					
						
							|  |  |  | 	title: '', | 
					
						
							|  |  |  | 	doc: '', | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	tag: 'ui-bounds-indicators', | 
					
						
							|  |  |  | 	depends: ['ui'], | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	actions: BoundsIndicatorsActions, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	handlers: [ | 
					
						
							|  |  |  | 		// basic navigation...
 | 
					
						
							|  |  |  | 		['nextImage.pre lastImage.pre', didAdvance('end')], | 
					
						
							|  |  |  | 		['prevImage.pre firstImage.pre', didAdvance('start')], | 
					
						
							|  |  |  | 		['nextRibbon.pre lastRibbon.pre', didAdvance('bottom')], | 
					
						
							|  |  |  | 		['prevRibbon.pre firstRibbon.pre', didAdvance('top')], | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		// vertical shifting...
 | 
					
						
							|  |  |  | 		['shiftImageUp.pre', | 
					
						
							|  |  |  | 			function(target){  | 
					
						
							|  |  |  | 				target = target || this.current | 
					
						
							|  |  |  | 				var r = this.data.getRibbonOrder(target) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 				var l = this.data.getImages(r).length | 
					
						
							|  |  |  | 				var l0 = this.data.getImages(0).length | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 				return function(){ | 
					
						
							|  |  |  | 					// when shifting last image of top ribbon (i.e. length == 1)
 | 
					
						
							|  |  |  | 					// up the state essentially will not change...
 | 
					
						
							|  |  |  | 					if((r == 0 && l == 1)  | 
					
						
							|  |  |  | 							// we are shifting to a new empty ribbon...
 | 
					
						
							|  |  |  | 							|| (r == 1 && l == 1 && l0 == 0)){ | 
					
						
							|  |  |  | 						this.flashIndicator('top') | 
					
						
							|  |  |  | 					} else {	 | 
					
						
							|  |  |  | 						this.flashIndicator('up') | 
					
						
							|  |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			}], | 
					
						
							|  |  |  | 		['shiftImageDown.pre', | 
					
						
							|  |  |  | 			function(target){  | 
					
						
							|  |  |  | 				target = target || this.current | 
					
						
							|  |  |  | 				var r0 = this.data.getRibbonOrder(target) | 
					
						
							|  |  |  | 				var l = this.data.getImages(r0).length | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 				return function(){ | 
					
						
							|  |  |  | 					var r1 = this.data.getRibbonOrder(target) | 
					
						
							|  |  |  | 					if(r0 == r1 && r0 == this.data.ribbon_order.length-1 && l == 1){ | 
					
						
							|  |  |  | 						this.flashIndicator('bottom') | 
					
						
							|  |  |  | 					} else { | 
					
						
							|  |  |  | 						this.flashIndicator('down')  | 
					
						
							|  |  |  | 					} | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			}], | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		// horizontal shifting...
 | 
					
						
							|  |  |  | 		['shiftImageLeft.pre', | 
					
						
							|  |  |  | 			function(target){  | 
					
						
							|  |  |  | 				if(target == null  | 
					
						
							|  |  |  | 						//&& actions.data.getImageOrder('ribbon') == 0){
 | 
					
						
							|  |  |  | 						&& this.data.getImage('prev') == null){ | 
					
						
							|  |  |  | 					this.flashIndicator('start') | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			}], | 
					
						
							|  |  |  | 		['shiftImageRight.pre', | 
					
						
							|  |  |  | 			function(target){  | 
					
						
							|  |  |  | 				if(target == null  | 
					
						
							|  |  |  | 						&& this.data.getImage('next') == null){ | 
					
						
							|  |  |  | 					this.flashIndicator('end') | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			}], | 
					
						
							|  |  |  | 	], | 
					
						
							|  |  |  | }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | //---------------------------------------------------------------------
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | var CurrentImageIndicatorActions = actions.Actions({ | 
					
						
							|  |  |  | 	config: { | 
					
						
							|  |  |  | 		'current-image-border': 3, | 
					
						
							|  |  |  | 		'current-image-min-border': 2, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		'current-image-border-timeout': 200, | 
					
						
							|  |  |  | 		'current-image-shift-timeout': 200, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		'current-image-indicator-fadein': 500, | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-16 05:48:25 +03:00
										 |  |  | 		'current-image-indicator-restore-delay': 500, | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 		// this can be:
 | 
					
						
							|  |  |  | 		// 	'hide'			- simply hide on next/prev screen action
 | 
					
						
							|  |  |  | 		// 					  and show on focus image.
 | 
					
						
							|  |  |  | 		// 	'hide-show'		- hide on fast scroll through screens and 
 | 
					
						
							|  |  |  | 		// 					  show when slowing down.
 | 
					
						
							|  |  |  | 		'current-image-indicator-screen-nav-mode': 'hide', | 
					
						
							|  |  |  | 	}, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	updateCurrentImageIndicator: ['- Interface/Update current image indicator', | 
					
						
							| 
									
										
										
										
											2016-06-19 16:22:59 +03:00
										 |  |  | 		function(target, update_border, scale){ | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 			var ribbon_set = this.ribbons.getRibbonSet() | 
					
						
							| 
									
										
										
										
											2016-12-07 02:03:10 +03:00
										 |  |  | 			var locator = this.ribbons.getRibbonLocator() | 
					
						
							| 
									
										
										
										
											2016-12-26 03:13:55 +03:00
										 |  |  | 			var shifting_ribbon = false | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-26 03:42:55 +03:00
										 |  |  | 			// NOTE: we will update only the attrs that need to be updated...
 | 
					
						
							|  |  |  | 			var css = {} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 			if(ribbon_set.length == 0){ | 
					
						
							|  |  |  | 				return | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-19 16:22:59 +03:00
										 |  |  | 			scale = scale || this.scale | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 			var cur = this.ribbons.getImage(target) | 
					
						
							|  |  |  | 			// NOTE: cur may be unloaded...
 | 
					
						
							| 
									
										
										
										
											2016-12-19 19:34:38 +03:00
										 |  |  | 			var ribbon = this.ribbons.getRibbon(cur.length > 0 ? target : this.current_ribbon) | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-04 00:46:11 +03:00
										 |  |  | 			var marker = ribbon_set.find('.current-marker') | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 			// remove marker if current image is not loaded...
 | 
					
						
							|  |  |  | 			if(cur.length == 0){ | 
					
						
							| 
									
										
										
										
											2017-05-04 00:46:11 +03:00
										 |  |  | 				marker.hide() | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 				return | 
					
						
							| 
									
										
										
										
											2017-05-13 22:24:42 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 			} else { | 
					
						
							|  |  |  | 				marker.show() | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 			} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-04 00:58:08 +03:00
										 |  |  | 			// create marker if it does not exist...
 | 
					
						
							|  |  |  | 			if(marker.length == 0 && ribbon_set.length > 0){ | 
					
						
							|  |  |  | 				$('<div/>') | 
					
						
							|  |  |  | 					.addClass('current-marker') | 
					
						
							|  |  |  | 					.prependTo(ribbon_set) | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 			// get config...
 | 
					
						
							|  |  |  | 			var border = this.config['current-image-border'] | 
					
						
							|  |  |  | 			var min_border = this.config['current-image-min-border'] | 
					
						
							|  |  |  | 			var border_timeout = this.config['current-image-border-timeout'] | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-04 01:09:32 +03:00
										 |  |  | 			/*/ XXX at this point we do not need size updating... | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 			var w = cur.outerWidth(true) | 
					
						
							|  |  |  | 			var h = cur.outerHeight(true) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-16 00:40:14 +03:00
										 |  |  | 			// accommodate for non-square images... 
 | 
					
						
							|  |  |  | 			// XXX this might have problems when scaling...
 | 
					
						
							|  |  |  | 			if(Math.floor(w) != Math.floor(h)){ | 
					
						
							|  |  |  | 				css.width = w / scale | 
					
						
							|  |  |  | 				// XXX do we ever need to set height in a ribbon???
 | 
					
						
							|  |  |  | 				//css.height = h / scale
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 			// square image -> let CSS do the work...
 | 
					
						
							|  |  |  | 			} else { | 
					
						
							|  |  |  | 				css.width = '' | 
					
						
							|  |  |  | 				css.height = '' | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2017-05-04 01:09:32 +03:00
										 |  |  | 			//*/
 | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 			// update border...
 | 
					
						
							|  |  |  | 			if(update_border !== false){ | 
					
						
							|  |  |  | 				var border = Math.max(min_border, border / scale) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 				// set border right away...
 | 
					
						
							|  |  |  | 				if(update_border == 'before'){ | 
					
						
							| 
									
										
										
										
											2016-06-19 16:22:59 +03:00
										 |  |  | 					//css.borderWidth = border
 | 
					
						
							|  |  |  | 					marker.css({ borderWidth: border })  | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 				// set border with a delay...
 | 
					
						
							|  |  |  | 				// NOTE: this is to prevent the ugly border resize before
 | 
					
						
							|  |  |  | 				// 		the scale on scale down animation starts...
 | 
					
						
							|  |  |  | 				} else { | 
					
						
							|  |  |  | 					setTimeout(function(){  | 
					
						
							|  |  |  | 						marker.css({ borderWidth: border })  | 
					
						
							|  |  |  | 					}, border_timeout) | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 			marker.css(css) | 
					
						
							|  |  |  | 		}], | 
					
						
							|  |  |  | }) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-19 02:18:09 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | var CurrentImageIndicator =  | 
					
						
							|  |  |  | module.CurrentImageIndicator = core.ImageGridFeatures.Feature({ | 
					
						
							|  |  |  | 	title: '', | 
					
						
							|  |  |  | 	doc: '', | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	tag: 'ui-current-image-indicator', | 
					
						
							| 
									
										
										
										
											2016-12-10 20:38:31 +03:00
										 |  |  | 	depends: [ | 
					
						
							|  |  |  | 		'ui', | 
					
						
							|  |  |  | 	], | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	actions: CurrentImageIndicatorActions, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	handlers: [ | 
					
						
							| 
									
										
										
										
											2017-05-04 00:48:39 +03:00
										 |  |  | 		// show the indicator...
 | 
					
						
							| 
									
										
										
										
											2017-05-04 00:46:11 +03:00
										 |  |  | 		['load',  | 
					
						
							|  |  |  | 			function(){ | 
					
						
							|  |  |  | 				var fadein = this.config['current-image-indicator-fadein'] | 
					
						
							| 
									
										
										
										
											2017-05-04 00:58:08 +03:00
										 |  |  | 				this.updateCurrentImageIndicator() | 
					
						
							| 
									
										
										
										
											2017-05-16 00:26:37 +03:00
										 |  |  | 				this.dom.find('.current-marker') | 
					
						
							| 
									
										
										
										
											2017-05-04 00:46:11 +03:00
										 |  |  | 					.css({ | 
					
						
							|  |  |  | 						display: 'block', | 
					
						
							|  |  |  | 						opacity: 0, | 
					
						
							|  |  |  | 					}) | 
					
						
							|  |  |  | 					.delay(100) | 
					
						
							|  |  |  | 					.animate({ | 
					
						
							|  |  |  | 						opacity: 1 | 
					
						
							|  |  |  | 					}, fadein) | 
					
						
							|  |  |  | 			}], | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 		// Change border size in the appropriate spot in the animation:
 | 
					
						
							|  |  |  | 		// 	- before animation when scaling up
 | 
					
						
							|  |  |  | 		// 	- after when scaling down
 | 
					
						
							|  |  |  | 		// This is done to make the visuals consistent...
 | 
					
						
							| 
									
										
										
										
											2016-05-01 21:27:12 +03:00
										 |  |  | 		['resizing.pre', | 
					
						
							| 
									
										
										
										
											2016-06-19 02:18:09 +03:00
										 |  |  | 			function(unit, w1){  | 
					
						
							|  |  |  | 				var w0 = this[unit] | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 				w1 = w1 || 1 | 
					
						
							| 
									
										
										
										
											2016-06-19 02:18:09 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 				w0 > w1  | 
					
						
							| 
									
										
										
										
											2016-06-19 16:22:59 +03:00
										 |  |  | 					&& this.updateCurrentImageIndicator(null,  | 
					
						
							|  |  |  | 						'before',  | 
					
						
							|  |  |  | 						// NOTE: we need to get the target scale as we 
 | 
					
						
							|  |  |  | 						// 		have not started resizing yet...
 | 
					
						
							|  |  |  | 						(w0 / w1) * this.scale)  | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 			}], | 
					
						
							| 
									
										
										
										
											2016-06-19 02:18:09 +03:00
										 |  |  | 		['resizingDone', | 
					
						
							|  |  |  | 			function(){  | 
					
						
							|  |  |  | 				this.updateCurrentImageIndicator(null, 'before') }], | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-16 05:48:25 +03:00
										 |  |  | 		// hide and remove current image indicator...
 | 
					
						
							|  |  |  | 		['ribbonPanning.pre', | 
					
						
							|  |  |  | 			function(){ | 
					
						
							| 
									
										
										
										
											2017-05-16 22:23:52 +03:00
										 |  |  | 				//* XXX do we need to restore after pan??? 
 | 
					
						
							| 
									
										
										
										
											2016-05-16 05:48:25 +03:00
										 |  |  | 				this.__current_image_indicator_restore_timeout | 
					
						
							|  |  |  | 					&& clearTimeout(this.__current_image_indicator_restore_timeout) | 
					
						
							|  |  |  | 				delete this.__current_image_indicator_restore_timeout | 
					
						
							| 
									
										
										
										
											2017-05-16 21:11:23 +03:00
										 |  |  | 				//*/
 | 
					
						
							| 
									
										
										
										
											2016-05-16 05:48:25 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-16 00:26:37 +03:00
										 |  |  | 				this.dom | 
					
						
							| 
									
										
										
										
											2016-05-16 05:48:25 +03:00
										 |  |  | 					.find('.current-marker') | 
					
						
							| 
									
										
										
										
											2017-05-04 00:46:11 +03:00
										 |  |  | 						.velocity({opacity: 0}, { duration: 100 }) | 
					
						
							| 
									
										
										
										
											2016-05-16 05:48:25 +03:00
										 |  |  | 			}], | 
					
						
							| 
									
										
										
										
											2017-05-16 22:23:52 +03:00
										 |  |  | 		// XXX need to animate this...
 | 
					
						
							|  |  |  | 		['centerImage.pre', | 
					
						
							|  |  |  | 			function(){ | 
					
						
							|  |  |  | 				var m = this.dom.find('.current-marker')[0] | 
					
						
							|  |  |  | 				m  | 
					
						
							|  |  |  | 					&& (m.style.marginLeft = '') | 
					
						
							|  |  |  | 			}], | 
					
						
							| 
									
										
										
										
											2016-05-16 05:48:25 +03:00
										 |  |  | 		['ribbonPanning.post', | 
					
						
							|  |  |  | 			function(){ | 
					
						
							|  |  |  | 				var that = this | 
					
						
							|  |  |  | 				this.__current_image_indicator_restore_timeout = setTimeout(function(){ | 
					
						
							|  |  |  | 					that.updateCurrentImageIndicator() | 
					
						
							| 
									
										
										
										
											2017-05-04 00:46:11 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-16 22:23:52 +03:00
										 |  |  | 					var cur = that.ribbons.getImage() | 
					
						
							|  |  |  | 					var marker = that.dom.find('.current-marker') | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 					marker[0].style.marginLeft = '' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 					var m = -marker[0].offsetWidth/2  | 
					
						
							|  |  |  | 					var d = (marker.offset().left - cur.offset().left) / that.scale | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 					marker[0].style.marginLeft = (m - d) + 'px' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 					marker | 
					
						
							|  |  |  | 						.velocity({opacity: 1}, { duration: 100 }) | 
					
						
							| 
									
										
										
										
											2016-05-16 05:48:25 +03:00
										 |  |  | 				}, this.config['current-image-indicator-restore-delay'] || 500) | 
					
						
							|  |  |  | 			}], | 
					
						
							| 
									
										
										
										
											2016-07-03 03:47:12 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-10 21:00:53 +03:00
										 |  |  | 		// single image view -- fade in indicator after exit...
 | 
					
						
							| 
									
										
										
										
											2016-07-03 03:47:12 +03:00
										 |  |  | 		['toggleSingleImage', | 
					
						
							|  |  |  | 			function(){ | 
					
						
							| 
									
										
										
										
											2016-12-10 20:38:31 +03:00
										 |  |  | 				if(this.toggleSingleImage('?') == 'off'){ | 
					
						
							| 
									
										
										
										
											2017-05-16 00:26:37 +03:00
										 |  |  | 					this.dom.find('.current-marker') | 
					
						
							| 
									
										
										
										
											2017-05-04 01:09:32 +03:00
										 |  |  | 						.delay(150) | 
					
						
							|  |  |  | 						.animate({opacity: 1}, 100) | 
					
						
							| 
									
										
										
										
											2016-12-10 20:38:31 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-04 00:46:11 +03:00
										 |  |  | 				} else { | 
					
						
							| 
									
										
										
										
											2017-05-16 00:26:37 +03:00
										 |  |  | 					this.dom.find('.current-marker') | 
					
						
							| 
									
										
										
										
											2017-05-04 00:46:11 +03:00
										 |  |  | 						.css({ opacity: 0 }) | 
					
						
							| 
									
										
										
										
											2016-12-10 20:38:31 +03:00
										 |  |  | 				} | 
					
						
							| 
									
										
										
										
											2016-07-03 03:47:12 +03:00
										 |  |  | 			}], | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 	], | 
					
						
							|  |  |  | }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-20 16:04:33 +03:00
										 |  |  | // XXX is it a good idea to used the same timers for all instances???
 | 
					
						
							|  |  |  | var makeIndicatorHiderOnFastAction = function(hide_timeout){ | 
					
						
							|  |  |  | 	return function(){  | 
					
						
							| 
									
										
										
										
											2017-12-09 01:39:06 +03:00
										 |  |  | 		if(this.toggleSingleImage && this.toggleSingleImage('?') == 'on'){ | 
					
						
							| 
									
										
										
										
											2017-05-04 01:09:32 +03:00
										 |  |  | 			return | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-20 16:04:33 +03:00
										 |  |  | 		var that = this | 
					
						
							| 
									
										
										
										
											2017-05-16 00:26:37 +03:00
										 |  |  | 		var m = this.dom.find('.current-marker') | 
					
						
							| 
									
										
										
										
											2017-04-20 16:04:33 +03:00
										 |  |  | 		var t = this.config[hide_timeout] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		var cur = this.current | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		return function(){ | 
					
						
							|  |  |  | 			// delay fadeout...
 | 
					
						
							|  |  |  | 			if(cur != this.current  | 
					
						
							|  |  |  | 					&& m.css('opacity') == 1 | 
					
						
							|  |  |  | 					&& this.__current_indicator_t0 == null){ | 
					
						
							| 
									
										
										
										
											2017-04-20 17:53:43 +03:00
										 |  |  | 				this.__current_indicator_t0 = setTimeout(function(){ | 
					
						
							|  |  |  | 					delete that.__current_indicator_t0 | 
					
						
							|  |  |  | 					m.css({ opacity: 0 }) | 
					
						
							|  |  |  | 				}, t) | 
					
						
							| 
									
										
										
										
											2017-04-20 16:04:33 +03:00
										 |  |  | 			} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 			// cancel/delay previous fadein...
 | 
					
						
							|  |  |  | 			this.__current_indicator_t1 != null | 
					
						
							|  |  |  | 				&& clearTimeout(this.__current_indicator_t1) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 			// cancel fadeout and do fadein...
 | 
					
						
							|  |  |  | 			this.__current_indicator_t1 = setTimeout(function(){ | 
					
						
							|  |  |  | 				delete that.__current_indicator_t1 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 				// cancel fadeout...
 | 
					
						
							|  |  |  | 				that.__current_indicator_t0 != null | 
					
						
							|  |  |  | 					&& clearTimeout(that.__current_indicator_t0) | 
					
						
							|  |  |  | 				delete that.__current_indicator_t0 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-20 17:53:43 +03:00
										 |  |  | 				// show...
 | 
					
						
							|  |  |  | 				m.animate({ opacity: 1 }) | 
					
						
							| 
									
										
										
										
											2017-04-20 16:04:33 +03:00
										 |  |  | 			}, t-50) | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | var CurrentImageIndicatorHideOnFastScreenNav =  | 
					
						
							|  |  |  | module.CurrentImageIndicatorHideOnFastScreenNav = core.ImageGridFeatures.Feature({ | 
					
						
							|  |  |  | 	title: '', | 
					
						
							|  |  |  | 	doc: '', | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	tag: 'ui-current-image-indicator-hide-on-fast-screen-nav', | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	depends: [ | 
					
						
							|  |  |  | 		'ui', | 
					
						
							|  |  |  | 		'ui-current-image-indicator' | 
					
						
							|  |  |  | 	], | 
					
						
							|  |  |  | 	exclusive: ['ui-current-image-indicator-hide'], | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-20 16:04:33 +03:00
										 |  |  | 	config: { | 
					
						
							| 
									
										
										
										
											2017-04-20 17:53:43 +03:00
										 |  |  | 		'current-image-indicator-hide-threshold': 100, | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-20 17:53:43 +03:00
										 |  |  | 		'current-image-indicator-screen-hide-threshold': 100, | 
					
						
							| 
									
										
										
										
											2017-04-20 16:04:33 +03:00
										 |  |  | 	}, | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-20 16:04:33 +03:00
										 |  |  | 	handlers: [ | 
					
						
							|  |  |  | 		// hide indicator on next/prev...
 | 
					
						
							| 
									
										
										
										
											2017-04-20 17:53:43 +03:00
										 |  |  | 		['prevImage.pre nextImage.pre', | 
					
						
							|  |  |  | 			makeIndicatorHiderOnFastAction('current-image-indicator-hide-threshold')], | 
					
						
							|  |  |  | 		['prevScreen.pre nextScreen.pre', | 
					
						
							|  |  |  | 			makeIndicatorHiderOnFastAction('current-image-indicator-screen-hide-threshold')], | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 	], | 
					
						
							|  |  |  | }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | var CurrentImageIndicatorHideOnScreenNav =  | 
					
						
							|  |  |  | module.CurrentImageIndicatorHideOnScreenNav = core.ImageGridFeatures.Feature({ | 
					
						
							|  |  |  | 	title: '', | 
					
						
							|  |  |  | 	doc: '', | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	tag: 'ui-current-image-indicator-hide-on-screen-nav', | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	depends: [ | 
					
						
							|  |  |  | 		'ui', | 
					
						
							|  |  |  | 		'ui-current-image-indicator' | 
					
						
							|  |  |  | 	], | 
					
						
							|  |  |  | 	exclusive: ['ui-current-image-indicator-hide'], | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	handlers: [ | 
					
						
							|  |  |  | 		// 	this does the following:
 | 
					
						
							|  |  |  | 		// 		- hide on screen jump
 | 
					
						
							|  |  |  | 		// 		- show on any other action
 | 
					
						
							|  |  |  | 		//
 | 
					
						
							|  |  |  | 		// NOTE: we use .pre events here to see if we have moved...
 | 
					
						
							|  |  |  | 		['prevScreen.post nextScreen.post', | 
					
						
							|  |  |  | 			function(){  | 
					
						
							| 
									
										
										
										
											2017-05-16 00:26:37 +03:00
										 |  |  | 				var m = this.dom.find('.current-marker') | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 				m.css({ opacity: 0 }) | 
					
						
							|  |  |  | 			}], | 
					
						
							|  |  |  | 		['focusImage.post', | 
					
						
							|  |  |  | 			function(){  | 
					
						
							| 
									
										
										
										
											2017-05-16 00:26:37 +03:00
										 |  |  | 				var m = this.dom.find('.current-marker') | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 				m.css({ opacity: '' }) | 
					
						
							|  |  |  | 			}], | 
					
						
							|  |  |  | 	], | 
					
						
							|  |  |  | }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | //---------------------------------------------------------------------
 | 
					
						
							|  |  |  | // XXX this should:
 | 
					
						
							|  |  |  | // 	- float to the left of a ribbon if image #1 is fully visible (working)
 | 
					
						
							|  |  |  | // 	- float at left of viewer if image #1 is off screen...
 | 
					
						
							|  |  |  | // 	- float on the same level as the base ribbon...
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // XXX make this an action...
 | 
					
						
							|  |  |  | var updateBaseRibbonIndicator = function(img){ | 
					
						
							| 
									
										
										
										
											2017-05-16 22:23:52 +03:00
										 |  |  | 	var scale = this.scale | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 	var base = this.ribbons.getRibbon('base') | 
					
						
							|  |  |  | 	img = this.ribbons.getImage(img) | 
					
						
							|  |  |  | 	var m = base.find('.base-ribbon-marker') | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	if(base.length == 0){ | 
					
						
							|  |  |  | 		return | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	if(m.length == 0){ | 
					
						
							| 
									
										
										
										
											2017-05-16 00:26:37 +03:00
										 |  |  | 		m = this.dom.find('.base-ribbon-marker') | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 		// make the indicator...
 | 
					
						
							|  |  |  | 		if(m.length == 0){ | 
					
						
							|  |  |  | 			m = $('<div>') | 
					
						
							|  |  |  | 				.addClass('base-ribbon-marker') | 
					
						
							|  |  |  | 				.text('base ribbon') | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		m.prependTo(base) | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// XXX this is wrong -- need to calculate the offset after the move and not now...
 | 
					
						
							|  |  |  | 	if(base.offset().left < 0){ | 
					
						
							| 
									
										
										
										
											2017-05-16 00:26:37 +03:00
										 |  |  | 		m.css('left', (img.position().left + img.width()/2 - this.dom.width()/2) / scale) | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	} else { | 
					
						
							|  |  |  | 		m.css('left', '') | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | var BaseRibbonIndicator =  | 
					
						
							|  |  |  | module.BaseRibbonIndicator = core.ImageGridFeatures.Feature({ | 
					
						
							|  |  |  | 	title: '', | 
					
						
							|  |  |  | 	doc: '', | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	tag: 'ui-base-ribbon-indicator', | 
					
						
							|  |  |  | 	depends: ['ui'], | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	handlers: [ | 
					
						
							|  |  |  | 		// move marker to current image...
 | 
					
						
							|  |  |  | 		['focusImage.pre', | 
					
						
							|  |  |  | 			function(target){  | 
					
						
							|  |  |  | 				updateBaseRibbonIndicator.call(this, target) | 
					
						
							|  |  |  | 			}], | 
					
						
							|  |  |  | 		// prevent animations when focusing ribbons...
 | 
					
						
							|  |  |  | 		['focusRibbon.pre setBaseRibbon', | 
					
						
							|  |  |  | 			function(){ | 
					
						
							|  |  |  | 				updateBaseRibbonIndicator.call(this) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 				/* | 
					
						
							|  |  |  | 				this.ribbons.preventTransitions(m) | 
					
						
							|  |  |  | 				return function(){ | 
					
						
							|  |  |  | 					this.ribbons.restoreTransitions(m) | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 				*/ | 
					
						
							|  |  |  | 			}], | 
					
						
							|  |  |  | 	] | 
					
						
							|  |  |  | }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | var PassiveBaseRibbonIndicator =  | 
					
						
							|  |  |  | module.PassiveBaseRibbonIndicator = core.ImageGridFeatures.Feature({ | 
					
						
							|  |  |  | 	title: '', | 
					
						
							|  |  |  | 	doc: '', | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	tag: 'ui-passive-base-ribbon-indicator', | 
					
						
							|  |  |  | 	depends: ['ui'], | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	config: { | 
					
						
							|  |  |  | 		'ui-show-passive-base-ribbon-indicator': true, | 
					
						
							|  |  |  | 	}, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	actions: actions.Actions({ | 
					
						
							| 
									
										
										
										
											2017-01-05 03:06:06 +03:00
										 |  |  | 		togglePassiveBaseRibbonIndicator: ['Interface/Passive base ribbon indicator', | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 			toggler.CSSClassToggler( | 
					
						
							| 
									
										
										
										
											2017-05-16 00:26:37 +03:00
										 |  |  | 				function(){ return this.dom },  | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 				'show-passive-base-ribbon-indicator', | 
					
						
							|  |  |  | 				function(state){  | 
					
						
							|  |  |  | 					this.config['ui-show-passive-base-ribbon-indicator'] = state == 'on' }) ], | 
					
						
							|  |  |  | 	}), | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	handlers: [ | 
					
						
							|  |  |  | 		['start', | 
					
						
							|  |  |  | 			function(){ | 
					
						
							|  |  |  | 				this.togglePassiveBaseRibbonIndicator( | 
					
						
							|  |  |  | 					this.config['ui-show-passive-base-ribbon-indicator'] ? | 
					
						
							|  |  |  | 						'on' : 'off') | 
					
						
							|  |  |  | 			}] | 
					
						
							|  |  |  | 	], | 
					
						
							|  |  |  | }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | //---------------------------------------------------------------------
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // XXX make this work in browser
 | 
					
						
							|  |  |  | var UIScaleActions = actions.Actions({ | 
					
						
							|  |  |  | 	config: { | 
					
						
							|  |  |  | 		// XXX
 | 
					
						
							|  |  |  | 		'ui-scale-modes': { | 
					
						
							|  |  |  | 			desktop: 0, | 
					
						
							|  |  |  | 			touch: 3, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 	}, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// XXX need to account for scale in PartialRibbons
 | 
					
						
							|  |  |  | 	// XXX should this be browser API???
 | 
					
						
							|  |  |  | 	// XXX this does not re-scale the ribbons correctly in nw0.13
 | 
					
						
							| 
									
										
										
										
											2017-01-05 03:06:06 +03:00
										 |  |  | 	toggleInterfaceScale: ['Interface/Interface modes', | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 		core.makeConfigToggler('ui-scale-mode',  | 
					
						
							|  |  |  | 			function(){ return Object.keys(this.config['ui-scale-modes']) }, | 
					
						
							|  |  |  | 			function(state){  | 
					
						
							|  |  |  | 				var gui = requirejs('nw.gui') | 
					
						
							|  |  |  | 				var win = gui.Window.get() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 				this.ribbons.preventTransitions() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 				var w = this.screenwidth | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 				// NOTE: scale = Math.pow(1.2, zoomLevel)
 | 
					
						
							|  |  |  | 				// XXX in nw0.13 this appears to be async...
 | 
					
						
							|  |  |  | 				win.zoomLevel = this.config['ui-scale-modes'][state] || 0 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 				this.screenwidth = w | 
					
						
							|  |  |  | 				this.centerViewer() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 				this.ribbons.restoreTransitions() | 
					
						
							|  |  |  | 			})], | 
					
						
							|  |  |  | }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // XXX enable scale loading...
 | 
					
						
							|  |  |  | // 		...need to make this play nice with restoring scale on startup...
 | 
					
						
							|  |  |  | var UIScale =  | 
					
						
							|  |  |  | module.UIScale = core.ImageGridFeatures.Feature({ | 
					
						
							|  |  |  | 	title: '', | 
					
						
							|  |  |  | 	doc: '', | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	tag: 'ui-scale', | 
					
						
							|  |  |  | 	depends: [ | 
					
						
							|  |  |  | 		'ui', | 
					
						
							|  |  |  | 	], | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	actions: UIScaleActions, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// XXX test if in:
 | 
					
						
							|  |  |  | 	// 	- chrome app
 | 
					
						
							| 
									
										
										
										
											2017-10-04 08:08:40 +03:00
										 |  |  | 	// 	- desktop
 | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 	// 	- mobile
 | 
					
						
							| 
									
										
										
										
											2017-10-04 08:08:40 +03:00
										 |  |  | 	isApplicable: function(){ return this.runtime.desktop }, | 
					
						
							| 
									
										
										
										
											2016-04-02 19:30:48 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	// XXX show main window...
 | 
					
						
							|  |  |  | 	handlers: [ | 
					
						
							|  |  |  | 		['start', | 
					
						
							|  |  |  | 			function(){  | 
					
						
							|  |  |  | 				// XXX this messes up ribbon scale...
 | 
					
						
							|  |  |  | 				// 		...too close/fast?
 | 
					
						
							|  |  |  | 				//this.toggleInterfaceScale('!')
 | 
					
						
							|  |  |  | 			}], | 
					
						
							|  |  |  | 	], | 
					
						
							|  |  |  | }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /********************************************************************** | 
					
						
							| 
									
										
										
										
											2016-08-20 22:49:36 +03:00
										 |  |  | * vim:set ts=4 sw=4 :                               */ return module }) |