PageSourceSearch

https://www.lareynademesones.com.mx/modules/supercheckout/views/js/front/supercheckout_notifications.js

js lareynademesones.com.mx collected 2026-10-07 06:19:24 UTC 8,369 bytes, 222 lines download raw bytes

1/* ==========================================================
2 * AdminKIT v2.0
3 * notifications.js
4 * 
5 * http://www.mosaicpro.biz
6 * Copyright MosaicPro
7 *
8 * Built exclusively for sale @Envato Marketplaces
9 * ========================================================== */ 
10
11$(function()
12{
13	$('[data-toggle="notyfy"]').click(function () 
14	{
15		var self = $(this);
16		if(self.data('layout') == 'inline') 
17		{
18			$(self.data('custom')).notyfy(
19			{
20				text: text[self.data('type')],
21				type: self.data('type'),
22				dismissQueue: true,
23				buttons: (self.data('type') != 'confirm') ? false : [{
24					addClass: 'btn btn-success btn-small glyphicons btn-icon ok_2',
25					text: '<i></i> Ok',
26					onClick: function ($notyfy) {
27						$notyfy.close();
28						$(self.data('custom')).notyfy({
29							force: true,
30							text: 'You clicked "<strong>Ok</strong>" button.',
31							type: 'success'
32						});
33					}
34				}, {
35					addClass: 'btn btn-danger btn-small glyphicons btn-icon remove_2',
36					text: 'Cancel',
37					onClick: function ($notyfy) {
38						$notyfy.close();
39						$(self.data('custom')).notyfy({
40							force: true,
41							text: 'You clicked "Cancel" button',
42							type: 'error'
43						});
44					}
45				}]
46			});
47			return false;
48		}
49
50		notyfy({
51			text: notification[self.data('type')],
52			type: self.data('type'),
53			dismissQueue: true,
54			layout: self.data('layout'),
55			buttons: (self.data('type') != 'confirm') ? false : [{
56				addClass: 'btn btn-success btn-small btn-icon glyphicons ok_2',
57				text: '<i></i> Ok',
58				onClick: function ($notyfy) {
59					$notyfy.close();
60					notyfy({
61						force: true,
62						text: 'You clicked "<strong>Ok</strong>" button',
63						type: 'success',
64						layout: self.data('layout')
65					});
66				}
67			}, {
68				addClass: 'btn btn-danger btn-small btn-icon glyphicons remove_2',
69				text: '<i></i> Cancel',
70				onClick: function ($notyfy) {
71					$notyfy.close();
72					notyfy({
73						force: true,
74						text: '<strong>You clicked "Cancel" button<strong>',
75						type: 'error',
76						layout: self.data('layout')
77					});
78				}
79			}]
80		});
81		return false;
82	});
83	
84	/* Gritter Notifications */
85	
86	/* Global setting override
87	$.extend($.gritter.options, {
88	    class_name: 'gritter-light', // for light notifications (can be added directly to $.gritter.add too)
89	    position: 'bottom-left', // possibilities: bottom-left, bottom-right, top-left, top-right
90		fade_in_speed: 100, // how fast notifications fade in (string or int)
91		fade_out_speed: 100, // how fast the notices fade out
92		time: 3000 // hang on the screen for...
93	});
94    */
95
96	$('.gritter-add-sticky').click(function()
97	{
98		var unique_id = $.gritter.add({
99			// (string | mandatory) the heading of the notification
100			title: 'This is a sticky notice!',
101			// (string | mandatory) the text inside the notification
102			text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et <a href="#">magnis dis parturient</a> montes, nascetur ridiculus mus.',
103			// (string | optional) the image to display on the left
104			image: 'https://si0.twimg.com/profile_images/2873657673/f56ad0e8a62b588ad92b19969084b2ab_bigger.png',
105			// (bool | optional) if you want it to fade out on its own or just sit there
106			sticky: true,
107			// (int | optional) the time you want it to be alive for before fading out
108			time: '',
109			// (string | optional) the class name you want to apply to that specific message
110			class_name: 'my-sticky-class'
111		});
112		
113		// You can have it return a unique id, this can be used to manually remove it later using
114		/*
115		setTimeout(function(){
116
117			$.gritter.remove(unique_id, {
118				fade: true,
119				speed: 'slow'
120			});
121
122		}, 6000)
123		*/
124		return false;
125	});
126
127	$('.gritter-add-regular').click(function()
128	{
129		$.gritter.add({
130			// (string | mandatory) the heading of the notification
131			title: 'This is a regular notice!',
132			// (string | mandatory) the text inside the notification
133			text: 'This will fade out after a certain amount of time. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et <a href="#">magnis dis parturient</a> montes, nascetur ridiculus mus.',
134			// (string | optional) the image to display on the left
135			image: 'https://si0.twimg.com/profile_images/2873657673/f56ad0e8a62b588ad92b19969084b2ab_bigger.png',
136			// (bool | optional) if you want it to fade out on its own or just sit there
137			sticky: false,
138			// (int | optional) the time you want it to be alive for before fading out
139			time: ''
140		});
141
142		return false;
143
144	});
145	
146	$('.gritter-add-primary').click(function()
147	{
148		$.gritter.add({
149			// (string | mandatory) the heading of the notification
150			title: 'Notification!',
151			// (string | mandatory) the text inside the notification
152			text: 'Your Data has been saved successfully.',
153			// (string | optional) the image to display on the left			
154			// (bool | optional) if you want it to fade out on its own or just sit there
155			sticky: false,
156			// (int | optional) the time you want it to be alive for before fading out
157			time: '',
158			// (string | optional) the class name you want to apply to that specific message
159			class_name: 'gritter-primary'
160		});
161
162		return false;
163
164	});
165
166    $('.gritter-add-max').click(function()
167    {
168        $.gritter.add({
169            // (string | mandatory) the heading of the notification
170            title: 'This is a notice with a max of 3 on screen at one time!',
171            // (string | mandatory) the text inside the notification
172            text: 'This will fade out after a certain amount of time. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et <a href="#">magnis dis parturient</a> montes, nascetur ridiculus mus.',
173            // (string | optional) the image to display on the left
174            image: 'https://si0.twimg.com/profile_images/2873657673/f56ad0e8a62b588ad92b19969084b2ab_bigger.png',
175            // (bool | optional) if you want it to fade out on its own or just sit there
176            sticky: false,
177            // (function) before the gritter notice is opened
178            before_open: function(){
179                if($('.gritter-item-wrapper').length == 3)
180                {
181                    // Returning false prevents a new gritter from opening
182                    return false;
183                }
184            }
185        });
186        return false;
187    });
188
189	$('.gritter-add-without-image').click(function()
190	{
191		$.gritter.add({
192			// (string | mandatory) the heading of the notification
193			title: 'This is a notice without an image!',
194			// (string | mandatory) the text inside the notification
195			text: 'This will fade out after a certain amount of time. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et <a href="#">magnis dis parturient</a> montes, nascetur ridiculus mus.'
196		});
197		return false;
198	});
199
200    $('.gritter-add-white').click(function()
201    {
202        $.gritter.add({
203            // (string | mandatory) the heading of the notification
204            title: 'This is a light notification',
205            // (string | mandatory) the text inside the notification
206            text: 'Just add a "gritter-light" class_name to your $.gritter.add or globally to $.gritter.options.class_name',
207            class_name: 'gritter-light'
208        });
209        return false;
210    });
211
212});
213
214var notification = [];
215
216notification['alert'] = 'Best check yo self, you\'<strong>re not looking too good</strong>.';
217notification['primary'] = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.";
218notification['error'] = '<strong>Change a few things up and try submitting again.</strong> This Error message.';
219notification['success'] = 'You <strong>successfully</strong> read this important alert message.';
220notification['information'] = 'This alert needs your attention, but it\'s not super <strong>important</strong>.';
221notification['warning'] = '<strong>Warning!</strong> Best check yo self, you\'re not looking too good.';
222notification['confirm'] = 'Do you want to continue?';

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.