rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
dump("XXX ex " + ex + "\n"); | function FindNextFolder(originalFolderURI){ if (!originalFolderURI) return null; var originalFolderResource = RDF.GetResource(originalFolderURI); var folder = originalFolderResource.QueryInterface(Components.interfaces.nsIFolder); if (!folder) return null; try { var subFolderEnumerator = folder.GetSubFolders(); var done = false; while (!done) { var element = subFolderEnumerator.currentItem(); var currentSubFolder = element.QueryInterface(Components.interfaces.nsIMsgFolder); // don't land in the Trash folder. if(!IsSpecialFolder(currentSubFolder, MSG_FOLDER_FLAG_TRASH)) { if (currentSubFolder.getNumUnread(false /* don't descend */) > 0) { // if the child has unread, use it. return currentSubFolder.URI; } else if (currentSubFolder.getNumUnread(true /* descend */) > 0) { // if the child doesn't have any unread, but it's children do, recurse return FindNextFolder(currentSubFolder.URI); } } try { subFolderEnumerator.next(); } catch (ex) { done=true; } } // while } catch (ex) { // one way to get here is if the folder has no sub folders } if (folder.parent && folder.parent.URI) { return FindNextFolder(folder.parent.URI); } return null;} |
|
if (folder.parent && folder.parent.URI) { return FindNextFolder(folder.parent.URI); } | function FindNextFolder(originalFolderURI){ if (!originalFolderURI) return null; var originalFolderResource = RDF.GetResource(originalFolderURI); var folder = originalFolderResource.QueryInterface(Components.interfaces.nsIFolder); if (!folder) return null; try { var subFolderEnumerator = folder.GetSubFolders(); var done = false; while (!done) { var element = subFolderEnumerator.currentItem(); var currentSubFolder = element.QueryInterface(Components.interfaces.nsIMsgFolder); // don't land in the Trash folder. if(!IsSpecialFolder(currentSubFolder, MSG_FOLDER_FLAG_TRASH)) { if (currentSubFolder.getNumUnread(false /* don't descend */) > 0) { // if the child has unread, use it. return currentSubFolder.URI; } else if (currentSubFolder.getNumUnread(true /* descend */) > 0) { // if the child doesn't have any unread, but it's children do, recurse return FindNextFolder(currentSubFolder.URI); } } try { subFolderEnumerator.next(); } catch (ex) { done=true; } } // while } catch (ex) { // one way to get here is if the folder has no sub folders } if (folder.parent && folder.parent.URI) { return FindNextFolder(folder.parent.URI); } return null;} |
|
var start = item.startDate || item.dueDate; | var start = item.startDate || item.entryDate || item.dueDate; | function findPeriodForItem(item){ var start = item.startDate || item.dueDate; if (!start) return null; if (start.compare(this.today.end) == -1) return this.today; if (start.compare(this.tomorrow.end) == -1) return this.tomorrow; if (start.compare(this.soon.end) == -1) return this.soon; return null;}; |
SimileAjax.findScript = function(substring) { var heads = document.documentElement.getElementsByTagName("head"); | SimileAjax.findScript = function(doc, substring) { var heads = doc.documentElement.getElementsByTagName("head"); | SimileAjax.findScript = function(substring) { var heads = document.documentElement.getElementsByTagName("head"); for (var h = 0; h < heads.length; h++) { var scripts = heads[h].getElementsByTagName("script"); for (var s = 0; s < scripts.length; s++) { var url = scripts[s].src; var i = url.indexOf(substring); if (i >= 0) { return url; } } } return null; }; |
var scripts = heads[h].getElementsByTagName("script"); for (var s = 0; s < scripts.length; s++) { var url = scripts[s].src; var i = url.indexOf(substring); if (i >= 0) { return url; | var node = heads[h].firstChild; while (node != null) { if (node.nodeType == 1 && node.tagName.toLowerCase() == "script") { var url = node.src; var i = url.indexOf(substring); if (i >= 0) { return url; } | SimileAjax.findScript = function(substring) { var heads = document.documentElement.getElementsByTagName("head"); for (var h = 0; h < heads.length; h++) { var scripts = heads[h].getElementsByTagName("script"); for (var s = 0; s < scripts.length; s++) { var url = scripts[s].src; var i = url.indexOf(substring); if (i >= 0) { return url; } } } return null; }; |
node = node.nextSibling; | SimileAjax.findScript = function(substring) { var heads = document.documentElement.getElementsByTagName("head"); for (var h = 0; h < heads.length; h++) { var scripts = heads[h].getElementsByTagName("script"); for (var s = 0; s < scripts.length; s++) { var url = scripts[s].src; var i = url.indexOf(substring); if (i >= 0) { return url; } } } return null; }; |
|
dirObj.value = "/"; | dirObj.value = ""; | function FindSiteIndexAndDocDir(publishSiteData, docUrl, dirObj){ if (dirObj) dirObj.value = "/"; if (!publishSiteData || !docUrl || GetScheme(docUrl) == "file") return -1; // Remove filename from docUrl // (Check for terminal "/" so docUrl param can be a directory path) if (docUrl.charAt(docUrl.length-1) != "/") { var lastSlash = docUrl.lastIndexOf("/"); docUrl = docUrl.slice(0, lastSlash+1); } var siteIndex = -1; var siteUrlLen = 0; var urlLen = docUrl.length; for (var i = 0; i < publishSiteData.length; i++) { // Site publish or browse url needs to be contained in document URL, // but that may also have a directory after the site base URL // So we must examine all records to find the site URL that best // matches the document URL (XXX is this right?) var len = GetMatchingPublishUrlLength(publishSiteData[i], docUrl); if (len > siteUrlLen) { siteIndex = i; siteUrlLen = len; } } // Get directory name from the end of url (may be just "/") if (dirObj && siteIndex >= 0 && urlLen > siteUrlLen) dirObj.value = FormatDirForPublishing(docUrl.slice(siteUrlLen)); return siteIndex;} |
findViewersForObject: function(aObject, aPanelId) | findViewersForObject: function findViewersForObject(aObject, aPanelId, aLinkedViewer) | findViewersForObject: function(aObject, aPanelId) { // check each entry in the registry var len = this.mViewerDS.length; var entry; var urls = []; for (var i = 0; i < len; ++i) { if (this.getEntryProperty(i, "panels").indexOf(aPanelId) == -1) { continue; } if (this.objectMatchesEntry(aObject, i)) { if (this.getEntryProperty(i, "important")) { urls.unshift(i); } else { urls.push(i); } } } return urls; }, |
if (this.objectMatchesEntry(aObject, i)) { | if (this.objectMatchesEntry(aObject, aLinkedViewer, i)) { | findViewersForObject: function(aObject, aPanelId) { // check each entry in the registry var len = this.mViewerDS.length; var entry; var urls = []; for (var i = 0; i < len; ++i) { if (this.getEntryProperty(i, "panels").indexOf(aPanelId) == -1) { continue; } if (this.objectMatchesEntry(aObject, i)) { if (this.getEntryProperty(i, "important")) { urls.unshift(i); } else { urls.push(i); } } } return urls; }, |
catch(ex) { | catch(ex) { dump("FinishAccount failed, " + ex +"\n"); | function FinishAccount() { try { var pageData = GetPageData(); var accountData= gCurrentAccountData; if (!accountData) { accountData = new Object; // Time to set the smtpRequiresUsername attribute if (!serverIsNntp(pageData)) accountData.smtpRequiresUsername = true; } PageDataToAccountData(pageData, accountData); FixupAccountDataForIsp(accountData); // we might be simply finishing another account if (!gCurrentAccount) gCurrentAccount = createAccount(accountData); // transfer all attributes from the accountdata finishAccount(gCurrentAccount, accountData); verifyLocalFoldersAccount(gCurrentAccount); if (!serverIsNntp(pageData)) EnableCheckMailAtStartUpIfNeeded(gCurrentAccount); if (!document.getElementById("downloadMsgs").hidden) { if (document.getElementById("downloadMsgs").checked) { window.opener.gNewAccountToLoad = gCurrentAccount; // load messages for new POP account } else if (gCurrentAccount == am.defaultAccount) { // stop check for msgs when this is first account created from new profile window.opener.gLoadStartFolder = false; } } // in case we crash, force us a save of the prefs file NOW try { am.saveAccountInfo(); } catch (ex) { dump("Error saving account info: " + ex + "\n"); } window.close(); if(top.okCallback) { var state = true; //dump("finish callback"); top.okCallback(state); }} catch(ex) { }} |
var ccalendar = getDisplayComposite(); | var ccalendar = getCompositeCalendar(); | function finishCalendarToDoUnifinder(){ var ccalendar = getDisplayComposite(); ccalendar.removeObserver(unifinderToDoDataSourceObserver);} |
var ccalendar = getDisplayComposite(); | var ccalendar = getCompositeCalendar(); | function finishCalendarUnifinder( ){ var ccalendar = getDisplayComposite(); ccalendar.removeObserver(unifinderObserver);} |
if (IsInHTMLSourceMode()) { var htmlSource = gSourceContentWindow.value; if (htmlSource.length > 0) { var beginHead = htmlSource.indexOf("<head"); if (beginHead == -1) { AlertWithTitle(GetString("Alert"), GetString("NoHeadTag")); gEditorDisplayMode = DisplayModePreview; SetDisplayMode(DisplayModeSource); throw Components.results.NS_ERROR_FAILURE; } var beginBody = htmlSource.indexOf("<body"); if (beginBody == -1) { AlertWithTitle(GetString("Alert"), GetString("NoBodyTag")); gEditorDisplayMode = DisplayModePreview; SetDisplayMode(DisplayModeSource); throw Components.results.NS_ERROR_FAILURE; } } } | function FinishHTMLSource(){ // Switch edit modes -- converts source back into DOM document SetEditMode(PreviousNonSourceDisplayMode);} |
|
SimileAjax.Debug.exception(e); | SimileAjax.Debug.exception("Error firing event of name " + handlerName, e); | SimileAjax.ListenerQueue.prototype.fire = function(handlerName, args) { var listeners = [].concat(this._listeners); for (var i = 0; i < listeners.length; i++) { var listener = listeners[i]; if (handlerName in listener) { try { listener[handlerName].apply(listener, args); } catch (e) { SimileAjax.Debug.exception(e); } } else if (this._wildcardHandlerName != null && this._wildcardHandlerName in listener) { try { listener[this._wildcardHandlerName].apply(listener, [ handlerName ]); } catch (e) { SimileAjax.Debug.exception(e); } } }}; |
SimileAjax.Debug.exception(e); | SimileAjax.Debug.exception("Error firing event of name " + handlerName + " to wildcard handler", e); | SimileAjax.ListenerQueue.prototype.fire = function(handlerName, args) { var listeners = [].concat(this._listeners); for (var i = 0; i < listeners.length; i++) { var listener = listeners[i]; if (handlerName in listener) { try { listener[handlerName].apply(listener, args); } catch (e) { SimileAjax.Debug.exception(e); } } else if (this._wildcardHandlerName != null && this._wildcardHandlerName in listener) { try { listener[this._wildcardHandlerName].apply(listener, [ handlerName ]); } catch (e) { SimileAjax.Debug.exception(e); } } }}; |
e.initEvent("download-" + aEventType, false, true); | e.initEvent("download-" + aEventType, true, true); | function fireEventForElement(aElement, aEventType){ var e = document.createEvent("Events"); e.initEvent("download-" + aEventType, false, true); aElement.dispatchEvent(e);} |
if ( jQuery.browser.safari && event.target.nodeType == 3 ) { event = jQuery.extend({}, event); | if (event.target.nodeType == 3) { var originalEvent = event; event = jQuery.extend({}, originalEvent); | fix: function(event) { // Fix target property, if necessary if ( !event.target && event.srcElement ) event.target = event.srcElement; // Calculate pageX/Y if missing and clientX/Y available if ( typeof event.pageX == "undefined" && typeof event.clientX != "undefined" ) { var e = document.documentElement, b = document.body; event.pageX = event.clientX + (e.scrollLeft || b.scrollLeft); event.pageY = event.clientY + (e.scrollTop || b.scrollTop); } // Check safari and if target is a textnode if ( jQuery.browser.safari && event.target.nodeType == 3 ) { // target is readonly, clone the event object event = jQuery.extend({}, event); // get parentnode from textnode event.target = event.target.parentNode; } // fix preventDefault and stopPropagation if (!event.preventDefault) { event.preventDefault = function() { this.returnValue = false; }; } if (!event.stopPropagation) { event.stopPropagation = function() { this.cancelBubble = true; }; } return event; } |
event.target = event.target.parentNode; | event.target = originalEvent.target.parentNode; event.preventDefault = function() { return originalEvent.preventDefault(); }; event.stopPropagation = function() { return originalEvent.stopPropagation(); }; | fix: function(event) { // Fix target property, if necessary if ( !event.target && event.srcElement ) event.target = event.srcElement; // Calculate pageX/Y if missing and clientX/Y available if ( typeof event.pageX == "undefined" && typeof event.clientX != "undefined" ) { var e = document.documentElement, b = document.body; event.pageX = event.clientX + (e.scrollLeft || b.scrollLeft); event.pageY = event.clientY + (e.scrollTop || b.scrollTop); } // Check safari and if target is a textnode if ( jQuery.browser.safari && event.target.nodeType == 3 ) { // target is readonly, clone the event object event = jQuery.extend({}, event); // get parentnode from textnode event.target = event.target.parentNode; } // fix preventDefault and stopPropagation if (!event.preventDefault) { event.preventDefault = function() { this.returnValue = false; }; } if (!event.stopPropagation) { event.stopPropagation = function() { this.cancelBubble = true; }; } return event; } |
event.preventDefault = function() { this.returnValue = false; }; | if ( event ) { event.preventDefault = function() { this.returnValue = false; }; | fix: function(event) { event.preventDefault = function() { this.returnValue = false; }; event.stopPropagation = function() { this.cancelBubble = true; }; return event; } |
event.stopPropagation = function() { this.cancelBubble = true; }; | event.stopPropagation = function() { this.cancelBubble = true; }; } | fix: function(event) { event.preventDefault = function() { this.returnValue = false; }; event.stopPropagation = function() { this.cancelBubble = true; }; return event; } |
children = treeitem.childNodes.item(1).childNodes; | var children = treeitem.childNodes.item(1).childNodes; | function fixup_children(id) { // Add container="true" on nodes with "link" attribute var treeitem = document.getElementById(id); children = treeitem.childNodes.item(1).childNodes; for (var ii=0; ii < children.length; ii++) { var child = children.item(ii); if (child.getAttribute('link') != '' && child.getAttribute('container') != 'true') { child.setAttribute('container', 'true'); child.removeAttribute('open'); } }} |
GetCurrentEditor().incrementModificationCount(1); | getCurrentEditor().incrementModificationCount(1); | function FlushChanges(){ if (gDialog.modified) { // let's make sure the editor is going to require save on exit GetCurrentEditor().incrementModificationCount(1); } // Validate all user data and set attributes and possibly insert new element here // If there's an error the user must correct, return false to keep dialog open. var sheet; for (var i = 0; i < objectsArray.length; i++) { if (objectsArray[i].modified && !objectsArray[i].external && objectsArray[i].type == SHEET) { /* let's serialize this stylesheet ! */ sheet = objectsArray[i].cssElt; if (sheet.ownerNode.nodeName.toLowerCase() == "link") SerializeExternalSheet(sheet, null); else SerializeEmbeddedSheet(sheet); } } SaveWindowLocation(); return true; // do close the window} |
var form = $(form); | form = $(form); | focusFirstElement: function(form) { var form = $(form); var elements = Form.getElements(form); for (var i = 0; i < elements.length; i++) { var element = elements[i]; if (element.type != 'hidden' && !element.disabled) { Field.activate(element); break; } } }, |
form = $(form); var elements = Form.getElements(form); for (var i = 0; i < elements.length; i++) { var element = elements[i]; if (element.type != 'hidden' && !element.disabled) { Field.activate(element); break; } } | Field.activate(Form.findFirstElement(form)); | focusFirstElement: function(form) { form = $(form); var elements = Form.getElements(form); for (var i = 0; i < elements.length; i++) { var element = elements[i]; if (element.type != 'hidden' && !element.disabled) { Field.activate(element); break; } } }, |
if (!currentFocusedElement) return; | function FocusRingUpdate_Mail(){ // WhichPaneHasFocus() uses on top.document.commandDispatcher.focusedElement // to determine which pane has focus // if the focusedElement is null, we're here on a blur. // nsFocusController::Blur() calls nsFocusController::SetFocusedElement(null), // which will update any commands listening for "focus". // we really only care about nsFocusController::Focus() happens, // which calls nsFocusController::SetFocusedElement(element) var currentFocusedElement = WhichPaneHasFocus(); if (!currentFocusedElement) return; if (currentFocusedElement != gLastFocusedElement) { currentFocusedElement.setAttribute("focusring", "true"); if (gLastFocusedElement) gLastFocusedElement.removeAttribute("focusring"); gLastFocusedElement = currentFocusedElement; // since we just changed the pane with focus we need to update the toolbar to reflect this // XXX TODO // can we optimize // and just update cmd_delete and button_delete? UpdateMailToolbar("focus"); }} |
|
currentFocusedElement.setAttribute("focusring", "true"); | if (currentFocusedElement) currentFocusedElement.setAttribute("focusring", "true"); | function FocusRingUpdate_Mail(){ // WhichPaneHasFocus() uses on top.document.commandDispatcher.focusedElement // to determine which pane has focus // if the focusedElement is null, we're here on a blur. // nsFocusController::Blur() calls nsFocusController::SetFocusedElement(null), // which will update any commands listening for "focus". // we really only care about nsFocusController::Focus() happens, // which calls nsFocusController::SetFocusedElement(element) var currentFocusedElement = WhichPaneHasFocus(); if (!currentFocusedElement) return; if (currentFocusedElement != gLastFocusedElement) { currentFocusedElement.setAttribute("focusring", "true"); if (gLastFocusedElement) gLastFocusedElement.removeAttribute("focusring"); gLastFocusedElement = currentFocusedElement; // since we just changed the pane with focus we need to update the toolbar to reflect this // XXX TODO // can we optimize // and just update cmd_delete and button_delete? UpdateMailToolbar("focus"); }} |
else { var isImap = (treeitem.getAttribute('ServerType') == "imap"); if (isImap) { var uri = treeitem.getAttribute("id"); var folder = GetMsgFolderFromUri(uri); if (folder) { var imapFolder = folder.QueryInterface(Components.interfaces.nsIMsgImapMailFolder); if (imapFolder) { imapFolder.PerformExpand(msgWindow); } } } } | function FolderPaneOnClick(event){ debug("in FolderPaneClick()\n"); var targetclass = event.target.getAttribute('class'); debug('targetclass = ' + targetclass + '\n'); if (targetclass == 'tree-cell-twisty') { // The twisty is nested three below the treeitem: // <treeitem> // <treerow> // <treecell> // <titledbutton class="tree-cell-twisty"> <!-- anonymous --> var treeitem = event.target.parentNode.parentNode.parentNode; var open = treeitem.getAttribute('open'); if(open == "true") { //dump("twisty open\n"); var item = event.target.parentNode.parentNode.parentNode; if (item.nodeName == "treeitem") { var isServer = (treeitem.getAttribute('IsServer') == "true"); if (isServer) { var uri = treeitem.getAttribute("id"); var server = GetServer(uri); if (server) { server.PerformExpand(msgWindow); } } } } } else if(event.detail == 2) { var item = event.target.parentNode.parentNode; if (item.nodeName == "treeitem") FolderPaneDoubleClick(item); }} |
|
if (targetclass == 'twisty') { | if (targetclass == 'tree-cell-twisty') { | function FolderPaneOnClick(event){ var targetclass = event.target.getAttribute('class'); debug('targetclass = ' + targetclass + '\n'); if (targetclass == 'twisty') { // The twisty is nested three below the treeitem: // <treeitem> // <treerow> // <treecell> // <titledbutton class="twisty"> <!-- anonymous --> var treeitem = event.target.parentNode.parentNode.parentNode; var open = treeitem.getAttribute('open'); if(open == "true") { //dump("twisty open\n"); var item = event.target.parentNode.parentNode.parentNode; if (item.nodeName == "treeitem") { var isServer = (treeitem.getAttribute('IsServer') == "true"); if (isServer) { var uri = treeitem.getAttribute("id"); var server = GetServer(uri); if (server) { server.PerformExpand(msgWindow); } } } } } else if(event.clickCount == 2) { var item = event.target.parentNode.parentNode; if (item.nodeName == "treeitem") FolderPaneDoubleClick(item); }} |
debug("in FolderPaneClick()\n"); | debug("in FolderPaneClick()\n"); if (event.button != 0) return; | function FolderPaneOnClick(event){ debug("in FolderPaneClick()\n"); var t = event.originalTarget; var item; var uri; if (t.getAttribute('twisty') == 'true') { // The twisty is nested three below the treeitem: // <treeitem> // <treerow> // <treecell> // <button class="tree-cell-twisty"> <!-- anonymous --> var treeitem = t.parentNode.parentNode.parentNode; var open = treeitem.getAttribute('open'); if(open == "true") { //dump("twisty open\n"); item = t.parentNode.parentNode.parentNode; if (item.localName == "treeitem") { var isServer = (treeitem.getAttribute('IsServer') == "true"); if (isServer) { uri = treeitem.getAttribute("id"); var server = GetServer(uri); if (server) { server.PerformExpand(msgWindow); } } else { var isImap = (treeitem.getAttribute('ServerType') == "imap"); if (isImap) { uri = treeitem.getAttribute("id"); var folder = GetMsgFolderFromUri(uri); if (folder) { var imapFolder = folder.QueryInterface(Components.interfaces.nsIMsgImapMailFolder); if (imapFolder) { imapFolder.performExpand(msgWindow); } } } } } } } else if(event.detail == 2) { item = t.parentNode.parentNode; if (item.localName == "treeitem") FolderPaneDoubleClick(item); }} |
msgDatabase = null; | function FolderPaneSelectionChange(){ var folderOutliner = GetFolderOutliner(); if (folderOutliner.outlinerBoxObject.selection.count == 1) { var startIndex = {}; var endIndex = {}; folderOutliner.outlinerBoxObject.selection.getRangeAt(0, startIndex, endIndex); var folderResource = GetFolderResource(folderOutliner, startIndex.value); var msgFolder = folderResource.QueryInterface(Components.interfaces.nsIMsgFolder); if (msgFolder == msgWindow.openFolder) return; else { var sortType = 0; var sortOrder = 0; var viewFlags = 0; var viewType = 0; // don't get the db if this folder is a server // we're going to be display account central if (!(msgFolder.isServer)) { try { var msgDatabase = msgFolder.getMsgDatabase(msgWindow); if (msgDatabase) { var dbFolderInfo = msgDatabase.dBFolderInfo; sortType = dbFolderInfo.sortType; sortOrder = dbFolderInfo.sortOrder; viewFlags = dbFolderInfo.viewFlags; viewType = dbFolderInfo.viewType; } } catch (ex) { dump("failed to get view & sort values. ex = " + ex +"\n"); } } ChangeFolderByURI(folderResource.Value, viewType, viewFlags, sortType, sortOrder); } } else { msgWindow.openFolder = null; ClearThreadPane(); } if (! gAccountCentralLoaded) ClearMessagePane(); if (gDisplayStartupPage) { loadStartPage(); gDisplayStartupPage = false; }} |
|
ClearMessagePane(); | function FolderPaneSelectionChange(){ var tree = GetFolderTree(); if(tree) { var selArray = tree.selectedItems; if ( selArray && (selArray.length == 1) ) { ChangeFolderByDOMNode(selArray[0]); // explicitly force the message pane to get cleared when we switch folders ClearMessagePane(); } else { var threadTree = GetThreadTree(); ClearThreadTreeSelection(); threadTree.setAttribute('ref', null); ClearMessagePane(); } }} |
|
var threadTree = GetThreadTree(); ClearThreadTreeSelection(); threadTree.setAttribute('ref', null); ClearMessagePane(); | ClearThreadPane(); | function FolderPaneSelectionChange(){ var tree = GetFolderTree(); if(tree) { var selArray = tree.selectedItems; if ( selArray && (selArray.length == 1) ) { ChangeFolderByDOMNode(selArray[0]); // explicitly force the message pane to get cleared when we switch folders ClearMessagePane(); } else { var threadTree = GetThreadTree(); ClearThreadTreeSelection(); threadTree.setAttribute('ref', null); ClearMessagePane(); } }} |
ClearMessagePane(); | function FolderPaneSelectionChange(){ var tree = GetFolderTree(); if(tree) { var selArray = tree.selectedItems; if ( selArray && (selArray.length == 1) ) { ChangeFolderByDOMNode(selArray[0]); // explicitly force the message pane to get cleared when we switch folders ClearMessagePane(); } else { var threadTree = GetThreadTree(); ClearThreadTreeSelection(); threadTree.setAttribute('ref', null); ClearMessagePane(); } }} |
|
doSetOKCancel(folderPropsOKButtonCallback); | function folderPropsOnLoad(){ dump("folder props loaded"+'\n'); doSetOKCancel(folderPropsOKButtonCallback); RDF = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); // look in arguments[0] for parameters if (window.arguments && window.arguments[0]) { if ( window.arguments[0].title ) { top.window.title = window.arguments[0].title; } if ( window.arguments[0].okCallback ) { top.okCallback = window.arguments[0].okCallback; } } // fill in folder name, based on what they selected in the folder pane if (window.arguments[0].preselectedURI) { try { gPreselectedFolderURI = window.arguments[0].preselectedURI; } catch (ex) { } } else { dump("passed null for preselectedURI, do nothing\n"); } if(window.arguments[0].name) { var name = document.getElementById("name"); name.value = window.arguments[0].name;// name.setSelectionRange(0,-1);// name.focusTextField(); } gServerTypeFolder = window.arguments[0].serverType; dump("preselectfolder uri = "+gPreselectedFolderURI+'\n'); dump("serverType = "+gServerTypeFolder+'\n'); if (window.arguments && window.arguments[0]) { if (window.arguments[0].msgWindow) { gParentMsgWindow = window.arguments[0].msgWindow; } } // this hex value come from nsMsgFolderFlags.h var folderResource = RDF.GetResource(gPreselectedFolderURI); if (folderResource) gMsgFolder = folderResource.QueryInterface(Components.interfaces.nsIMsgFolder); if (!gMsgFolder) dump("no gMsgFolder preselectfolder uri = "+gPreselectedFolderURI+'\n'); if (gMsgFolder) { if (gMsgFolder.flags & MSG_FOLDER_FLAG_OFFLINE) { if(gServerTypeFolder == "imap" || gServerTypeFolder == "pop3") document.getElementById("offline.selectForOfflineFolder").checked = true; if(gServerTypeFolder == "nntp") document.getElementById("offline.selectForOfflineNewsgroup").checked = true; } else { if(gServerTypeFolder == "imap" || gServerTypeFolder == "pop3") document.getElementById("offline.selectForOfflineFolder").checked = false; if(gServerTypeFolder == "nntp") document.getElementById("offline.selectForOfflineNewsgroup").checked = false; } // select the menu item var folderCharsetList = document.getElementById("folderCharsetList"); var elements = folderCharsetList.getElementsByAttribute("value", gMsgFolder.charset); folderCharsetList.selectedItem = elements[0]; // set override checkbox document.getElementById("folderCharsetOverride").checked = gMsgFolder.charsetOverride; // set check for new mail checkbox document.getElementById("folderCheckForNewMessages").checked = gMsgFolder.flags & MSG_FOLDER_FLAG_CHECK_NEW; } if (gServerTypeFolder == "imap") { var imapFolder = gMsgFolder.QueryInterface(Components.interfaces.nsIMsgImapMailFolder); if (imapFolder) imapFolder.fillInFolderProps(gFolderPropsSink); } // select the initial tab if (window.arguments[0].tabID) { // set index for starting panel on the <tabpanel> element var folderPropTabPanel = document.getElementById("folderPropTabPanel"); folderPropTabPanel.setAttribute("selectedIndex", window.arguments[0].tabIndex); try { var tab = document.getElementById(window.arguments[0].tabID); tab.setAttribute("selected", "true"); } catch (ex) {} } hideShowControls(gServerTypeFolder); moveToAlertPosition();} |
|
this.mObserverList[i].OnAssert(this.kRasputin, this.kNC_child, | this.mObserverList[i].onAssert(this.kRasputin, this.kNC_child, | forceAssert: function() { dump("forceAssert() called\n"); for ( var i = 0 ; i < this.mObserverList.length ; i++) { this.mObserverList[i].OnAssert(this.kRasputin, this.kNC_child, this.kElvis); } }, |
sysBeep.Beep(); | function forceInteger(elementID){ var editField = document.getElementById( elementID ); if ( !editField ) return; var stringIn = editField.value; if (stringIn && stringIn.length > 0) { // Strip out all nonnumeric characters editField.value = stringIn.replace(/\D+/g,""); // we hope to remove the following line for blur() once xp widgets land // cmanske (9/15) testing this now that GFX ender widget is active //editField.blur(); sysBeep.Beep(); }} |
|
status += Math.round( nSecs/3600 ) + " hours, "; | status += Math.round( nSecs/3600 ) + ":"; | function formatSeconds( nSecs ) { status = ""; if ( nSecs >= 3600 ) { status += Math.round( nSecs/3600 ) + " hours, "; nSecs = nSecs % 3600; } status += Math.round( nSecs/60 ) + " minutes and "; nSecs = nSecs % 60; status += nSecs + " seconds"; return status;} |
status += Math.round( nSecs/60 ) + " minutes and "; | status += Math.round( nSecs/60 ) + ":"; | function formatSeconds( nSecs ) { status = ""; if ( nSecs >= 3600 ) { status += Math.round( nSecs/3600 ) + " hours, "; nSecs = nSecs % 3600; } status += Math.round( nSecs/60 ) + " minutes and "; nSecs = nSecs % 60; status += nSecs + " seconds"; return status;} |
status += nSecs + " seconds"; | status += nSecs; | function formatSeconds( nSecs ) { status = ""; if ( nSecs >= 3600 ) { status += Math.round( nSecs/3600 ) + " hours, "; nSecs = nSecs % 3600; } status += Math.round( nSecs/60 ) + " minutes and "; nSecs = nSecs % 60; status += nSecs + " seconds"; return status;} |
function FormControlFilter() { switch (node.nodeName.toLowerCase()) { case "input": case "select": case "button": case "textarea": case "object": return NodeFilter.FILTER_ACCEPT; default: return NodeFilter.FILTER_SKIP; } } | function FormControlFilter(node) { if (node instanceof nsIInputElement || node instanceof nsISelectElement || node instanceof nsIButtonElement || node instanceof nsITextareaElement || node instanceof nsIObjectElement) return NodeFilter.FILTER_ACCEPT; return NodeFilter.FILTER_SKIP; } | function FormControlFilter() { switch (node.nodeName.toLowerCase()) { case "input": case "select": case "button": case "textarea": case "object": return NodeFilter.FILTER_ACCEPT; default: return NodeFilter.FILTER_SKIP; } } |
this.find("input[@type='submit'],input[@type='hidden'],textarea,input[@checked],input[@type='password'],input[@type='text'],option[@selected]").filter(":enabled").each(function() { | this.find("input,textarea,option") .filter(":enabled") .each(function() { if (((this.parentNode.type == 'select-one') || (this.parentNode.type == 'select-multiple')) && (!this.selected)) return; if (((this.type == 'radio') || (this.type == 'checkbox')) && (!this.checked)) return; | $.fn.formValues = function() { var a = []; this.find("input[@type='submit'],input[@type='hidden'],textarea,input[@checked],input[@type='password'],input[@type='text'],option[@selected]").filter(":enabled").each(function() { var o = {}; o.name = this.name || this.id || this.parentNode.name || this.parentNode.id; o.value = this.value; a.push(o); }); return a;}; |
this.find("input,textarea,option") .filter(":enabled") .each(function() { if (((this.parentNode.type == 'select-one') || (this.parentNode.type == 'select-multiple')) && (!this.selected)) return; | $("input,textarea,option",this).filter(":enabled").each(function(){ if ((this.parentNode.type == 'select-one' || this.parentNode.type == 'select-multiple') && !this.selected) { return null; } | $.fn.formValues = function() { var a = []; this.find("input,textarea,option") .filter(":enabled") .each(function() { // // Skip selects with options which aren't selected if (((this.parentNode.type == 'select-one') || (this.parentNode.type == 'select-multiple')) && (!this.selected)) return; // // Skip radio and checkbox elements which aren't checked if (((this.type == 'radio') || (this.type == 'checkbox')) && (!this.checked)) return; // // All other elements are valid ;) var o = {}; o.name = this.name || this.id || this.parentNode.name || this.parentNode.id; o.value = this.value; a.push(o); }); return a;}; |
if (((this.type == 'radio') || (this.type == 'checkbox')) && (!this.checked)) return; | if ((this.type == 'radio' || this.type == 'checkbox') && !this.checked) { return null; } | $.fn.formValues = function() { var a = []; this.find("input,textarea,option") .filter(":enabled") .each(function() { // // Skip selects with options which aren't selected if (((this.parentNode.type == 'select-one') || (this.parentNode.type == 'select-multiple')) && (!this.selected)) return; // // Skip radio and checkbox elements which aren't checked if (((this.type == 'radio') || (this.type == 'checkbox')) && (!this.checked)) return; // // All other elements are valid ;) var o = {}; o.name = this.name || this.id || this.parentNode.name || this.parentNode.id; o.value = this.value; a.push(o); }); return a;}; |
var o = {}; o.name = this.name || this.id || this.parentNode.name || this.parentNode.id; o.value = this.value; a.push(o); | a.push({ name: this.name || this.id || this.parentNode.name || this.parentNode.id, value: this.value | $.fn.formValues = function() { var a = []; this.find("input,textarea,option") .filter(":enabled") .each(function() { // // Skip selects with options which aren't selected if (((this.parentNode.type == 'select-one') || (this.parentNode.type == 'select-multiple')) && (!this.selected)) return; // // Skip radio and checkbox elements which aren't checked if (((this.type == 'radio') || (this.type == 'checkbox')) && (!this.checked)) return; // // All other elements are valid ;) var o = {}; o.name = this.name || this.id || this.parentNode.name || this.parentNode.id; o.value = this.value; a.push(o); }); return a;}; |
}); | $.fn.formValues = function() { var a = []; this.find("input,textarea,option") .filter(":enabled") .each(function() { // // Skip selects with options which aren't selected if (((this.parentNode.type == 'select-one') || (this.parentNode.type == 'select-multiple')) && (!this.selected)) return; // // Skip radio and checkbox elements which aren't checked if (((this.type == 'radio') || (this.type == 'checkbox')) && (!this.checked)) return; // // All other elements are valid ;) var o = {}; o.name = this.name || this.id || this.parentNode.name || this.parentNode.id; o.value = this.value; a.push(o); }); return a;}; |
|
target : file, | target : makeFileURL(file), | function foundHeaderInfo(aSniffer, aData, aSkipPrompt){ var contentType = aSniffer.contentType; var contentEncodingType = aSniffer.contentEncodingType; var shouldDecode = false; // Are we allowed to decode? try { const helperAppService = Components.classes["@mozilla.org/uriloader/external-helper-app-service;1"]. getService(Components.interfaces.nsIExternalHelperAppService); var url = aSniffer.uri.QueryInterface(Components.interfaces.nsIURL); var urlExt = url.fileExtension; if (helperAppService.applyDecodingForExtension(urlExt, contentEncodingType)) { shouldDecode = true; } } catch (e) { } var isDocument = aData.document != null && isDocumentType(contentType); if (!isDocument && !shouldDecode && contentEncodingType) { // The data is encoded, we are not going to decode it, and this is not a // document save so we won't be doing a "save as, complete" (which would // break if we reset the type here). So just set our content type to // correspond to the outermost encoding so we get extensions and the like // right. contentType = contentEncodingType; } var file = null; var saveAsType = kSaveAsType_URL; try { file = aData.fileName.QueryInterface(Components.interfaces.nsILocalFile); } catch (e) { var saveAsTypeResult = { rv: 0 }; file = getTargetFile(aData, aSniffer, contentType, isDocument, aSkipPrompt, saveAsTypeResult); saveAsType = saveAsTypeResult.rv; } // If we're saving a document, and are saving either in complete mode or // as converted text, pass the document to the web browser persist component. // If we're just saving the HTML (second option in the list), send only the URI. var source = (isDocument && saveAsType != kSaveAsType_URL) ? aData.document : aSniffer.uri; var persistArgs = { source : source, contentType : (isDocument && saveAsType == kSaveAsType_Text) ? "text/plain" : contentType, target : file, postData : aData.document ? getPostData() : null, bypassCache : aData.bypassCache }; var persist = makeWebBrowserPersist(); // Calculate persist flags. const nsIWBP = Components.interfaces.nsIWebBrowserPersist; const flags = nsIWBP.PERSIST_FLAGS_NO_CONVERSION | nsIWBP.PERSIST_FLAGS_REPLACE_EXISTING_FILES; if (aData.bypassCache) persist.persistFlags = flags | nsIWBP.PERSIST_FLAGS_BYPASS_CACHE; else persist.persistFlags = flags | nsIWBP.PERSIST_FLAGS_FROM_CACHE; if (shouldDecode) persist.persistFlags &= ~nsIWBP.PERSIST_FLAGS_NO_CONVERSION; // Create download and initiate it (below) var dl = Components.classes["@mozilla.org/download;1"].createInstance(Components.interfaces.nsIDownload); if (isDocument && saveAsType != kSaveAsType_URL) { // Saving a Document, not a URI: var filesFolder = null; if (persistArgs.contentType != "text/plain") { // Create the local directory into which to save associated files. const nsILocalFile = Components.interfaces.nsILocalFile; const lfContractID = "@mozilla.org/file/local;1"; filesFolder = Components.classes[lfContractID].createInstance(nsILocalFile); filesFolder.initWithPath(persistArgs.target.path); var nameWithoutExtension = filesFolder.leafName; nameWithoutExtension = nameWithoutExtension.substring(0, nameWithoutExtension.lastIndexOf(".")); var filesFolderLeafName = getStringBundle().formatStringFromName("filesFolder", [nameWithoutExtension], 1); filesFolder.leafName = filesFolderLeafName; } var encodingFlags = 0; if (persistArgs.contentType == "text/plain") { encodingFlags |= nsIWBP.ENCODE_FLAGS_FORMATTED; encodingFlags |= nsIWBP.ENCODE_FLAGS_ABSOLUTE_LINKS; encodingFlags |= nsIWBP.ENCODE_FLAGS_NOFRAMES_CONTENT; } const kWrapColumn = 80; dl.init(aSniffer.uri, persistArgs.target, null, null, null, persist); persist.saveDocument(persistArgs.source, persistArgs.target, filesFolder, persistArgs.contentType, encodingFlags, kWrapColumn); } else { dl.init(source, persistArgs.target, null, null, null, persist); persist.saveURI(source, null, getReferrer(document), persistArgs.postData, null, persistArgs.target); }} |
const nsILocalFile = Components.interfaces.nsILocalFile; const lfContractID = "@mozilla.org/file/local;1"; filesFolder = Components.classes[lfContractID].createInstance(nsILocalFile); filesFolder.initWithPath(persistArgs.target.path); | filesFolder = file.clone(); | function foundHeaderInfo(aSniffer, aData, aSkipPrompt){ var contentType = aSniffer.contentType; var contentEncodingType = aSniffer.contentEncodingType; var shouldDecode = false; // Are we allowed to decode? try { const helperAppService = Components.classes["@mozilla.org/uriloader/external-helper-app-service;1"]. getService(Components.interfaces.nsIExternalHelperAppService); var url = aSniffer.uri.QueryInterface(Components.interfaces.nsIURL); var urlExt = url.fileExtension; if (helperAppService.applyDecodingForExtension(urlExt, contentEncodingType)) { shouldDecode = true; } } catch (e) { } var isDocument = aData.document != null && isDocumentType(contentType); if (!isDocument && !shouldDecode && contentEncodingType) { // The data is encoded, we are not going to decode it, and this is not a // document save so we won't be doing a "save as, complete" (which would // break if we reset the type here). So just set our content type to // correspond to the outermost encoding so we get extensions and the like // right. contentType = contentEncodingType; } var file = null; var saveAsType = kSaveAsType_URL; try { file = aData.fileName.QueryInterface(Components.interfaces.nsILocalFile); } catch (e) { var saveAsTypeResult = { rv: 0 }; file = getTargetFile(aData, aSniffer, contentType, isDocument, aSkipPrompt, saveAsTypeResult); saveAsType = saveAsTypeResult.rv; } // If we're saving a document, and are saving either in complete mode or // as converted text, pass the document to the web browser persist component. // If we're just saving the HTML (second option in the list), send only the URI. var source = (isDocument && saveAsType != kSaveAsType_URL) ? aData.document : aSniffer.uri; var persistArgs = { source : source, contentType : (isDocument && saveAsType == kSaveAsType_Text) ? "text/plain" : contentType, target : file, postData : aData.document ? getPostData() : null, bypassCache : aData.bypassCache }; var persist = makeWebBrowserPersist(); // Calculate persist flags. const nsIWBP = Components.interfaces.nsIWebBrowserPersist; const flags = nsIWBP.PERSIST_FLAGS_NO_CONVERSION | nsIWBP.PERSIST_FLAGS_REPLACE_EXISTING_FILES; if (aData.bypassCache) persist.persistFlags = flags | nsIWBP.PERSIST_FLAGS_BYPASS_CACHE; else persist.persistFlags = flags | nsIWBP.PERSIST_FLAGS_FROM_CACHE; if (shouldDecode) persist.persistFlags &= ~nsIWBP.PERSIST_FLAGS_NO_CONVERSION; // Create download and initiate it (below) var dl = Components.classes["@mozilla.org/download;1"].createInstance(Components.interfaces.nsIDownload); if (isDocument && saveAsType != kSaveAsType_URL) { // Saving a Document, not a URI: var filesFolder = null; if (persistArgs.contentType != "text/plain") { // Create the local directory into which to save associated files. const nsILocalFile = Components.interfaces.nsILocalFile; const lfContractID = "@mozilla.org/file/local;1"; filesFolder = Components.classes[lfContractID].createInstance(nsILocalFile); filesFolder.initWithPath(persistArgs.target.path); var nameWithoutExtension = filesFolder.leafName; nameWithoutExtension = nameWithoutExtension.substring(0, nameWithoutExtension.lastIndexOf(".")); var filesFolderLeafName = getStringBundle().formatStringFromName("filesFolder", [nameWithoutExtension], 1); filesFolder.leafName = filesFolderLeafName; } var encodingFlags = 0; if (persistArgs.contentType == "text/plain") { encodingFlags |= nsIWBP.ENCODE_FLAGS_FORMATTED; encodingFlags |= nsIWBP.ENCODE_FLAGS_ABSOLUTE_LINKS; encodingFlags |= nsIWBP.ENCODE_FLAGS_NOFRAMES_CONTENT; } const kWrapColumn = 80; dl.init(aSniffer.uri, persistArgs.target, null, null, null, persist); persist.saveDocument(persistArgs.source, persistArgs.target, filesFolder, persistArgs.contentType, encodingFlags, kWrapColumn); } else { dl.init(source, persistArgs.target, null, null, null, persist); persist.saveURI(source, null, getReferrer(document), persistArgs.postData, null, persistArgs.target); }} |
var modeComplete = aData.document != null && (contentType == "text/html" || contentType == "text/xml"); | var isDocument = aData.document != null && isDocumentType(contentType); | function foundHeaderInfo(aSniffer, aData){ var contentType = aSniffer.contentType; var fp = makeFilePicker(); var titleKey = aData.filePickerTitle || "SaveLinkTitle"; var bundle = getStringBundle(); fp.init(window, bundle.GetStringFromName(titleKey), Components.interfaces.nsIFilePicker.modeSave); var modeComplete = aData.document != null && (contentType == "text/html" || contentType == "text/xml"); appendFiltersForContentType(fp, aSniffer.contentType, modeComplete ? MODE_COMPLETE : MODE_FILEONLY); // Determine what the 'default' string to display in the File Picker dialog // should be. var defaultFileName = getDefaultFileName(aData.fileName, aSniffer.suggestedFileName, aSniffer.uri); fp.defaultString = getNormalizedLeafName(defaultFileName, contentType); if (fp.show() == Components.interfaces.nsIFilePicker.returnCancel || !fp.file) return; fp.file.leafName = validateFileName(fp.file.leafName); fp.file.leafName = getNormalizedLeafName(fp.file.leafName, contentType); // XXX turn this on when Adam lands the ability to save as a specific content// type//var contentType = fp.filterIndex == 2 ? "text/unicode" : "text/html"; var source = (aData.document && contentType == "text/html" && fp.filterIndex == 0) ? aData.document : aSniffer.uri; var persistArgs = { source : source,// XXX turn this on when Adam lands the ability to save as a specific content// type// contentType : fp.filterIndex == 2 ? "text/unicode" : "text/html"; target : fp.file, postData : getPostData() }; openDialog("chrome://global/content/nsProgressDlg.xul", "", "chrome,titlebar,minizable,dialog=yes", makeWebBrowserPersist(), persistArgs);} |
modeComplete ? MODE_COMPLETE : MODE_FILEONLY); | isDocument ? MODE_COMPLETE : MODE_FILEONLY); | function foundHeaderInfo(aSniffer, aData){ var contentType = aSniffer.contentType; var fp = makeFilePicker(); var titleKey = aData.filePickerTitle || "SaveLinkTitle"; var bundle = getStringBundle(); fp.init(window, bundle.GetStringFromName(titleKey), Components.interfaces.nsIFilePicker.modeSave); var modeComplete = aData.document != null && (contentType == "text/html" || contentType == "text/xml"); appendFiltersForContentType(fp, aSniffer.contentType, modeComplete ? MODE_COMPLETE : MODE_FILEONLY); // Determine what the 'default' string to display in the File Picker dialog // should be. var defaultFileName = getDefaultFileName(aData.fileName, aSniffer.suggestedFileName, aSniffer.uri); fp.defaultString = getNormalizedLeafName(defaultFileName, contentType); if (fp.show() == Components.interfaces.nsIFilePicker.returnCancel || !fp.file) return; fp.file.leafName = validateFileName(fp.file.leafName); fp.file.leafName = getNormalizedLeafName(fp.file.leafName, contentType); // XXX turn this on when Adam lands the ability to save as a specific content// type//var contentType = fp.filterIndex == 2 ? "text/unicode" : "text/html"; var source = (aData.document && contentType == "text/html" && fp.filterIndex == 0) ? aData.document : aSniffer.uri; var persistArgs = { source : source,// XXX turn this on when Adam lands the ability to save as a specific content// type// contentType : fp.filterIndex == 2 ? "text/unicode" : "text/html"; target : fp.file, postData : getPostData() }; openDialog("chrome://global/content/nsProgressDlg.xul", "", "chrome,titlebar,minizable,dialog=yes", makeWebBrowserPersist(), persistArgs);} |
var source = (aData.document && contentType == "text/html" && fp.filterIndex == 0) ? aData.document : aSniffer.uri; | var source = (isDocument && fp.filterIndex != 1) ? aData.document : aSniffer.uri; | function foundHeaderInfo(aSniffer, aData){ var contentType = aSniffer.contentType; var fp = makeFilePicker(); var titleKey = aData.filePickerTitle || "SaveLinkTitle"; var bundle = getStringBundle(); fp.init(window, bundle.GetStringFromName(titleKey), Components.interfaces.nsIFilePicker.modeSave); var modeComplete = aData.document != null && (contentType == "text/html" || contentType == "text/xml"); appendFiltersForContentType(fp, aSniffer.contentType, modeComplete ? MODE_COMPLETE : MODE_FILEONLY); // Determine what the 'default' string to display in the File Picker dialog // should be. var defaultFileName = getDefaultFileName(aData.fileName, aSniffer.suggestedFileName, aSniffer.uri); fp.defaultString = getNormalizedLeafName(defaultFileName, contentType); if (fp.show() == Components.interfaces.nsIFilePicker.returnCancel || !fp.file) return; fp.file.leafName = validateFileName(fp.file.leafName); fp.file.leafName = getNormalizedLeafName(fp.file.leafName, contentType); // XXX turn this on when Adam lands the ability to save as a specific content// type//var contentType = fp.filterIndex == 2 ? "text/unicode" : "text/html"; var source = (aData.document && contentType == "text/html" && fp.filterIndex == 0) ? aData.document : aSniffer.uri; var persistArgs = { source : source,// XXX turn this on when Adam lands the ability to save as a specific content// type// contentType : fp.filterIndex == 2 ? "text/unicode" : "text/html"; target : fp.file, postData : getPostData() }; openDialog("chrome://global/content/nsProgressDlg.xul", "", "chrome,titlebar,minizable,dialog=yes", makeWebBrowserPersist(), persistArgs);} |
source : source, target : fp.file, postData : getPostData() | source : source, contentType : (isDocument && fp.filterIndex == 2) ? "text/plain" : contentType, target : fp.file, postData : isDocument ? getPostData() : null, bypassCache : aData.bypassCache | function foundHeaderInfo(aSniffer, aData){ var contentType = aSniffer.contentType; var fp = makeFilePicker(); var titleKey = aData.filePickerTitle || "SaveLinkTitle"; var bundle = getStringBundle(); fp.init(window, bundle.GetStringFromName(titleKey), Components.interfaces.nsIFilePicker.modeSave); var modeComplete = aData.document != null && (contentType == "text/html" || contentType == "text/xml"); appendFiltersForContentType(fp, aSniffer.contentType, modeComplete ? MODE_COMPLETE : MODE_FILEONLY); // Determine what the 'default' string to display in the File Picker dialog // should be. var defaultFileName = getDefaultFileName(aData.fileName, aSniffer.suggestedFileName, aSniffer.uri); fp.defaultString = getNormalizedLeafName(defaultFileName, contentType); if (fp.show() == Components.interfaces.nsIFilePicker.returnCancel || !fp.file) return; fp.file.leafName = validateFileName(fp.file.leafName); fp.file.leafName = getNormalizedLeafName(fp.file.leafName, contentType); // XXX turn this on when Adam lands the ability to save as a specific content// type//var contentType = fp.filterIndex == 2 ? "text/unicode" : "text/html"; var source = (aData.document && contentType == "text/html" && fp.filterIndex == 0) ? aData.document : aSniffer.uri; var persistArgs = { source : source,// XXX turn this on when Adam lands the ability to save as a specific content// type// contentType : fp.filterIndex == 2 ? "text/unicode" : "text/html"; target : fp.file, postData : getPostData() }; openDialog("chrome://global/content/nsProgressDlg.xul", "", "chrome,titlebar,minizable,dialog=yes", makeWebBrowserPersist(), persistArgs);} |
fp.defaultString = getNormalizedLeafName(defaultFileName, contentType); | var defaultExtension = getDefaultExtension(defaultFileName, aSniffer.uri, contentType); fp.defaultExtension = defaultExtension; fp.defaultString = getNormalizedLeafName(defaultFileName, defaultExtension); | function foundHeaderInfo(aSniffer, aData){ var contentType = aSniffer.contentType; var fp = makeFilePicker(); var titleKey = aData.filePickerTitle || "SaveLinkTitle"; var bundle = getStringBundle(); fp.init(window, bundle.GetStringFromName(titleKey), Components.interfaces.nsIFilePicker.modeSave); var isDocument = aData.document != null && isDocumentType(contentType); appendFiltersForContentType(fp, aSniffer.contentType, isDocument ? MODE_COMPLETE : MODE_FILEONLY); const prefSvcContractID = "@mozilla.org/preferences-service;1"; const prefSvcIID = Components.interfaces.nsIPrefService; var prefs = Components.classes[prefSvcContractID].getService(prefSvcIID).getBranch("browser.download."); const nsILocalFile = Components.interfaces.nsILocalFile; try { fp.displayDirectory = prefs.getComplexValue("dir", nsILocalFile); } catch (e) { } if (isDocument) { try { fp.filterIndex = prefs.getIntPref("save_converter_index"); } catch (e) { } } // Determine what the 'default' string to display in the File Picker dialog // should be. var defaultFileName = getDefaultFileName(aData.fileName, aSniffer.suggestedFileName, aSniffer.uri); fp.defaultString = getNormalizedLeafName(defaultFileName, contentType); if (fp.show() == Components.interfaces.nsIFilePicker.returnCancel || !fp.file) return; if (isDocument) prefs.setIntPref("save_converter_index", fp.filterIndex); var directory = fp.file.parent.QueryInterface(nsILocalFile); prefs.setComplexValue("dir", nsILocalFile, directory); fp.file.leafName = validateFileName(fp.file.leafName); fp.file.leafName = getNormalizedLeafName(fp.file.leafName, contentType); // If we're saving a document, and are saving either in complete mode or // as converted text, pass the document to the web browser persist component. // If we're just saving the HTML (second option in the list), send only the URI. var source = (isDocument && fp.filterIndex != 1) ? aData.document : aSniffer.uri; var persistArgs = { source : source, contentType : (isDocument && fp.filterIndex == 2) ? "text/plain" : contentType, target : fp.file, postData : isDocument ? getPostData() : null, bypassCache : aData.bypassCache }; openDialog("chrome://global/content/nsProgressDlg.xul", "", "chrome,titlebar,minimizable,dialog=yes", makeWebBrowserPersist(), persistArgs);} |
fp.file.leafName = getNormalizedLeafName(fp.file.leafName, contentType); | function foundHeaderInfo(aSniffer, aData){ var contentType = aSniffer.contentType; var fp = makeFilePicker(); var titleKey = aData.filePickerTitle || "SaveLinkTitle"; var bundle = getStringBundle(); fp.init(window, bundle.GetStringFromName(titleKey), Components.interfaces.nsIFilePicker.modeSave); var isDocument = aData.document != null && isDocumentType(contentType); appendFiltersForContentType(fp, aSniffer.contentType, isDocument ? MODE_COMPLETE : MODE_FILEONLY); const prefSvcContractID = "@mozilla.org/preferences-service;1"; const prefSvcIID = Components.interfaces.nsIPrefService; var prefs = Components.classes[prefSvcContractID].getService(prefSvcIID).getBranch("browser.download."); const nsILocalFile = Components.interfaces.nsILocalFile; try { fp.displayDirectory = prefs.getComplexValue("dir", nsILocalFile); } catch (e) { } if (isDocument) { try { fp.filterIndex = prefs.getIntPref("save_converter_index"); } catch (e) { } } // Determine what the 'default' string to display in the File Picker dialog // should be. var defaultFileName = getDefaultFileName(aData.fileName, aSniffer.suggestedFileName, aSniffer.uri); fp.defaultString = getNormalizedLeafName(defaultFileName, contentType); if (fp.show() == Components.interfaces.nsIFilePicker.returnCancel || !fp.file) return; if (isDocument) prefs.setIntPref("save_converter_index", fp.filterIndex); var directory = fp.file.parent.QueryInterface(nsILocalFile); prefs.setComplexValue("dir", nsILocalFile, directory); fp.file.leafName = validateFileName(fp.file.leafName); fp.file.leafName = getNormalizedLeafName(fp.file.leafName, contentType); // If we're saving a document, and are saving either in complete mode or // as converted text, pass the document to the web browser persist component. // If we're just saving the HTML (second option in the list), send only the URI. var source = (isDocument && fp.filterIndex != 1) ? aData.document : aSniffer.uri; var persistArgs = { source : source, contentType : (isDocument && fp.filterIndex == 2) ? "text/plain" : contentType, target : fp.file, postData : isDocument ? getPostData() : null, bypassCache : aData.bypassCache }; openDialog("chrome://global/content/nsProgressDlg.xul", "", "chrome,titlebar,minimizable,dialog=yes", makeWebBrowserPersist(), persistArgs);} |
|
if (!scriptRec) dd ("no scriptrec"); else if (fn == "anonymous") | if (fn == "anonymous") | function FrameRecord (frame){ if (!(frame instanceof jsdIStackFrame)) throw new BadMojo (ERR_INVALID_PARAM, "value"); this.setColumnPropertyName ("stack-col-0", "functionName"); this.setColumnPropertyName ("stack-col-2", "location"); var fn = frame.script.functionName; if (!fn) fn = MSG_VAL_TLSCRIPT; var sourceRec = console.scripts[frame.script.fileName]; if (sourceRec) { this.location = sourceRec.shortName + ":" + frame.line; var scriptRec = sourceRec.locateChildByScript(frame.script); if (!scriptRec) dd ("no scriptrec"); else if (fn == "anonymous") fn = scriptRec.functionName; } else dd ("no sourcerec"); this.functionName = fn; this.frame = frame; this.reserveChildren(); this.scopeRec = new ValueRecord (frame.scope, MSG_WORD_SCOPE, ""); this.appendChild (this.scopeRec); this.thisRec = new ValueRecord (frame.thisValue, MSG_WORD_THIS, ""); this.property = console.stackView.atomFrame; this.appendChild (this.thisRec);} |
if (!iterable) return []; | var $A = Array.from = function(iterable) { if (iterable.toArray) { return iterable.toArray(); } else { var results = []; for (var i = 0; i < iterable.length; i++) results.push(iterable[i]); return results; }} |
|
client.ucConverter.charset = client.CHARSET; | function fromUnicode (msg){ if (!("ucConverter" in client)) return msg; return client.ucConverter.ConvertFromUnicode(msg);} |
|
picker.appendFilter('OPML Files', '*.opml'); | var newsBlogBundle = document.getElementById("bundle_newsblog"); picker.appendFilter( newsBlogBundle.getString("subscribe-OPMLExportOPMLFilesFilterText"), "*.opml"); | function futils_nosepicker(initialPath, typeList, attribs){ const classes = Components.classes; const interfaces = Components.interfaces; const PICKER_CTRID = "@mozilla.org/filepicker;1"; const LOCALFILE_CTRID = "@mozilla.org/file/local;1"; const nsIFilePicker = interfaces.nsIFilePicker; const nsILocalFile = interfaces.nsILocalFile; var picker = classes[PICKER_CTRID].createInstance(nsIFilePicker); if (typeof attribs == "object") { for (var a in attribs) picker[a] = attribs[a]; } else throw "bad type for param |attribs|"; if (initialPath) { var localFile; if (typeof initialPath == "string") { localFile = classes[LOCALFILE_CTRID].createInstance(nsILocalFile); localFile.initWithPath(initialPath); } else { if (!(initialPath instanceof nsILocalFile)) throw "bad type for argument |initialPath|"; localFile = initialPath; } picker.displayDirectory = localFile } if (typeof typeList == "string") typeList = typeList.split(" "); if (typeList instanceof Array) { for (var i in typeList) { switch (typeList[i]) { case "$all": picker.appendFilters(FILTER_ALL); break; case "$html": picker.appendFilters(FILTER_HTML); break; case "$text": picker.appendFilters(FILTER_TEXT); break; case "$images": picker.appendFilters(FILTER_IMAGES); break; case "$xml": picker.appendFilters(FILTER_XML); break; case "$xul": picker.appendFilters(FILTER_XUL); break; case "$opml": picker.appendFilter('OPML Files', '*.opml'); break; default: picker.appendFilter(typeList[i], typeList[i]); break; } } } return picker;} |
case "$opml": picker.appendFilter('OPML Files', '*.opml'); break; | function futils_nosepicker(initialPath, typeList, attribs){ const classes = Components.classes; const interfaces = Components.interfaces; const PICKER_CTRID = "@mozilla.org/filepicker;1"; const LOCALFILE_CTRID = "@mozilla.org/file/local;1"; const nsIFilePicker = interfaces.nsIFilePicker; const nsILocalFile = interfaces.nsILocalFile; var picker = classes[PICKER_CTRID].createInstance(nsIFilePicker); if (typeof attribs == "object") { for (var a in attribs) picker[a] = attribs[a]; } else throw "bad type for param |attribs|"; if (initialPath) { var localFile; if (typeof initialPath == "string") { localFile = classes[LOCALFILE_CTRID].createInstance(nsILocalFile); localFile.initWithPath(initialPath); } else { if (!(initialPath instanceof nsILocalFile)) throw "bad type for argument |initialPath|"; localFile = initialPath; } picker.displayDirectory = localFile } if (typeof typeList == "string") typeList = typeList.split(" "); if (typeList instanceof Array) { for (var i in typeList) { switch (typeList[i]) { case "$all": picker.appendFilters(FILTER_ALL); break; case "$html": picker.appendFilters(FILTER_HTML); break; case "$text": picker.appendFilters(FILTER_TEXT); break; case "$images": picker.appendFilters(FILTER_IMAGES); break; case "$xml": picker.appendFilters(FILTER_XML); break; case "$xul": picker.appendFilters(FILTER_XUL); break; default: picker.appendFilter(typeList[i], typeList[i]); break; } } } return picker;} |
|
y.opacity = z.now; | else y.opacity = z.now; | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.curCSS(z.el,prop) ) || z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); if ( !y[prop] ) z.o.auto = true; z.custom(0,z.max()); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; y.display = "block"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = 1; // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the overflow y.overflow = z.oldOverflow; // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); // Reset the property, if the item has been hidden if ( z.o.hide ) y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ? z.el.orig[prop] + "px" : z.el.orig[prop]; // set its height and/or width to auto jQuery.setAuto( z.el, prop ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
y.zoom = 1; | y.zoom = "1"; | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.curCSS(z.el,prop) ) || z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); if ( !y[prop] ) z.o.auto = true; z.custom(0,z.max()); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; y.display = "block"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = 1; // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the overflow y.overflow = z.oldOverflow; // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); // Reset the property, if the item has been hidden if ( z.o.hide ) y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ? z.el.orig[prop] + "px" : z.el.orig[prop]; // set its height and/or width to auto jQuery.setAuto( z.el, prop ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
return parseFloat( jQuery.curCSS(z.el, prop) ) || z.max(); | var r = parseFloat( jQuery.curCSS(z.el, prop) ); return r && r > -10000 ? r : z.max(); | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete, step: options.step }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( options.step ) options.step.apply( elem, [ z.now ] ); if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.curCSS(z.el, prop) ) || z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function( p ){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.custom( 0, z.el.orig[prop] ); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element if ( !z.el.oldOverlay ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out //if ( z.el.oldOverlay == "visible" ) y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the overflow y.overflow = z.el.oldOverflow; // Reset the property, if the item has been hidden if ( z.o.hide ) y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ? z.el.orig[prop] + "px" : z.el.orig[prop]; // set its height and/or width to auto if ( prop == 'height' || prop == 'width' ) jQuery.setAuto( z.el, prop ); // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
z.custom(z.cur(),0); | z.custom(z.el.orig[prop], 0); | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete, step: options.step }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( options.step ) options.step.apply( elem, [ z.now ] ); if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ var r = parseFloat( jQuery.curCSS(z.el, prop) ); return r && r > -10000 ? r : z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function( p ){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.custom( 0, z.el.orig[prop] ); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element if ( !z.el.oldOverlay ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out //if ( z.el.oldOverlay == "visible" ) y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the overflow y.overflow = z.el.oldOverflow; // Reset the property, if the item has been hidden if ( z.o.hide ) y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ? z.el.orig[prop] + "px" : z.el.orig[prop]; // set its height and/or width to auto if ( prop == 'height' || prop == 'width' ) jQuery.setAuto( z.el, prop ); // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
if ( z.o.hide ) y.display = 'none'; | z.el.curAnim[ prop ] = true; var done = true; for ( var i in z.el.curAnim ) if ( z.el.curAnim[i] !== true ) done = false; if ( done ) { y.overflow = z.el.oldOverflow; if ( z.o.hide ) y.display = 'none'; if ( z.o.hide ) { for ( var p in z.el.curAnim ) { y[ p ] = z.el.orig[p] + ( p == "opacity" ? "" : "px" ); | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete, step: options.step }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( options.step ) options.step.apply( elem, [ z.now ] ); if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ var r = parseFloat( jQuery.curCSS(z.el, prop) ); return r && r > -10000 ? r : z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function( p ){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.custom( 0, z.el.orig[prop] ); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element if ( !z.el.oldOverlay ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out //if ( z.el.oldOverlay == "visible" ) y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the overflow y.overflow = z.el.oldOverflow; // Reset the property, if the item has been hidden if ( z.o.hide ) y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ? z.el.orig[prop] + "px" : z.el.orig[prop]; // set its height and/or width to auto if ( prop == 'height' || prop == 'width' ) jQuery.setAuto( z.el, prop ); // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
y.overflow = z.el.oldOverflow; if ( z.o.hide ) y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ? z.el.orig[prop] + "px" : z.el.orig[prop]; if ( prop == 'height' || prop == 'width' ) jQuery.setAuto( z.el, prop ); | if ( p == 'height' || p == 'width' ) jQuery.setAuto( z.el, p ); } } } | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete, step: options.step }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( options.step ) options.step.apply( elem, [ z.now ] ); if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ var r = parseFloat( jQuery.curCSS(z.el, prop) ); return r && r > -10000 ? r : z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function( p ){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.custom( 0, z.el.orig[prop] ); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element if ( !z.el.oldOverlay ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out //if ( z.el.oldOverlay == "visible" ) y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the overflow y.overflow = z.el.oldOverflow; // Reset the property, if the item has been hidden if ( z.o.hide ) y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ? z.el.orig[prop] + "px" : z.el.orig[prop]; // set its height and/or width to auto if ( prop == 'height' || prop == 'width' ) jQuery.setAuto( z.el, prop ); // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
if( z.o.complete && z.o.complete.constructor == Function ) | if( done && z.o.complete && z.o.complete.constructor == Function ) | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete, step: options.step }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( options.step ) options.step.apply( elem, [ z.now ] ); if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ var r = parseFloat( jQuery.curCSS(z.el, prop) ); return r && r > -10000 ? r : z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function( p ){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.custom( 0, z.el.orig[prop] ); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element if ( !z.el.oldOverlay ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out //if ( z.el.oldOverlay == "visible" ) y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the overflow y.overflow = z.el.oldOverflow; // Reset the property, if the item has been hidden if ( z.o.hide ) y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ? z.el.orig[prop] + "px" : z.el.orig[prop]; // set its height and/or width to auto if ( prop == 'height' || prop == 'width' ) jQuery.setAuto( z.el, prop ); // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
$.fx = function(el,op,ty,tz){ | $.fx = function(el,op,ty){ | $.fx = function(el,op,ty,tz){ var z = this; z.el = el.constructor==String?document.getElementById(el):el; var y = z.el.style; z.a = function(){z.el.style[ty]=z.now+z.o.unit;}; z.max = function(){return z.el["io"+ty]||z.cur();}; z.cur = function(){return $.css(z.el,ty);}; z.show = function(){z.ss("block");z.o.auto=true;z.custom(0,z.max());}; z.hide = function(){z.el.$o=$.getCSS(z.el,"overflow");z.el["io"+ty]=this.cur();z.custom(z.cur(),0);}; z.ss = function(a){if(y.display!=a){y.display=a;}}; z.toggle = function(){if(z.cur()>0){z.hide();}else{z.show();}}; z.modify = function(a){z.custom(z.cur(),z.cur()+a);}; z.clear = function(){clearInterval(z.timer);z.timer=null;}; z.oo = y.overflow; y.overflow = "hidden"; z.o = { unit: "px", duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; z.step = function(f,tt){ var t = (new Date()).getTime(); var p = (t - z.s) / z.o.duration; if (t >= z.o.duration+z.s) { z.now = tt; z.clear(); setTimeout(function(){ y.overflow = z.oo; if(y.height=="0px"||y.width=="0px"){z.ss("none");} if ( ty != "opacity" && z.o.auto ) { $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); } if(z.o.onComplete.constructor == Function){z.el.$_ = z.o.onComplete;z.el.$_();} },13); } else { z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (tt-f) + f; } z.a(); }; z.custom = function(f,t){ if(z.timer) {return null;} this.now=f;z.a();z.io=z.cur();z.s=(new Date()).getTime(); z.timer=setInterval(function(){z.step(f,t);}, 13); };}; |
z.el = el.constructor==String?document.getElementById(el):el; var y = z.el.style; z.a = function(){z.el.style[ty]=z.now+z.o.unit;}; z.max = function(){return z.el["io"+ty]||z.cur();}; z.cur = function(){return $.css(z.el,ty);}; z.show = function(){z.ss("block");z.o.auto=true;z.custom(0,z.max());}; z.hide = function(){z.el.$o=$.getCSS(z.el,"overflow");z.el["io"+ty]=this.cur();z.custom(z.cur(),0);}; z.ss = function(a){if(y.display!=a){y.display=a;}}; z.toggle = function(){if(z.cur()>0){z.hide();}else{z.show();}}; z.modify = function(a){z.custom(z.cur(),z.cur()+a);}; z.clear = function(){clearInterval(z.timer);z.timer=null;}; z.oo = y.overflow; y.overflow = "hidden"; | $.fx = function(el,op,ty,tz){ var z = this; z.el = el.constructor==String?document.getElementById(el):el; var y = z.el.style; z.a = function(){z.el.style[ty]=z.now+z.o.unit;}; z.max = function(){return z.el["io"+ty]||z.cur();}; z.cur = function(){return $.css(z.el,ty);}; z.show = function(){z.ss("block");z.o.auto=true;z.custom(0,z.max());}; z.hide = function(){z.el.$o=$.getCSS(z.el,"overflow");z.el["io"+ty]=this.cur();z.custom(z.cur(),0);}; z.ss = function(a){if(y.display!=a){y.display=a;}}; z.toggle = function(){if(z.cur()>0){z.hide();}else{z.show();}}; z.modify = function(a){z.custom(z.cur(),z.cur()+a);}; z.clear = function(){clearInterval(z.timer);z.timer=null;}; z.oo = y.overflow; y.overflow = "hidden"; z.o = { unit: "px", duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; z.step = function(f,tt){ var t = (new Date()).getTime(); var p = (t - z.s) / z.o.duration; if (t >= z.o.duration+z.s) { z.now = tt; z.clear(); setTimeout(function(){ y.overflow = z.oo; if(y.height=="0px"||y.width=="0px"){z.ss("none");} if ( ty != "opacity" && z.o.auto ) { $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); } if(z.o.onComplete.constructor == Function){z.el.$_ = z.o.onComplete;z.el.$_();} },13); } else { z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (tt-f) + f; } z.a(); }; z.custom = function(f,t){ if(z.timer) {return null;} this.now=f;z.a();z.io=z.cur();z.s=(new Date()).getTime(); z.timer=setInterval(function(){z.step(f,t);}, 13); };}; |
|
unit: "px", | $.fx = function(el,op,ty,tz){ var z = this; z.el = el.constructor==String?document.getElementById(el):el; var y = z.el.style; z.a = function(){z.el.style[ty]=z.now+z.o.unit;}; z.max = function(){return z.el["io"+ty]||z.cur();}; z.cur = function(){return $.css(z.el,ty);}; z.show = function(){z.ss("block");z.o.auto=true;z.custom(0,z.max());}; z.hide = function(){z.el.$o=$.getCSS(z.el,"overflow");z.el["io"+ty]=this.cur();z.custom(z.cur(),0);}; z.ss = function(a){if(y.display!=a){y.display=a;}}; z.toggle = function(){if(z.cur()>0){z.hide();}else{z.show();}}; z.modify = function(a){z.custom(z.cur(),z.cur()+a);}; z.clear = function(){clearInterval(z.timer);z.timer=null;}; z.oo = y.overflow; y.overflow = "hidden"; z.o = { unit: "px", duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; z.step = function(f,tt){ var t = (new Date()).getTime(); var p = (t - z.s) / z.o.duration; if (t >= z.o.duration+z.s) { z.now = tt; z.clear(); setTimeout(function(){ y.overflow = z.oo; if(y.height=="0px"||y.width=="0px"){z.ss("none");} if ( ty != "opacity" && z.o.auto ) { $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); } if(z.o.onComplete.constructor == Function){z.el.$_ = z.o.onComplete;z.el.$_();} },13); } else { z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (tt-f) + f; } z.a(); }; z.custom = function(f,t){ if(z.timer) {return null;} this.now=f;z.a();z.io=z.cur();z.s=(new Date()).getTime(); z.timer=setInterval(function(){z.step(f,t);}, 13); };}; |
|
z.step = function(f,tt){ | z.el = el; var y = z.el.style; z.a = function(){ z.el.style[ty] = z.now+'px'; }; z.max = function(){return z.el["$$orig"+ty]||z.cur();}; z.cur = function(){return $.css(z.el,ty);}; z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; z.hide = function(){ z.el["$$orig"+ty] = this.cur(); z.custom(z.cur(),0); }; z.toggle = function(){ if ( z.cur() > 0 ) { z.hide(); } else { z.show(); } }; z.oldOverflow = y.overflow; y.overflow = "hidden"; z.step = function(firstNum, lastNum){ | $.fx = function(el,op,ty,tz){ var z = this; z.el = el.constructor==String?document.getElementById(el):el; var y = z.el.style; z.a = function(){z.el.style[ty]=z.now+z.o.unit;}; z.max = function(){return z.el["io"+ty]||z.cur();}; z.cur = function(){return $.css(z.el,ty);}; z.show = function(){z.ss("block");z.o.auto=true;z.custom(0,z.max());}; z.hide = function(){z.el.$o=$.getCSS(z.el,"overflow");z.el["io"+ty]=this.cur();z.custom(z.cur(),0);}; z.ss = function(a){if(y.display!=a){y.display=a;}}; z.toggle = function(){if(z.cur()>0){z.hide();}else{z.show();}}; z.modify = function(a){z.custom(z.cur(),z.cur()+a);}; z.clear = function(){clearInterval(z.timer);z.timer=null;}; z.oo = y.overflow; y.overflow = "hidden"; z.o = { unit: "px", duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; z.step = function(f,tt){ var t = (new Date()).getTime(); var p = (t - z.s) / z.o.duration; if (t >= z.o.duration+z.s) { z.now = tt; z.clear(); setTimeout(function(){ y.overflow = z.oo; if(y.height=="0px"||y.width=="0px"){z.ss("none");} if ( ty != "opacity" && z.o.auto ) { $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); } if(z.o.onComplete.constructor == Function){z.el.$_ = z.o.onComplete;z.el.$_();} },13); } else { z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (tt-f) + f; } z.a(); }; z.custom = function(f,t){ if(z.timer) {return null;} this.now=f;z.a();z.io=z.cur();z.s=(new Date()).getTime(); z.timer=setInterval(function(){z.step(f,t);}, 13); };}; |
var p = (t - z.s) / z.o.duration; if (t >= z.o.duration+z.s) { z.now = tt; z.clear(); setTimeout(function(){ y.overflow = z.oo; if(y.height=="0px"||y.width=="0px"){z.ss("none");} if ( ty != "opacity" && z.o.auto ) { $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); } if(z.o.onComplete.constructor == Function){z.el.$_ = z.o.onComplete;z.el.$_();} },13); | if (t > z.o.duration + z.startTime) { clearInterval(z.timer); z.timer = null; y.overflow = z.oldOverflow; if( y.height == "0px" || y.width == "0px" ) { y.display = "none"; } if ( ty != "opacity" && z.o.auto ) { $.setAuto( z.el, 'height' ); $.setAuto( z.el, 'width' ); } if( z.o.onComplete.constructor == Function ) { $.apply( z.el, z.onComplete ); } | $.fx = function(el,op,ty,tz){ var z = this; z.el = el.constructor==String?document.getElementById(el):el; var y = z.el.style; z.a = function(){z.el.style[ty]=z.now+z.o.unit;}; z.max = function(){return z.el["io"+ty]||z.cur();}; z.cur = function(){return $.css(z.el,ty);}; z.show = function(){z.ss("block");z.o.auto=true;z.custom(0,z.max());}; z.hide = function(){z.el.$o=$.getCSS(z.el,"overflow");z.el["io"+ty]=this.cur();z.custom(z.cur(),0);}; z.ss = function(a){if(y.display!=a){y.display=a;}}; z.toggle = function(){if(z.cur()>0){z.hide();}else{z.show();}}; z.modify = function(a){z.custom(z.cur(),z.cur()+a);}; z.clear = function(){clearInterval(z.timer);z.timer=null;}; z.oo = y.overflow; y.overflow = "hidden"; z.o = { unit: "px", duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; z.step = function(f,tt){ var t = (new Date()).getTime(); var p = (t - z.s) / z.o.duration; if (t >= z.o.duration+z.s) { z.now = tt; z.clear(); setTimeout(function(){ y.overflow = z.oo; if(y.height=="0px"||y.width=="0px"){z.ss("none");} if ( ty != "opacity" && z.o.auto ) { $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); } if(z.o.onComplete.constructor == Function){z.el.$_ = z.o.onComplete;z.el.$_();} },13); } else { z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (tt-f) + f; } z.a(); }; z.custom = function(f,t){ if(z.timer) {return null;} this.now=f;z.a();z.io=z.cur();z.s=(new Date()).getTime(); z.timer=setInterval(function(){z.step(f,t);}, 13); };}; |
z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (tt-f) + f; | var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; z.a(); | $.fx = function(el,op,ty,tz){ var z = this; z.el = el.constructor==String?document.getElementById(el):el; var y = z.el.style; z.a = function(){z.el.style[ty]=z.now+z.o.unit;}; z.max = function(){return z.el["io"+ty]||z.cur();}; z.cur = function(){return $.css(z.el,ty);}; z.show = function(){z.ss("block");z.o.auto=true;z.custom(0,z.max());}; z.hide = function(){z.el.$o=$.getCSS(z.el,"overflow");z.el["io"+ty]=this.cur();z.custom(z.cur(),0);}; z.ss = function(a){if(y.display!=a){y.display=a;}}; z.toggle = function(){if(z.cur()>0){z.hide();}else{z.show();}}; z.modify = function(a){z.custom(z.cur(),z.cur()+a);}; z.clear = function(){clearInterval(z.timer);z.timer=null;}; z.oo = y.overflow; y.overflow = "hidden"; z.o = { unit: "px", duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; z.step = function(f,tt){ var t = (new Date()).getTime(); var p = (t - z.s) / z.o.duration; if (t >= z.o.duration+z.s) { z.now = tt; z.clear(); setTimeout(function(){ y.overflow = z.oo; if(y.height=="0px"||y.width=="0px"){z.ss("none");} if ( ty != "opacity" && z.o.auto ) { $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); } if(z.o.onComplete.constructor == Function){z.el.$_ = z.o.onComplete;z.el.$_();} },13); } else { z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (tt-f) + f; } z.a(); }; z.custom = function(f,t){ if(z.timer) {return null;} this.now=f;z.a();z.io=z.cur();z.s=(new Date()).getTime(); z.timer=setInterval(function(){z.step(f,t);}, 13); };}; |
z.a(); | $.fx = function(el,op,ty,tz){ var z = this; z.el = el.constructor==String?document.getElementById(el):el; var y = z.el.style; z.a = function(){z.el.style[ty]=z.now+z.o.unit;}; z.max = function(){return z.el["io"+ty]||z.cur();}; z.cur = function(){return $.css(z.el,ty);}; z.show = function(){z.ss("block");z.o.auto=true;z.custom(0,z.max());}; z.hide = function(){z.el.$o=$.getCSS(z.el,"overflow");z.el["io"+ty]=this.cur();z.custom(z.cur(),0);}; z.ss = function(a){if(y.display!=a){y.display=a;}}; z.toggle = function(){if(z.cur()>0){z.hide();}else{z.show();}}; z.modify = function(a){z.custom(z.cur(),z.cur()+a);}; z.clear = function(){clearInterval(z.timer);z.timer=null;}; z.oo = y.overflow; y.overflow = "hidden"; z.o = { unit: "px", duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; z.step = function(f,tt){ var t = (new Date()).getTime(); var p = (t - z.s) / z.o.duration; if (t >= z.o.duration+z.s) { z.now = tt; z.clear(); setTimeout(function(){ y.overflow = z.oo; if(y.height=="0px"||y.width=="0px"){z.ss("none");} if ( ty != "opacity" && z.o.auto ) { $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); } if(z.o.onComplete.constructor == Function){z.el.$_ = z.o.onComplete;z.el.$_();} },13); } else { z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (tt-f) + f; } z.a(); }; z.custom = function(f,t){ if(z.timer) {return null;} this.now=f;z.a();z.io=z.cur();z.s=(new Date()).getTime(); z.timer=setInterval(function(){z.step(f,t);}, 13); };}; |
|
z.custom = function(f,t){ if(z.timer) {return null;} this.now=f;z.a();z.io=z.cur();z.s=(new Date()).getTime(); z.timer=setInterval(function(){z.step(f,t);}, 13); }; | $.fx = function(el,op,ty,tz){ var z = this; z.el = el.constructor==String?document.getElementById(el):el; var y = z.el.style; z.a = function(){z.el.style[ty]=z.now+z.o.unit;}; z.max = function(){return z.el["io"+ty]||z.cur();}; z.cur = function(){return $.css(z.el,ty);}; z.show = function(){z.ss("block");z.o.auto=true;z.custom(0,z.max());}; z.hide = function(){z.el.$o=$.getCSS(z.el,"overflow");z.el["io"+ty]=this.cur();z.custom(z.cur(),0);}; z.ss = function(a){if(y.display!=a){y.display=a;}}; z.toggle = function(){if(z.cur()>0){z.hide();}else{z.show();}}; z.modify = function(a){z.custom(z.cur(),z.cur()+a);}; z.clear = function(){clearInterval(z.timer);z.timer=null;}; z.oo = y.overflow; y.overflow = "hidden"; z.o = { unit: "px", duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; z.step = function(f,tt){ var t = (new Date()).getTime(); var p = (t - z.s) / z.o.duration; if (t >= z.o.duration+z.s) { z.now = tt; z.clear(); setTimeout(function(){ y.overflow = z.oo; if(y.height=="0px"||y.width=="0px"){z.ss("none");} if ( ty != "opacity" && z.o.auto ) { $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); } if(z.o.onComplete.constructor == Function){z.el.$_ = z.o.onComplete;z.el.$_();} },13); } else { z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (tt-f) + f; } z.a(); }; z.custom = function(f,t){ if(z.timer) {return null;} this.now=f;z.a();z.io=z.cur();z.s=(new Date()).getTime(); z.timer=setInterval(function(){z.step(f,t);}, 13); };}; |
|
jQuery.fx = function( elem, options, prop ){ var z = this; z.o = { duration: options.duration || 400, complete: options.complete }; z.el = elem; var y = z.el.style; z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; y.opacity = z.now; } else y[prop] = z.now+"px"; }; z.max = function(){ return z.el["orig"+prop] || z.cur(); }; z.cur = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; z.hide = function(){ z.el["orig"+prop] = this.cur(); z.custom(z.cur(),0); }; if ( jQuery.browser == "msie" && !z.el.currentStyle.hasLayout ) y.zoom = 1; z.oldOverflow = y.overflow; y.overflow = "hidden"; z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { clearInterval(z.timer); z.timer = null; z.now = lastNum; | fx: function( elem, options, prop ){ var z = this; z.o = { duration: options.duration || 400, complete: options.complete }; z.el = elem; var y = z.el.style; z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; y.opacity = z.now; } else y[prop] = z.now+"px"; }; z.max = function(){ return z.el["orig"+prop] || z.cur(); }; z.cur = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; | jQuery.fx = function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; y.opacity = z.now; } else y[prop] = z.now+"px"; }; // Figure out the maximum number to run to z.max = function(){ return z.el["orig"+prop] || z.cur(); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["orig"+prop] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it doesn't have layout if ( jQuery.browser == "msie" && !z.el.currentStyle.hasLayout ) y.zoom = 1; // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (prop == "height" || prop == "width") && z.o.auto ) jQuery.setAuto( z.el, prop ); // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) y.display = "none"; // Execute the complete function z.o.complete.apply( z.el ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } };}; |
y.overflow = z.oldOverflow; if ( (prop == "height" || prop == "width") && z.o.auto ) jQuery.setAuto( z.el, prop ); if( z.o.complete && z.o.complete.constructor == Function ) { if ( y.height == "0px" || y.width == "0px" ) y.display = "none"; z.o.complete.apply( z.el ); | z.timer = setInterval(function(){ z.step(from, to); }, 13); }; z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; z.hide = function(){ z.el["orig"+prop] = this.cur(); z.custom(z.cur(),0); }; if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = 1; z.oldOverflow = y.overflow; y.overflow = "hidden"; z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); y.overflow = z.oldOverflow; if ( (prop == "height" || prop == "width") && z.o.auto ) jQuery.setAuto( z.el, prop ); if( z.o.complete && z.o.complete.constructor == Function ) { if ( y.height == "0px" || y.width == "0px" ) y.display = "none"; z.o.complete.apply( z.el ); } } else { var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; z.a(); | jQuery.fx = function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; y.opacity = z.now; } else y[prop] = z.now+"px"; }; // Figure out the maximum number to run to z.max = function(){ return z.el["orig"+prop] || z.cur(); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["orig"+prop] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it doesn't have layout if ( jQuery.browser == "msie" && !z.el.currentStyle.hasLayout ) y.zoom = 1; // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (prop == "height" || prop == "width") && z.o.auto ) jQuery.setAuto( z.el, prop ); // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) y.display = "none"; // Execute the complete function z.o.complete.apply( z.el ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } };}; |
} else { var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; z.a(); } }; }; | }; } | jQuery.fx = function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; y.opacity = z.now; } else y[prop] = z.now+"px"; }; // Figure out the maximum number to run to z.max = function(){ return z.el["orig"+prop] || z.cur(); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["orig"+prop] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it doesn't have layout if ( jQuery.browser == "msie" && !z.el.currentStyle.hasLayout ) y.zoom = 1; // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (prop == "height" || prop == "width") && z.o.auto ) jQuery.setAuto( z.el, prop ); // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) y.display = "none"; // Execute the complete function z.o.complete.apply( z.el ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } };}; |
jQuery.setAuto( z.el, prop ); | if ( prop == 'height' || prop == 'width' ) jQuery.setAuto( z.el, prop ); | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete, step: options.step }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( options.step ) options.step.apply( elem, [ z.now ] ); if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.curCSS(z.el, prop) ) || z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function( p ){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.custom( 0, z.el.orig[prop] ); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element if ( !z.el.oldOverlay ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out //if ( z.el.oldOverlay == "visible" ) y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the overflow y.overflow = z.el.oldOverflow; // Reset the property, if the item has been hidden if ( z.o.hide ) y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ? z.el.orig[prop] + "px" : z.el.orig[prop]; // set its height and/or width to auto jQuery.setAuto( z.el, prop ); // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
z.show = function(){ | z.show = function( p ){ | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.curCSS(z.el, prop) ) || z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); if ( !y[prop] ) z.o.auto = true; z.custom(0,z.max()); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; y.display = "block"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the overflow y.overflow = z.oldOverflow; // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); // Reset the property, if the item has been hidden if ( z.o.hide ) y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ? z.el.orig[prop] + "px" : z.el.orig[prop]; // set its height and/or width to auto jQuery.setAuto( z.el, prop ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
if ( !y[prop] ) z.o.auto = true; z.custom(0,z.max()); | z.custom( 0, z.el.orig[prop] ); | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.curCSS(z.el, prop) ) || z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); if ( !y[prop] ) z.o.auto = true; z.custom(0,z.max()); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; y.display = "block"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the overflow y.overflow = z.oldOverflow; // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); // Reset the property, if the item has been hidden if ( z.o.hide ) y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ? z.el.orig[prop] + "px" : z.el.orig[prop]; // set its height and/or width to auto jQuery.setAuto( z.el, prop ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
y.display = "block"; | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.curCSS(z.el, prop) ) || z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); if ( !y[prop] ) z.o.auto = true; z.custom(0,z.max()); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; y.display = "block"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the overflow y.overflow = z.oldOverflow; // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); // Reset the property, if the item has been hidden if ( z.o.hide ) y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ? z.el.orig[prop] + "px" : z.el.orig[prop]; // set its height and/or width to auto jQuery.setAuto( z.el, prop ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
|
z.oldOverflow = y.overflow; | if ( !z.el.oldOverlay ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.curCSS(z.el, prop) ) || z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); if ( !y[prop] ) z.o.auto = true; z.custom(0,z.max()); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; y.display = "block"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the overflow y.overflow = z.oldOverflow; // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); // Reset the property, if the item has been hidden if ( z.o.hide ) y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ? z.el.orig[prop] + "px" : z.el.orig[prop]; // set its height and/or width to auto jQuery.setAuto( z.el, prop ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
y.overflow = "hidden"; | if ( z.el.oldOverlay == "visible" ) y.overflow = "hidden"; | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.curCSS(z.el, prop) ) || z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); if ( !y[prop] ) z.o.auto = true; z.custom(0,z.max()); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; y.display = "block"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the overflow y.overflow = z.oldOverflow; // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); // Reset the property, if the item has been hidden if ( z.o.hide ) y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ? z.el.orig[prop] + "px" : z.el.orig[prop]; // set its height and/or width to auto jQuery.setAuto( z.el, prop ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
y.overflow = z.oldOverflow; | y.overflow = z.el.oldOverflow; | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ return parseFloat( jQuery.curCSS(z.el, prop) ) || z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); if ( !y[prop] ) z.o.auto = true; z.custom(0,z.max()); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; y.display = "block"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.cur(),0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the overflow y.overflow = z.oldOverflow; // If a callback was provided, execute it if( z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); // Reset the property, if the item has been hidden if ( z.o.hide ) y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ? z.el.orig[prop] + "px" : z.el.orig[prop]; // set its height and/or width to auto jQuery.setAuto( z.el, prop ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
$.fx = function(el,op,ty){ | $.fx = function( elem, options, prop ){ | $.fx = function(el,op,ty){ var z = this; // The users options z.o = { duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; // The element z.el = el; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ z.el.style[ty] = z.now+'px'; }; // Figure out the maximum number to run to z.max = function(){return z.el["$$orig"+ty]||z.cur();}; // Get the current size z.cur = function(){return $.css(z.el,ty);}; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["$$orig"+ty] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // Toggle between showing and hiding an element z.toggle = function(){ if ( z.cur() > 0 ) { z.hide(); } else { z.show(); } }; // IE has trouble with opacity if it doesn't have layout if ( $.browser == "msie" && !z.el.currentStyle.hasLayout ) { y.zoom = 1; } // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (ty == "height" || ty == "width") && z.o.auto ) { $.setAuto( z.el, ty ); } // If a callback was provided, execute it if( z.o.onComplete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) { y.display = "none"; } $.apply( z.el, z.o.onComplete ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } };}; |
duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op | duration: options.duration || 400, complete: options.complete | $.fx = function(el,op,ty){ var z = this; // The users options z.o = { duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; // The element z.el = el; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ z.el.style[ty] = z.now+'px'; }; // Figure out the maximum number to run to z.max = function(){return z.el["$$orig"+ty]||z.cur();}; // Get the current size z.cur = function(){return $.css(z.el,ty);}; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["$$orig"+ty] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // Toggle between showing and hiding an element z.toggle = function(){ if ( z.cur() > 0 ) { z.hide(); } else { z.show(); } }; // IE has trouble with opacity if it doesn't have layout if ( $.browser == "msie" && !z.el.currentStyle.hasLayout ) { y.zoom = 1; } // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (ty == "height" || ty == "width") && z.o.auto ) { $.setAuto( z.el, ty ); } // If a callback was provided, execute it if( z.o.onComplete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) { y.display = "none"; } $.apply( z.el, z.o.onComplete ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } };}; |
z.el = el; | z.el = elem; | $.fx = function(el,op,ty){ var z = this; // The users options z.o = { duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; // The element z.el = el; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ z.el.style[ty] = z.now+'px'; }; // Figure out the maximum number to run to z.max = function(){return z.el["$$orig"+ty]||z.cur();}; // Get the current size z.cur = function(){return $.css(z.el,ty);}; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["$$orig"+ty] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // Toggle between showing and hiding an element z.toggle = function(){ if ( z.cur() > 0 ) { z.hide(); } else { z.show(); } }; // IE has trouble with opacity if it doesn't have layout if ( $.browser == "msie" && !z.el.currentStyle.hasLayout ) { y.zoom = 1; } // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (ty == "height" || ty == "width") && z.o.auto ) { $.setAuto( z.el, ty ); } // If a callback was provided, execute it if( z.o.onComplete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) { y.display = "none"; } $.apply( z.el, z.o.onComplete ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } };}; |
z.el.style[ty] = z.now+'px'; | if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; y.opacity = z.now; } else y[prop] = z.now+"px"; | $.fx = function(el,op,ty){ var z = this; // The users options z.o = { duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; // The element z.el = el; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ z.el.style[ty] = z.now+'px'; }; // Figure out the maximum number to run to z.max = function(){return z.el["$$orig"+ty]||z.cur();}; // Get the current size z.cur = function(){return $.css(z.el,ty);}; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["$$orig"+ty] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // Toggle between showing and hiding an element z.toggle = function(){ if ( z.cur() > 0 ) { z.hide(); } else { z.show(); } }; // IE has trouble with opacity if it doesn't have layout if ( $.browser == "msie" && !z.el.currentStyle.hasLayout ) { y.zoom = 1; } // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (ty == "height" || ty == "width") && z.o.auto ) { $.setAuto( z.el, ty ); } // If a callback was provided, execute it if( z.o.onComplete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) { y.display = "none"; } $.apply( z.el, z.o.onComplete ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } };}; |
z.max = function(){return z.el["$$orig"+ty]||z.cur();}; | z.max = function(){ return z.el["orig"+prop] || z.cur(); }; | $.fx = function(el,op,ty){ var z = this; // The users options z.o = { duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; // The element z.el = el; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ z.el.style[ty] = z.now+'px'; }; // Figure out the maximum number to run to z.max = function(){return z.el["$$orig"+ty]||z.cur();}; // Get the current size z.cur = function(){return $.css(z.el,ty);}; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["$$orig"+ty] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // Toggle between showing and hiding an element z.toggle = function(){ if ( z.cur() > 0 ) { z.hide(); } else { z.show(); } }; // IE has trouble with opacity if it doesn't have layout if ( $.browser == "msie" && !z.el.currentStyle.hasLayout ) { y.zoom = 1; } // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (ty == "height" || ty == "width") && z.o.auto ) { $.setAuto( z.el, ty ); } // If a callback was provided, execute it if( z.o.onComplete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) { y.display = "none"; } $.apply( z.el, z.o.onComplete ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } };}; |
z.cur = function(){return $.css(z.el,ty);}; | z.cur = function(){ return parseFloat( $.css(z.el,prop) ); }; | $.fx = function(el,op,ty){ var z = this; // The users options z.o = { duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; // The element z.el = el; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ z.el.style[ty] = z.now+'px'; }; // Figure out the maximum number to run to z.max = function(){return z.el["$$orig"+ty]||z.cur();}; // Get the current size z.cur = function(){return $.css(z.el,ty);}; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["$$orig"+ty] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // Toggle between showing and hiding an element z.toggle = function(){ if ( z.cur() > 0 ) { z.hide(); } else { z.show(); } }; // IE has trouble with opacity if it doesn't have layout if ( $.browser == "msie" && !z.el.currentStyle.hasLayout ) { y.zoom = 1; } // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (ty == "height" || ty == "width") && z.o.auto ) { $.setAuto( z.el, ty ); } // If a callback was provided, execute it if( z.o.onComplete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) { y.display = "none"; } $.apply( z.el, z.o.onComplete ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } };}; |
z.el["$$orig"+ty] = this.cur(); | z.el["orig"+prop] = this.cur(); | $.fx = function(el,op,ty){ var z = this; // The users options z.o = { duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; // The element z.el = el; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ z.el.style[ty] = z.now+'px'; }; // Figure out the maximum number to run to z.max = function(){return z.el["$$orig"+ty]||z.cur();}; // Get the current size z.cur = function(){return $.css(z.el,ty);}; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["$$orig"+ty] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // Toggle between showing and hiding an element z.toggle = function(){ if ( z.cur() > 0 ) { z.hide(); } else { z.show(); } }; // IE has trouble with opacity if it doesn't have layout if ( $.browser == "msie" && !z.el.currentStyle.hasLayout ) { y.zoom = 1; } // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (ty == "height" || ty == "width") && z.o.auto ) { $.setAuto( z.el, ty ); } // If a callback was provided, execute it if( z.o.onComplete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) { y.display = "none"; } $.apply( z.el, z.o.onComplete ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } };}; |
z.toggle = function(){ if ( z.cur() > 0 ) { z.hide(); } else { z.show(); } }; | $.fx = function(el,op,ty){ var z = this; // The users options z.o = { duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; // The element z.el = el; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ z.el.style[ty] = z.now+'px'; }; // Figure out the maximum number to run to z.max = function(){return z.el["$$orig"+ty]||z.cur();}; // Get the current size z.cur = function(){return $.css(z.el,ty);}; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["$$orig"+ty] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // Toggle between showing and hiding an element z.toggle = function(){ if ( z.cur() > 0 ) { z.hide(); } else { z.show(); } }; // IE has trouble with opacity if it doesn't have layout if ( $.browser == "msie" && !z.el.currentStyle.hasLayout ) { y.zoom = 1; } // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (ty == "height" || ty == "width") && z.o.auto ) { $.setAuto( z.el, ty ); } // If a callback was provided, execute it if( z.o.onComplete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) { y.display = "none"; } $.apply( z.el, z.o.onComplete ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } };}; |
|
if ( $.browser == "msie" && !z.el.currentStyle.hasLayout ) { | if ( $.browser == "msie" && !z.el.currentStyle.hasLayout ) | $.fx = function(el,op,ty){ var z = this; // The users options z.o = { duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; // The element z.el = el; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ z.el.style[ty] = z.now+'px'; }; // Figure out the maximum number to run to z.max = function(){return z.el["$$orig"+ty]||z.cur();}; // Get the current size z.cur = function(){return $.css(z.el,ty);}; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["$$orig"+ty] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // Toggle between showing and hiding an element z.toggle = function(){ if ( z.cur() > 0 ) { z.hide(); } else { z.show(); } }; // IE has trouble with opacity if it doesn't have layout if ( $.browser == "msie" && !z.el.currentStyle.hasLayout ) { y.zoom = 1; } // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (ty == "height" || ty == "width") && z.o.auto ) { $.setAuto( z.el, ty ); } // If a callback was provided, execute it if( z.o.onComplete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) { y.display = "none"; } $.apply( z.el, z.o.onComplete ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } };}; |
} | $.fx = function(el,op,ty){ var z = this; // The users options z.o = { duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; // The element z.el = el; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ z.el.style[ty] = z.now+'px'; }; // Figure out the maximum number to run to z.max = function(){return z.el["$$orig"+ty]||z.cur();}; // Get the current size z.cur = function(){return $.css(z.el,ty);}; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["$$orig"+ty] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // Toggle between showing and hiding an element z.toggle = function(){ if ( z.cur() > 0 ) { z.hide(); } else { z.show(); } }; // IE has trouble with opacity if it doesn't have layout if ( $.browser == "msie" && !z.el.currentStyle.hasLayout ) { y.zoom = 1; } // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (ty == "height" || ty == "width") && z.o.auto ) { $.setAuto( z.el, ty ); } // If a callback was provided, execute it if( z.o.onComplete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) { y.display = "none"; } $.apply( z.el, z.o.onComplete ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } };}; |
|
if ( (ty == "height" || ty == "width") && z.o.auto ) { $.setAuto( z.el, ty ); } | if ( (prop == "height" || prop == "width") && z.o.auto ) $.setAuto( z.el, prop ); | $.fx = function(el,op,ty){ var z = this; // The users options z.o = { duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; // The element z.el = el; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ z.el.style[ty] = z.now+'px'; }; // Figure out the maximum number to run to z.max = function(){return z.el["$$orig"+ty]||z.cur();}; // Get the current size z.cur = function(){return $.css(z.el,ty);}; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["$$orig"+ty] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // Toggle between showing and hiding an element z.toggle = function(){ if ( z.cur() > 0 ) { z.hide(); } else { z.show(); } }; // IE has trouble with opacity if it doesn't have layout if ( $.browser == "msie" && !z.el.currentStyle.hasLayout ) { y.zoom = 1; } // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (ty == "height" || ty == "width") && z.o.auto ) { $.setAuto( z.el, ty ); } // If a callback was provided, execute it if( z.o.onComplete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) { y.display = "none"; } $.apply( z.el, z.o.onComplete ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } };}; |
if( z.o.onComplete.constructor == Function ) { | if( z.o.complete.constructor == Function ) { | $.fx = function(el,op,ty){ var z = this; // The users options z.o = { duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; // The element z.el = el; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ z.el.style[ty] = z.now+'px'; }; // Figure out the maximum number to run to z.max = function(){return z.el["$$orig"+ty]||z.cur();}; // Get the current size z.cur = function(){return $.css(z.el,ty);}; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["$$orig"+ty] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // Toggle between showing and hiding an element z.toggle = function(){ if ( z.cur() > 0 ) { z.hide(); } else { z.show(); } }; // IE has trouble with opacity if it doesn't have layout if ( $.browser == "msie" && !z.el.currentStyle.hasLayout ) { y.zoom = 1; } // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (ty == "height" || ty == "width") && z.o.auto ) { $.setAuto( z.el, ty ); } // If a callback was provided, execute it if( z.o.onComplete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) { y.display = "none"; } $.apply( z.el, z.o.onComplete ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } };}; |
if ( y.height == "0px" || y.width == "0px" ) { | if ( y.height == "0px" || y.width == "0px" ) | $.fx = function(el,op,ty){ var z = this; // The users options z.o = { duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; // The element z.el = el; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ z.el.style[ty] = z.now+'px'; }; // Figure out the maximum number to run to z.max = function(){return z.el["$$orig"+ty]||z.cur();}; // Get the current size z.cur = function(){return $.css(z.el,ty);}; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["$$orig"+ty] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // Toggle between showing and hiding an element z.toggle = function(){ if ( z.cur() > 0 ) { z.hide(); } else { z.show(); } }; // IE has trouble with opacity if it doesn't have layout if ( $.browser == "msie" && !z.el.currentStyle.hasLayout ) { y.zoom = 1; } // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (ty == "height" || ty == "width") && z.o.auto ) { $.setAuto( z.el, ty ); } // If a callback was provided, execute it if( z.o.onComplete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) { y.display = "none"; } $.apply( z.el, z.o.onComplete ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } };}; |
$.apply( z.el, z.o.onComplete ); | z.o.complete.apply( z.el ); | $.fx = function(el,op,ty){ var z = this; // The users options z.o = { duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; // The element z.el = el; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ z.el.style[ty] = z.now+'px'; }; // Figure out the maximum number to run to z.max = function(){return z.el["$$orig"+ty]||z.cur();}; // Get the current size z.cur = function(){return $.css(z.el,ty);}; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ y.display = "block"; z.o.auto = true; z.custom(0,z.max()); }; // Simple 'hide' function z.hide = function(){ // Remember where we started, so that we can go back to it later z.el["$$orig"+ty] = this.cur(); // Begin the animation z.custom(z.cur(),0); }; // Toggle between showing and hiding an element z.toggle = function(){ if ( z.cur() > 0 ) { z.hide(); } else { z.show(); } }; // IE has trouble with opacity if it doesn't have layout if ( $.browser == "msie" && !z.el.currentStyle.hasLayout ) { y.zoom = 1; } // Remember the overflow of the element z.oldOverflow = y.overflow; // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); // Reset the overflow y.overflow = z.oldOverflow; // If the element was shown, and not using a custom number, // set its height and/or width to auto if ( (ty == "height" || ty == "width") && z.o.auto ) { $.setAuto( z.el, ty ); } // If a callback was provided, execute it if( z.o.onComplete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects. // If the element is, effectively, hidden - hide it if ( y.height == "0px" || y.width == "0px" ) { y.display = "none"; } $.apply( z.el, z.o.onComplete ); } } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } };}; |
if ( !z.el.oldOverlay ) | if ( !z.el.oldOverflow ) | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete, step: options.step }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( options.step ) options.step.apply( elem, [ z.now ] ); if ( prop == "opacity" ) jQuery.attr(y, "opacity", z.now); // Let attr handle opacity else if ( parseInt(z.now) ) // My hate for IE will never die y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ var r = parseFloat( jQuery.curCSS(z.el, prop) ); return r && r > -10000 ? r : z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); var start = z.el.orig[prop]; // Begin the animation z.custom(0, z.el.orig[prop]); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.el.orig[prop], 0); }; // Remember the overflow of the element if ( !z.el.oldOverlay ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); z.el.curAnim[ prop ] = true; var done = true; for ( var i in z.el.curAnim ) if ( z.el.curAnim[i] !== true ) done = false; if ( done ) { // Reset the overflow y.overflow = z.el.oldOverflow; // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the property, if the item has been hidden if ( z.o.hide ) { for ( var p in z.el.curAnim ) { if (p == "opacity") jQuery.attr(y, p, z.el.orig[p]); else y[ p ] = z.el.orig[p] + "px"; // set its height and/or width to auto if ( p == 'height' || p == 'width' ) jQuery.setAuto( z.el, p ); } } } // If a callback was provided, execute it if( done && z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
z.max = function(){return z.el["io"+ty]||z.el["natural"+tz]||z.el["scroll"+tz]||z.cur();}; z.cur = function(){return parseInt($.getCSS(z.el,ty),10);}; | z.max = function(){return z.el["io"+ty]||z.cur();}; z.cur = function(){return $.css(z.el,ty);}; | $.fx = function(el,op,ty,tz){ var z = this; z.el = el.constructor==String?document.getElementById(el):el; var y = z.el.style; z.a = function(){z.el.style[ty]=z.now+z.o.unit;}; z.max = function(){return z.el["io"+ty]||z.el["natural"+tz]||z.el["scroll"+tz]||z.cur();}; z.cur = function(){return parseInt($.getCSS(z.el,ty),10);}; z.show = function(){z.ss("block");z.o.auto=true;z.custom(0,z.max());}; z.hide = function(){z.el.$o=$.getCSS(z.el,"overflow");z.el["io"+ty]=this.cur();z.custom(z.cur(),0);}; z.ss = function(a){if(y.display!=a){y.display=a;}}; z.toggle = function(){if(z.cur()>0){z.hide();}else{z.show();}}; z.modify = function(a){z.custom(z.cur(),z.cur()+a);}; z.clear = function(){clearInterval(z.timer);z.timer=null;}; z.oo = y.overflow; y.overflow = "hidden"; z.o = { unit: "px", duration: (op && op.duration) || 400, onComplete: (op && op.onComplete) || op }; z.step = function(f,tt){ var t = (new Date()).getTime(); var p = (t - z.s) / z.o.duration; if (t >= z.o.duration+z.s) { z.now = tt; z.clear(); setTimeout(function(){ y.overflow = z.oo; if(y.height=="0px"||y.width=="0px"){z.ss("none");} if ( ty != "opacity" && z.o.auto ) { $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); } if(z.o.onComplete.constructor == Function){z.el.$_ = z.o.onComplete;z.el.$_();} },13); } else { z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (tt-f) + f; } z.a(); }; z.custom = function(f,t){ if(z.timer) {return null;} this.now=f;z.a();z.io=z.cur();z.s=(new Date()).getTime(); z.timer=setInterval(function(){z.step(f,t);}, 13); };}; |
if (z.now == 1) z.now = 0.9999; | if (jQuery.browser.mozilla && z.now == 1) z.now = 0.9999; | fx: function( elem, options, prop ){ var z = this; // The users options z.o = { duration: options.duration || 400, complete: options.complete, step: options.step }; // The element z.el = elem; // The styles var y = z.el.style; // Simple function for setting a style value z.a = function(){ if ( options.step ) options.step.apply( elem, [ z.now ] ); if ( prop == "opacity" ) { if (z.now == 1) z.now = 0.9999; if (window.ActiveXObject) y.filter = "alpha(opacity=" + z.now*100 + ")"; else y.opacity = z.now; // My hate for IE will never die } else if ( parseInt(z.now) ) y[prop] = parseInt(z.now) + "px"; y.display = "block"; }; // Figure out the maximum number to run to z.max = function(){ return parseFloat( jQuery.css(z.el,prop) ); }; // Get the current size z.cur = function(){ var r = parseFloat( jQuery.curCSS(z.el, prop) ); return r && r > -10000 ? r : z.max(); }; // Start an animation from one number to another z.custom = function(from,to){ z.startTime = (new Date()).getTime(); z.now = from; z.a(); z.timer = setInterval(function(){ z.step(from, to); }, 13); }; // Simple 'show' function z.show = function( p ){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.custom( 0, z.el.orig[prop] ); // Stupid IE, look what you made me do if ( prop != "opacity" ) y[prop] = "1px"; }; // Simple 'hide' function z.hide = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); z.o.hide = true; // Begin the animation z.custom(z.el.orig[prop], 0); }; // IE has trouble with opacity if it does not have layout if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout ) y.zoom = "1"; // Remember the overflow of the element if ( !z.el.oldOverlay ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out y.overflow = "hidden"; // Each step of an animation z.step = function(firstNum, lastNum){ var t = (new Date()).getTime(); if (t > z.o.duration + z.startTime) { // Stop the timer clearInterval(z.timer); z.timer = null; z.now = lastNum; z.a(); z.el.curAnim[ prop ] = true; var done = true; for ( var i in z.el.curAnim ) if ( z.el.curAnim[i] !== true ) done = false; if ( done ) { // Reset the overflow y.overflow = z.el.oldOverflow; // Hide the element if the "hide" operation was done if ( z.o.hide ) y.display = 'none'; // Reset the property, if the item has been hidden if ( z.o.hide ) { for ( var p in z.el.curAnim ) { y[ p ] = z.el.orig[p] + ( p == "opacity" ? "" : "px" ); // set its height and/or width to auto if ( p == 'height' || p == 'width' ) jQuery.setAuto( z.el, p ); } } } // If a callback was provided, execute it if( done && z.o.complete && z.o.complete.constructor == Function ) // Execute the complete function z.o.complete.apply( z.el ); } else { // Figure out where in the animation we are and set the number var p = (t - this.startTime) / z.o.duration; z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; // Perform the next step of the animation z.a(); } }; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.