/[drupal]/contributions/modules/popups/popups.js
ViewVC logotype

Diff of /contributions/modules/popups/popups.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.9.8.13, Thu Mar 26 04:43:11 2009 UTC revision 1.9.8.14, Thu Mar 26 17:28:47 2009 UTC
# Line 1  Line 1 
1  // $Id: popups.js,v 1.9.8.11 2009/03/20 00:03:03 starbow Exp $  // $Id: popups.js,v 1.9.8.13 2009/03/26 04:43:11 starbow Exp $
2    
3  /**  /**
4   * Popup Modal Dialog API   * Popup Modal Dialog API
# Line 318  Popups.overrideOptions = function(defaul Line 318  Popups.overrideOptions = function(defaul
318   *   Hash of options associated with these links.   *   Hash of options associated with these links.
319   */   */
320  Popups.attach = function(context, selector, options) {  Popups.attach = function(context, selector, options) {
 //  console.log(options);  
321    $(selector, context).not('.popups-processed').each(function() {    $(selector, context).not('.popups-processed').each(function() {
322      var $element = $(this);      var $element = $(this);
323    
# Line 594  Popups.removeLoading = function() { Line 593  Popups.removeLoading = function() {
593    
594  // Should I fold this function into Popups.pop?  // Should I fold this function into Popups.pop?
595  Popups.removePopup = function(popup) {  Popups.removePopup = function(popup) {
 //  console.log("Popups.removePopup: " + popup);  
596    if (!Popups.isset(popup)) {    if (!Popups.isset(popup)) {
597      popup = Popups.activePopup();      popup = Popups.activePopup();
598    }    }
599    if (popup) {    if (popup) {
 //    console.log('removing '+popup.id);  
600      popup.$popup().remove();      popup.$popup().remove();
601      Popups.popupStack.splice(Popups.popupStack.indexOf(popup), 1); // Remove popup from stack.  Probably should rework into .pop()      Popups.popupStack.splice(Popups.popupStack.indexOf(popup), 1); // Remove popup from stack.  Probably should rework into .pop()
602    }    }
 //  else {  
 //    console.log("Popups.removePopup - there is no popup to remove.");  
 //  }  
603  };  };
604    
605  /**  /**
# Line 751  Popups.addJS = function(js) { Line 745  Popups.addJS = function(js) {
745    
746    // Add new JS settings to the page, needed for #ahah properties to work.    // Add new JS settings to the page, needed for #ahah properties to work.
747    Drupal.settings = js.setting;    Drupal.settings = js.setting;
 //  console.log('js.setting...');  
 //  console.log(js.setting);  
748    
749    for (var i in scripts) {    for (var i in scripts) {
750      var src = scripts[i];      var src = scripts[i];
# Line 840  Popups.openPath = function(element, opti Line 832  Popups.openPath = function(element, opti
832      var returnPath;      var returnPath;
833      if (parent) {      if (parent) {
834        returnPath = parent.path;        returnPath = parent.path;
 //      console.log('Popup parent is ...');  
 //      console.log(parent);  
835      }      }
836      else { // No parent, so bring flow back to original page.      else { // No parent, so bring flow back to original page.
837        returnPath = Popups.originalSettings.popups.originalPath;        returnPath = Popups.originalSettings.popups.originalPath;
838      }      }
839      href = href.replace(/destination=[^;&]*[;&]?/, ''); // Strip out any existing destination param.      href = href.replace(/destination=[^;&]*[;&]?/, ''); // Strip out any existing destination param.
 //    console.log("Hijacking destination to " + returnPath);  
840      params.destination = returnPath; // Set the destination to return to the parent's path.      params.destination = returnPath; // Set the destination to return to the parent's path.
841    }    }
842    
# Line 907  Popups.openPathContent = function(path, Line 896  Popups.openPathContent = function(path,
896    // Set properties on new popup.    // Set properties on new popup.
897    popup.parent = parent;    popup.parent = parent;
898    popup.path = path;    popup.path = path;
 //  console.log("Setting popup " + popup.id + " originalPath to " + path);  
899    popup.options = options;    popup.options = options;
900    popup.element = element;    popup.element = element;
901    

Legend:
Removed from v.1.9.8.13  
changed lines
  Added in v.1.9.8.14

  ViewVC Help
Powered by ViewVC 1.1.2