Sha256: cf2a2e83813a46396c33ed736f76ff5c086680a11186e4ff3c9b05cb6707c631

Contents?: true

Size: 1.25 KB

Versions: 31

Compression:

Stored size: 1.25 KB

Contents

(function($) {

	$.noty.layouts.centerLeft = {
		name: 'centerLeft',
		options: { // overrides options

		},
		container: {
			object: '<ul id="noty_centerLeft_layout_container" />',
			selector: 'ul#noty_centerLeft_layout_container',
			style: function() {
				$(this).css({
					left: 20,
					position: 'fixed',
					width: '310px',
					height: 'auto',
					margin: 0,
					padding: 0,
					listStyleType: 'none',
					zIndex: 10000000
				});

				// getting hidden height
				var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
				$("body").append(dupe);
				dupe.find('.i-am-closing-now').remove();
				dupe.find('li').css('display', 'block');
				var actual_height = dupe.height();
				dupe.remove();

				if ($(this).hasClass('i-am-new')) {
					$(this).css({
						top: ($(window).height() - actual_height) / 2 + 'px'
					});
				} else {
					$(this).animate({
						top: ($(window).height() - actual_height) / 2 + 'px'
					}, 500);
				}

				if (window.innerWidth < 600) {
					$(this).css({
						left: 5
					});
				}

			}
		},
		parent: {
			object: '<li />',
			selector: 'li',
			css: {}
		},
		css: {
			display: 'none',
			width: '310px'
		},
		addClass: ''
	};

})(jQuery);

Version data entries

31 entries across 31 versions & 3 rubygems

Version Path
carnival-0.3.2 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js
carnival-0.3.1 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js
carnival-0.3.0 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js
carnival-0.2.8 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js
carnival-0.2.7 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js
carnival-0.2.6 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js
carnival-0.2.5 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js
carnival-0.2.4 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js
carnival-0.2.3 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js
carnival-0.1.10 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js
carnival-0.2.2 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js
carnival-0.2.1 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js
carnival-0.2.0 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js
carnival-0.1.9 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js
carnival-0.1.8 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js
carnival-0.1.7 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js
carnival-0.1.6 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js
carnival-0.1.5 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js
carnival-0.1.3 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js
carnival-0.1.2 app/assets/javascripts/carnival/external/noty/layouts/centerLeft.js