PHP Classes

File: contents/apps/ledit/src/js/main.js

Recommend this page to a friend!
  Classes of Subin Siby   Lobby   contents/apps/ledit/src/js/main.js   Download  
File: contents/apps/ledit/src/js/main.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Lobby
Web OS to install and run Web applications
Author: By
Last change: version 0.9.1 berly
Lobby 0.6
Date: 7 years ago
Size: 1,041 bytes
 

Contents

Class file image Download
$(document).ready(function(){tinymce.init({selector:"#workspace #editor",plugins:"autoresize"});var app="#workspace";$(app+" #save.btn").live("click",function(){if(tinyMCE.activeEditor.getContent()===""){$(app+" #error").text("Please Enter Something :-(").fadeIn().delay(2000).fadeOut();}else{key=$(app+" #saveName").val();value=tinyMCE.activeEditor.getContent();if(key==""){key=Date.today().toString("MMMM dS, yyyy");} lobby.app.save(key,value,function(data){if(data=="bad"){alert("Failed Saving Data");}else{lobby.app.ajax("saves.php",{},function(data){$(app+" #saves").html(data);});$(app).animate({backgroundColor:"rgb(101, 196, 53)"},1000,function(){$(app).animate({backgroundColor:"rgb(255, 255, 255)"},1000,function(){$(app).attr("style","");});});}});}});$(app+" #remove.btn").live("click",function(){var currentFile=$(app+" #saveName").val();if(currentFile==""){$(app+" #error").text("This File is not saved.").fadeIn().delay(2000).fadeOut();}else{lobby.app.remove(currentFile,function(data){window.location=lobby.app.url;});}});});