PHP 8.1.33
Preview: neon-notes.js Size: 4.52 KB
/home/jambtst2015/public_html/eschoolengine Installer/assets/js/neon-notes.js

/**
 *	Neon Notes Script
 *
 *	Developed by Arlind Nushi - www.laborator.co
 */

var neonNotes = neonNotes || {};

;(function($, window, undefined)
{
	"use strict";
	
	$(document).ready(function()
	{
		neonNotes.$container = $(".notes-env");
		
		$.extend(neonNotes, {
			isPresent: neonNotes.$container.length > 0,
			
			noTitleText: "Untitled",
			noDescriptionText: "(No content)",
			
			
			$currentNote: $(null),
			$currentNoteTitle: $(null),
			$currentNoteDescription: $(null),
			$currentNoteContent: $(null),
			
			addNote: function()
			{	
				var $note = $('<li><a href="#"><strong></strong><span></li></a></li>');
				
				$note.append('<div class="content"></div>').append('<button class="note-close">&times;</button>');
				
				$note.find('strong').html(neonNotes.noTitleText);
				$note.find('span').html(neonNotes.noDescriptionText);
				
				neonNotes.$notesList.prepend($note);
				
				TweenMax.set($note, {autoAlpha: 0});
				
				var tl = new TimelineMax();
				
				tl.append( TweenMax.to($note, .10, {css: {autoAlpha: 1}}) );
				tl.append( TweenMax.to($note, .15, {css: {autoAlpha: .8}}) );
				tl.append( TweenMax.to($note, .15, {css: {autoAlpha: 1}}) );
				
				neonNotes.$notesList.find('li').removeClass('current');
				$note.addClass('current');
				
				neonNotes.$writePadTxt.focus();
				
				neonNotes.checkCurrentNote();
			},
			
			checkCurrentNote: function()
			{
				var $current_note = neonNotes.$notesList.find('li.current').first();
				
				if($current_note.length)
				{
					neonNotes.$currentNote             = $current_note;
					neonNotes.$currentNoteTitle        = $current_note.find('strong');
					neonNotes.$currentNoteDescription  = $current_note.find('span');
					neonNotes.$currentNoteContent      = $current_note.find('.content');
					
					neonNotes.$writePadTxt.val( $.trim( neonNotes.$currentNoteContent.html() ) ).trigger('autosize.resize');;
				}
				else
				{
					var first = neonNotes.$notesList.find('li:first:not(.no-notes)');
					
					if(first.length)
					{
						first.addClass('current');
						neonNotes.checkCurrentNote();
					}
					else
					{
						neonNotes.$writePadTxt.val('');
						neonNotes.$currentNote = $(null);
						neonNotes.$currentNoteTitle = $(null);
						neonNotes.$currentNoteDescription = $(null);
						neonNotes.$currentNoteContent = $(null);
					}
				}
			},
			
			updateCurrentNoteText: function()
			{
				var text = $.trim( neonNotes.$writePadTxt.val() );
					
				if(neonNotes.$currentNote.length)
				{
					var title = '',
						description = '';
					
					if(text.length)
					{
						var _text = text.split("\n"), currline = 1;
						
						for(var i=0; i<_text.length; i++)
						{
							if(_text[i])
							{
								if(currline == 1)
								{
									title = _text[i];
								}
								else
								if(currline == 2)
								{
									description = _text[i];
								}
								
								currline++;
							}
							
							if(currline > 2)
								break;
						}
					}
					
					neonNotes.$currentNoteTitle.text( title.length ? title : neonNotes.noTitleText );
					neonNotes.$currentNoteDescription.text( description.length ? description : neonNotes.noDescriptionText );
					neonNotes.$currentNoteContent.text( text );
				}
				else
				if(text.length)
				{
					neonNotes.addNote();
				}
			}
		});
		
		// Mail Container Height fit with the document
		if(neonNotes.isPresent)
		{
			neonNotes.$notesList = neonNotes.$container.find('.list-of-notes');
			neonNotes.$writePad = neonNotes.$container.find('.write-pad');
			neonNotes.$writePadTxt = neonNotes.$writePad.find('textarea');
			
			neonNotes.$addNote = neonNotes.$container.find('#add-note');
			
			neonNotes.$addNote.on('click', function(ev)
			{
				neonNotes.addNote();
			});
			
			neonNotes.$writePadTxt.on('keyup', function(ev)
			{
				neonNotes.updateCurrentNoteText();
			});
			
			neonNotes.checkCurrentNote();
			
			neonNotes.$notesList.on('click', 'li a', function(ev)
			{
				ev.preventDefault();
				
				neonNotes.$notesList.find('li').removeClass('current');
				$(this).parent().addClass('current');
				
				neonNotes.checkCurrentNote();
				
				
			});
			
			neonNotes.$notesList.on('click', 'li .note-close', function(ev)
			{
				ev.preventDefault();
				
				var $note = $(this).parent();
				
				var tl = new TimelineMax();
				
				tl.append( 
					TweenMax.to($note, .15, {css: {autoAlpha: 0.2}, onComplete: function()
					{
						$note.slideUp('fast', function()
						{
							$note.remove();
							neonNotes.checkCurrentNote();
						});
					}}) 
				);
			});
		}
	});
	
})(jQuery, window);

Directory Contents

Dirs: 18 × Files: 55

Name Size Perms Modified Actions
amcharts DIR
- drwxrwxrwx 2024-11-22 17:53:15
Edit Download
- drwxrwxrwx 2024-11-22 17:53:15
Edit Download
- drwxrwxrwx 2024-11-22 17:53:15
Edit Download
dropzone DIR
- drwxrwxrwx 2024-11-22 17:53:15
Edit Download
- drwxrwxrwx 2024-11-22 17:53:15
Edit Download
gsap DIR
- drwxrwxrwx 2024-11-22 17:53:15
Edit Download
icheck DIR
- drwxrwxrwx 2024-11-22 17:53:15
Edit Download
isotope DIR
- drwxrwxrwx 2024-11-22 17:53:15
Edit Download
jcrop DIR
- drwxrwxrwx 2024-11-22 17:53:15
Edit Download
jquery-ui DIR
- drwxrwxrwx 2024-11-22 17:53:15
Edit Download
rickshaw DIR
- drwxrwxrwx 2024-11-22 17:53:15
Edit Download
select2 DIR
- drwxrwxrwx 2024-11-22 17:53:15
Edit Download
- drwxrwxrwx 2024-11-22 17:53:15
Edit Download
tocify DIR
- drwxrwxrwx 2024-11-22 17:53:15
Edit Download
uikit DIR
- drwxrwxrwx 2024-11-22 17:53:15
Edit Download
- drwxrwxrwx 2024-11-22 17:53:15
Edit Download
wysihtml5 DIR
- drwxrwxrwx 2024-11-22 17:53:15
Edit Download
- drwxrwxrwx 2024-11-22 17:53:15
Edit Download
10.00 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
13.49 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
15.16 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
40.56 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
8.27 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
6.59 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
16.77 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
67.34 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
27.10 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
2.18 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
4.44 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
6.18 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
586 B lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
0 B lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
117.16 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
94.12 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
8.41 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
69.20 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
38.24 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
23.55 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
16.94 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
17.63 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
56.62 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
3.09 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
4.60 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
120.64 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
7.33 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
20.57 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
93.08 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
26.76 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
12.55 KB lrwxr-xr-x 2024-11-22 17:53:15
Edit Download
5.57 KB lrwxr-xr-x 2024-11-22 17:53:15
Edit Download
5.75 KB lrwxr-xr-x 2024-11-22 17:53:15
Edit Download
64.21 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
13.60 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
3.76 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
6.82 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
18.26 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
45.31 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
47.17 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
1.92 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
6.42 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
8.83 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
1.70 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
4.52 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
6.41 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
646 B lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
89.24 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
2.35 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
7.19 KB lrwxr-xr-x 2024-11-22 17:53:15
Edit Download
2.74 KB lrwxr-xr-x 2024-11-22 17:53:15
Edit Download
3.65 KB lrwxr-xr-x 2024-11-22 17:53:15
Edit Download
9.84 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
7.79 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download
21.29 KB lrwxrwxrwx 2024-11-22 17:53:15
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).