Changeset 16541
- Timestamp:
- 19/08/08 16:51:51 (3 months ago)
- Files:
-
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/integrate/main/.project (modified) (1 diff)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/objectstore/main/.project (modified) (1 diff)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/objectstore/main/src/org/intermine/util/StringUtil.java (modified) (2 diffs)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/pathquery/main/.project (modified) (2 diffs)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/pathquery/main/src/org/intermine/pathquery/PathQuery.java (modified) (2 diffs)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/web/main/.project (modified) (1 diff)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/web/main/src/org/intermine/dwr/AjaxServices.java (modified) (6 diffs)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/web/main/src/org/intermine/web/struts/OuterJoinsController.java (modified) (4 diffs)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/web/main/src/org/intermine/web/struts/QueryBuilderChange.java (modified) (1 diff)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/web/main/src/org/intermine/web/struts/QueryBuilderPathsController.java (modified) (3 diffs)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/WEB-INF/classes/InterMineWebApp.properties (modified) (1 diff)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/css/query.css (modified) (1 diff)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/htmlHead.jsp (modified) (1 diff)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/images/join_full.png (added)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/images/join_hollow.png (added)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/js/imdwr.js (modified) (1 diff)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/js/jquery-1.2.6.js (added)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/js/jquery-ui-personalized-1.5.2.min.js (added)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/main.jsp (modified) (1 diff)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/mainBrowserLine.jsp (modified) (1 diff)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/mainConstraint.jsp (modified) (4 diffs)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/mainLogic.jsp (modified) (2 diffs)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/mainPaths.jsp (modified) (5 diffs)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/outerjoins.jsp (modified) (1 diff)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/query.jsp (modified) (1 diff)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/view.jsp (modified) (4 diffs)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webservice/client/main/.project (modified) (1 diff)
- branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webtasks/main/.project (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/mnw21/outerjoins_in_the_webapp_16418/intermine/integrate/main/.project
r11212 r16541 21 21 </arguments> 22 22 </buildCommand> 23 <buildCommand>24 <name>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</name>25 <arguments>26 </arguments>27 </buildCommand>28 23 </buildSpec> 29 24 <natures> 30 25 <nature>org.eclipse.jdt.core.javanature</nature> 31 <nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>32 26 </natures> 33 27 </projectDescription> branches/mnw21/outerjoins_in_the_webapp_16418/intermine/objectstore/main/.project
r11211 r16541 21 21 </arguments> 22 22 </buildCommand> 23 <buildCommand>24 <name>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</name>25 <arguments>26 </arguments>27 </buildCommand>28 23 </buildSpec> 29 24 <natures> 30 25 <nature>org.eclipse.jdt.core.javanature</nature> 31 <nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>32 26 </natures> 33 27 </projectDescription> branches/mnw21/outerjoins_in_the_webapp_16418/intermine/objectstore/main/src/org/intermine/util/StringUtil.java
r16036 r16541 13 13 import java.util.ArrayList; 14 14 import java.util.Collection; 15 import java.util.LinkedHashMap; 15 16 import java.util.List; 17 import java.util.Map; 16 18 import java.util.StringTokenizer; 17 19 import java.util.TreeSet; 20 21 import org.apache.commons.lang.StringUtils; 18 22 19 23 /** … … 436 440 return str.length() == 0; 437 441 } 442 443 /** 444 * Make a Map from the serialized String returned 445 * by jQuery.sortable("serialize") 446 * @param str the String 447 * @return a Map 448 */ 449 public static Map<String, String> serializedSortOrderToMap(String str) { 450 Map returnMap = new LinkedHashMap<String, String>(); 451 String[] strArray = str.split("&"); 452 for (String path: strArray) { 453 returnMap.put(StringUtils.split(path, "[]=")[0], StringUtils.split( 454 path, "[]=")[1]); 455 } 456 return returnMap; 457 } 458 438 459 } branches/mnw21/outerjoins_in_the_webapp_16418/intermine/pathquery/main/.project
r15986 r16541 8 8 <buildCommand> 9 9 <name>org.eclipse.jdt.core.javabuilder</name> 10 <arguments>11 </arguments>12 </buildCommand>13 <buildCommand>14 <name>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</name>15 10 <arguments> 16 11 </arguments> … … 29 24 <natures> 30 25 <nature>org.eclipse.jdt.core.javanature</nature> 31 <nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>32 26 </natures> 33 27 </projectDescription> branches/mnw21/outerjoins_in_the_webapp_16418/intermine/pathquery/main/src/org/intermine/pathquery/PathQuery.java
r16473 r16541 139 139 * @param path a path with the old join style 140 140 */ 141 public voidflipJoinStyle(String path) {141 public String flipJoinStyle(String path) { 142 142 String oldPath = getCorrectJoinStyle(path); 143 143 if (!oldPath.equals(path)) { … … 175 175 origNodes.put(transferNode.getPathString(), transferNode); 176 176 } 177 return newPathString; 177 178 } 178 179 branches/mnw21/outerjoins_in_the_webapp_16418/intermine/web/main/.project
r16034 r16541 11 11 </arguments> 12 12 </buildCommand> 13 <buildCommand>14 <name>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</name>15 <arguments>16 </arguments>17 </buildCommand>18 13 </buildSpec> 19 14 <natures> 20 15 <nature>org.eclipse.jdt.core.javanature</nature> 21 <nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>22 16 </natures> 23 17 </projectDescription> branches/mnw21/outerjoins_in_the_webapp_16418/intermine/web/main/src/org/intermine/dwr/AjaxServices.java
r16405 r16541 18 18 import java.util.Iterator; 19 19 import java.util.LinkedHashMap; 20 import java.util.LinkedList; 20 21 import java.util.List; 21 22 import java.util.Map; … … 25 26 import javax.servlet.ServletContext; 26 27 import javax.servlet.http.HttpServletRequest; 28 import javax.servlet.http.HttpServletResponse; 27 29 import javax.servlet.http.HttpSession; 28 30 … … 31 33 import org.apache.lucene.queryParser.ParseException; 32 34 import org.apache.struts.Globals; 35 import org.apache.struts.action.ActionForm; 36 import org.apache.struts.action.ActionForward; 37 import org.apache.struts.action.ActionMapping; 33 38 import org.apache.struts.util.MessageResources; 34 39 import org.directwebremoting.WebContext; … … 46 51 import org.intermine.objectstore.query.Results; 47 52 import org.intermine.path.Path; 53 import org.intermine.pathquery.OrderBy; 48 54 import org.intermine.pathquery.PathQuery; 55 import org.intermine.util.StringUtil; 49 56 import org.intermine.util.TypeUtil; 50 57 import org.intermine.web.autocompletion.AutoCompleter; … … 84 91 import org.intermine.web.logic.widget.config.TableWidgetConfig; 85 92 import org.intermine.web.logic.widget.config.WidgetConfig; 93 import org.intermine.web.struts.ForwardParameters; 86 94 87 95 … … 1035 1043 } 1036 1044 1045 /** 1046 * AJAX request - reorder view. 1047 */ 1048 public void reorder(String newOrder, String oldOrder) { 1049 HttpSession session = WebContextFactory.get().getSession(); 1050 List<String> newOrderList = new LinkedList<String>(StringUtil 1051 .serializedSortOrderToMap(newOrder).values()); 1052 List<String> oldOrderList = new LinkedList<String>(StringUtil 1053 .serializedSortOrderToMap(oldOrder).values()); 1054 1055 List view = SessionMethods.getEditingView(session); 1056 ArrayList newView = new ArrayList(); 1057 1058 for (int i = 0; i < view.size(); i++) { 1059 String newi = newOrderList.get(i); 1060 int oldi = oldOrderList.indexOf(newi); 1061 newView.add(view.get(oldi)); 1062 } 1063 1064 view.clear(); 1065 view.addAll(newView); 1066 } 1067 1068 /** 1069 * Change a node from outer join to normal and vice-versa. 1070 * 1071 */ 1072 public String setOuterJoin(String pathName) 1073 throws Exception { 1074 HttpSession session = WebContextFactory.get().getSession(); 1075 ServletContext servletContext = session.getServletContext(); 1076 ObjectStore os = (ObjectStore) servletContext.getAttribute(Constants.OBJECTSTORE); 1077 Model model = os.getModel(); 1078 WebConfig webConfig = (WebConfig) servletContext.getAttribute(Constants.WEBCONFIG); 1079 List<Path> view = SessionMethods.getEditingView(session); 1080 List<OrderBy> sortOrder = SessionMethods.getEditingSortOrder(session); 1081 PathQuery query = (PathQuery) session.getAttribute(Constants.QUERY); 1082 1083 query = query.clone(); 1084 1085 String newPathString = query.flipJoinStyle(pathName); 1086 1087 session.setAttribute(Constants.QUERY, query); 1088 1089 return newPathString; 1090 } 1091 1037 1092 } branches/mnw21/outerjoins_in_the_webapp_16418/intermine/web/main/src/org/intermine/web/struts/OuterJoinsController.java
r16473 r16541 13 13 import java.util.Comparator; 14 14 import java.util.HashSet; 15 import java.util.LinkedHashMap; 16 import java.util.LinkedList; 17 import java.util.List; 15 18 import java.util.Map; 16 import java.util.Random;17 19 import java.util.Set; 18 20 import java.util.TreeMap; 19 20 import org.intermine.web.logic.Constants;21 import org.intermine.path.Path;22 import org.intermine.pathquery.PathNode;23 import org.intermine.pathquery.PathQuery;24 21 25 22 import javax.servlet.http.HttpServletRequest; … … 32 29 import org.apache.struts.tiles.ComponentContext; 33 30 import org.apache.struts.tiles.actions.TilesAction; 31 import org.intermine.path.Path; 32 import org.intermine.pathquery.PathNode; 33 import org.intermine.pathquery.PathQuery; 34 import org.intermine.web.logic.Constants; 34 35 35 36 /** … … 40 41 public class OuterJoinsController extends TilesAction 41 42 { 43 44 private static final String INNER_JOIN = "inner_join"; 45 private static final String OUTER_JOIN = "outer_join"; 46 42 47 /** 43 48 * {@inheritDoc} … … 95 100 Set<String> clickableNodes = new HashSet<String>(); 96 101 StringBuffer s = new StringBuffer(); 97 Map<String, PathNode> sortedNodes = new TreeMap(comparator);98 sortedNodes.putAll(q.getNodes());99 for (Map.Entry<String, PathNode> entry : sortedNodes.entrySet()) {102 List<List<PathNode>> rows = new LinkedList<List<PathNode>>(); 103 Map<String, String> linkPaths = new LinkedHashMap<String, String>(); 104 for (Map.Entry<String, PathNode> entry : q.getNodes().entrySet()) { 100 105 if (!entry.getValue().isAttribute()) { 101 106 qNodes.put(entry.getKey(), entry.getValue()); 102 107 PathNode node = entry.getValue(); 103 if (entry.getKey().indexOf('.') == -1 && entry.getKey().indexOf(':') == -1) { 104 s.append(entry.getKey() + "<BR>"); 105 } else if ((!node.isOuterJoin()) && node.isReference() 106 && ((!node.getConstraints().isEmpty()) 107 || constrainedPaths.contains(entry.getKey()))) { 108 s.append(entry.getKey() + "<BR>"); 109 } else if ((!node.isOuterJoin()) && (!viewAndKids.contains(entry.getKey()))) { 110 s.append(entry.getKey() + "<BR>"); 108 // First node 109 if (rows.size() == 0) { 110 List<PathNode> row = new LinkedList<PathNode>(); 111 row.add(node); 112 rows.add(row); 111 113 } else { 112 clickableNodes.add(entry.getKey()); 113 s.append("<A HREF=\"mainChange.do?method=setOuterJoin&path=" 114 + entry.getKey() + "\">" + entry.getKey() + "</A><BR>"); 114 int rowcount = 0; 115 Map<Integer,PathNode> scheduledToAdd = new LinkedHashMap<Integer, PathNode>(); 116 for (List<PathNode> parents : rows) { 117 for (PathNode parent : parents) { 118 if(parent.equals(node.getParent())) { 119 linkPaths.put(node.getPathString().replaceAll(":", "."), node.getParent().getPathString().replaceAll(":", ".")); 120 // Place the node in the next row 121 if(rows.size() <= rowcount) { 122 List<PathNode> row = new LinkedList<PathNode>(); 123 row.add(node); 124 rows.add(row); 125 } else { 126 scheduledToAdd.put(rowcount+1, node); 127 // List<PathNode> row = rows.get(rowcount++); 128 // row.add(node); 129 } 130 } 131 } 132 rowcount++; 133 } 134 for (Integer index : scheduledToAdd.keySet()) { 135 if(rows.size() > index) { 136 rows.get(index).add(scheduledToAdd.get(index)); 137 } else { 138 List<PathNode> row = new LinkedList<PathNode>(); 139 row.add(node); 140 rows.add(row); 141 } 142 } 115 143 } 144 // if (entry.getKey().indexOf('.') == -1 && entry.getKey().indexOf(':') == -1) { 145 // s.append(entry.getKey() + "<BR>"); 146 // } else if ((!node.isOuterJoin()) && node.isReference() 147 // && ((!node.getConstraints().isEmpty()) 148 // || constrainedPaths.contains(entry.getKey()))) { 149 // s.append(entry.getKey() + "<BR>"); 150 // } else { 151 // clickableNodes.add(entry.getKey()); 152 // s.append("<A HREF=\"mainChange.do?method=setOuterJoin&path=" 153 // + entry.getKey() + "\">" + entry.getKey() + "</A><BR>"); 154 // } 155 116 156 } 117 157 } 118 158 159 160 request.setAttribute("rows", rows); 161 request.setAttribute("linkPaths", linkPaths); 162 119 163 request.setAttribute("outerJoinAllNodes", qNodes); 120 164 request.setAttribute("outerJoinClickableNodes", clickableNodes); branches/mnw21/outerjoins_in_the_webapp_16418/intermine/web/main/src/org/intermine/web/struts/QueryBuilderChange.java
r16485 r16541 571 571 572 572 /** 573 * Change a node from outer join to normal and vice-versa.574 *575 * @param mapping The ActionMapping used to select this instance576 * @param form The optional ActionForm bean for this request (if any)577 * @param request The HTTP request we are processing578 * @param response The HTTP response we are creating579 * @return an ActionForward object defining where control goes next580 * @exception Exception if the application business logic throws581 */582 public ActionForward setOuterJoin(ActionMapping mapping,583 @SuppressWarnings("unused") ActionForm form,584 HttpServletRequest request,585 @SuppressWarnings("unused") HttpServletResponse response)586 throws Exception {587 HttpSession session = request.getSession();588 ServletContext servletContext = session.getServletContext();589 ObjectStore os = (ObjectStore) servletContext.getAttribute(Constants.OBJECTSTORE);590 Model model = os.getModel();591 WebConfig webConfig = (WebConfig) servletContext.getAttribute(Constants.WEBCONFIG);592 List<Path> view = SessionMethods.getEditingView(session);593 List<OrderBy> sortOrder = SessionMethods.getEditingSortOrder(session);594 String pathName = request.getParameter("path");595 PathQuery query = (PathQuery) session.getAttribute(Constants.QUERY);596 597 query = query.clone();598 599 query.flipJoinStyle(pathName);600 601 session.setAttribute(Constants.QUERY, query);602 603 return new ForwardParameters(mapping.findForward("query")).addAnchor(pathName).forward();604 }605 606 /**607 573 * AJAX request - expand 608 574 * branches/mnw21/outerjoins_in_the_webapp_16418/intermine/web/main/src/org/intermine/web/struts/QueryBuilderPathsController.java
r15963 r16541 11 11 */ 12 12 13 import java.util.HashSet; 14 import java.util.LinkedHashMap; 15 import java.util.List; 16 import java.util.Map; 17 import java.util.Set; 18 13 19 import javax.servlet.http.HttpServletRequest; 14 20 import javax.servlet.http.HttpServletResponse; … … 20 26 import org.apache.struts.tiles.ComponentContext; 21 27 import org.apache.struts.tiles.actions.TilesAction; 28 import org.intermine.path.Path; 29 import org.intermine.pathquery.PathNode; 22 30 import org.intermine.pathquery.PathQuery; 23 31 import org.intermine.web.logic.Constants; … … 47 55 HttpSession session = request.getSession(); 48 56 PathQuery query = (PathQuery) session.getAttribute(Constants.QUERY); 57 // First merge the query and the view 58 PathQuery q = query.clone(); 59 Map<String, PathNode> qNodes = q.getNodes(); 60 for (Path p : q.getView()) { 61 String path = p.toStringNoConstraints(); 62 if (!qNodes.containsKey(path)) { 63 q.addNode(path); 64 } 65 } 66 67 Set<String> constrainedPaths = new HashSet<String>(); 68 for (Map.Entry<String, PathNode> entry : q.getNodes().entrySet()) { 69 if (entry.getValue().isAttribute()) { 70 PathNode node = entry.getValue(); 71 if (!node.getConstraints().isEmpty()) { 72 constrainedPaths.add(node.getPrefix()); 73 } 74 } 75 } 76 77 Set<String> clickableNodes = new HashSet<String>(); 78 for (Map.Entry<String, PathNode> entry : q.getNodes().entrySet()) { 79 PathNode node = entry.getValue(); 80 if (!entry.getValue().isAttribute()) { 81 if (entry.getKey().indexOf('.') == -1 82 && entry.getKey().indexOf(':') == -1) { 83 } else if ((!node.isOuterJoin()) 84 && node.isReference() 85 && ((!node.getConstraints().isEmpty()) || constrainedPaths 86 .contains(entry.getKey()))) { 87 } else { 88 clickableNodes.add(entry.getKey()); 89 } 90 } 91 } 92 93 request.setAttribute("clickableNodes", clickableNodes); 94 request.setAttribute("qNodes", q.getNodes()); 49 95 request.setAttribute("constraintDisplayValues", MainHelper.makeConstraintDisplayMap(query)); 50 96 } branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/WEB-INF/classes/InterMineWebApp.properties
r16216 r16541 127 127 add summary of fields to the results table or on <img border=0 src=images/show.gif alt=show /> links to add individual \ 128 128 fields to the results. Use <img border=0 src=images/constrain.gif alt=constrain /> links to constrain a value in the query. 129 query.currentquery = Constraints on the current query129 query.currentquery = Query Overview 130 130 query.currentquery.detail = Click on a class name below to view its fields 131 131 query.empty = no fields constrained branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/css/query.css
r12923 r16541 50 50 border: none;} 51 51 52 table.query td.modelbrowse {52 div.modelbrowse { 53 53 border-right: 1px solid #888;} 54 55 /* Outer Joins diagram */ 56 li.block { 57 list-style:none; 58 } 59 60 .block { 61 border: 2px solid #0090DF; 62 background-color: #68BFEF; 63 width: 150px; 64 height: 70px; 65 margin: 10px; 66 } 67 68 .canvas { 69 position: absolute; 70 z-index: -10; 71 } 72 73 .viewTitle { 74 background:#1863B8; 75 color:white; 76 } 77 78 .constraintTitle { 79 background:#B12A2A; 80 color:white; 81 } 82 83 .currentTitle { 84 background:#008000; 85 color:white; 86 } branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/htmlHead.jsp
r15438 r16541 27 27 <link rel="stylesheet" type="text/css" href="<html:rewrite page='/theme/theme.css'/>"/> 28 28 29 <script src="js/jquery-1.2.6.js" type="text/javascript" ></script> 30 <script src="js/jquery-ui-personalized-1.5.2.min.js" type="text/javascript"></script> 31 <script type="text/javascript"> 32 jQuery.noConflict(); 33 </script> 34 29 35 <script type="text/javascript" src="<html:rewrite page='/js/prototype.js'/>"></script> 30 < script type="text/javascript" src="<html:rewrite page='/js/scriptaculous.js'/>"></script>36 <!-- <script type="text/javascript" src="<html:rewrite page='/js/scriptaculous.js'/>"></script> --> 31 37 32 38 <script type="text/javascript" src="<html:rewrite page='/dwr/interface/AjaxServices.js'/>"></script> branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/js/imdwr.js
r16177 r16541 737 737 }); 738 738 } 739 740 function switchJoin(element, pathName) { 741 AjaxServices.setOuterJoin(pathName,function(newPathName){ 742 jQuery(element).attr('onClick','switchJoin(this,\''+newPathName+'\');'); 743 }); 744 if(jQuery(element).attr('src').indexOf('hollow')>-1) { 745 jQuery(element).attr('src','images/join_full.png'); 746 } else { 747 jQuery(element).attr('src','images/join_hollow.png'); 748 } 749 } branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/main.jsp
r16420 r16541 14 14 15 15 <script type="text/javascript" src="js/autocompleter.js"></script> 16 16 17 <link rel="stylesheet" href="css/autocompleter.css" type="text/css" /> 17 18 18 < table class="query" width="100%" cellspacing="0">19 <%--<table class="query" width="100%" cellspacing="0"> 19 20 <tr> 20 <td rowspan="2" valign="top" width="50%" class="modelbrowse"> 21 <tiles:insert page="/mainBrowser.jsp"/> 22 </td> 21 <td rowspan="2" valign="top" width="50%" class="modelbrowse">--%> 22 <div id="mainBrowser" class="modelbrowse" style="float:left;width:50%;margin-right:10px;"><tiles:insert page="/mainBrowser.jsp"/></div> 23 <div id="viewcol" style="margin-left:50%"> 24 <%-- </td> 23 25 24 <td valign="top"> 26 <td valign="top">--%> 25 27 <div id="main-paths"> 26 28 <tiles:insert name="mainPaths.tile"/> 27 29 </div> 28 <tiles:insert page="/mainLogic.jsp"/> 29 </td> 30 </tr> 31 30 <%-- </td> 31 </tr>--%> 32 32 <a name="constraint-editor"></a> 33 <tr>34 <td valign="top"> 33 <%-- <tr> 34 <td valign="top">--%> 35 35 <div id="mainConstraint"> 36 <c:if test="${editingNode != null}">37 36 <tiles:insert name="mainConstraint.tile"/> 38 </c:if>39 37 </div> 40 </td>38 <%-- </td> 41 39 </tr> 42 40 </table> 41 --%> 42 <tiles:get name="view.tile"/> 43 43 44 <tiles:insert name="outerjoins.tile"/> 44 </div> 45 <%--<tiles:insert name="outerjoins.tile"/>--%> 45 46 46 47 <!-- /main.jsp --> branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/mainBrowserLine.jsp
r16473 r16541 68 68 <c:set var="fieldNameClass" value="${fieldNameClass} nullReferenceField"/> 69 69 </c:if> 70 <span class="${fieldNameClass}" >70 <span class="${fieldNameClass}" id="${node.pathString}"> 71 71 <c:out value="${node.fieldName}"/> 72 72 </span> branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/mainConstraint.jsp
r15802 r16541 29 29 swapInputs('bag'); 30 30 } 31 32 jQuery(document).ready(function(){ 33 jQuery(".attributeField").draggable({ 34 opacity: 0.5, 35 revert:true 36 }); 37 38 jQuery("#constraintDrop").droppable({ 39 accept: ".attributeField", 40 activeClass: 'droppable-active', 41 hoverClass: 'droppable-hover', 42 drop: function(ev, ui) { 43 addConstraint(jQuery(ui.draggable).attr('id')); 44 } 45 }); 46 47 jQuery("#viewDrop").droppable({ 48 accept: ".attributeField", 49 activeClass: 'droppable-active', 50 hoverClass: 'droppable-hover', 51 drop: function(ev, ui) { 52 //addConstraint(jQuery(ui.draggable).attr('id')); 53 } 54 }); 55 }); 31 56 </script> 57 <style> 58 .droppable-hover { 59 background-color:#6EFFD5; 60 border:2px solid #000000; 61 } 62 63 .droppable-active { 64 background-color:#67FFAA; 65 border:2px solid #00CC99; 66 } 67 68 #constraintDrop { 69 min-height:100px; 70 } 71 </style> 32 72 33 73 … … 37 77 38 78 <html:form action="/mainAction" styleId="mainForm"> 39 40 79 <html:hidden property="path" value="${editingNode.pathString}"/> 41 80 <html:hidden property="editingConstraintEditable" value="${editingConstraintEditable}"/> … … 51 90 <c:if test="${!editingTemplateConstraint}"> 52 91 53 <div class="heading ">92 <div class="heading constraintTitle"> 54 93 <fmt:message key="query.constrain"/><%--Constraint--%> 55 94 </div> 56 57 <div class="body"> 58 95 96 <div class="body" id="constraintDrop"> 97 <c:choose> 98 <c:when test="${editingNode != null}"> 59 99 <c:if test="${editingConstraintIndex == null && fn:length(QUERY.allConstraints) > 0}"> 60 100 … … 463 503 //--> 464 504 </script> 505 </c:when> 506 <c:otherwise><i>Drag attributes here to constrain them</i></c:otherwise> 507 </c:choose> 465 508 </div> 466 509 467 510 </c:if> 468 469 511 </html:form> 470 512 branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/mainLogic.jsp
r12787 r16541 9 9 10 10 <html:xhtml/> 11 <div class="heading"> 12 <fmt:message key="query.constraintLogic"/> 13 </div> 14 <div class="body"> 11 <div style="margin-top:10px"> 12 <strong><fmt:message key="query.constraintLogic"/>:</strong> 15 13 <c:choose> 16 14 <c:when test="${param.editExpression != null}"> … … 50 48 </c:choose> 51 49 </div> 52 53 50 <!-- /mainLogic.jsp --> branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/mainPaths.jsp
r13116 r16541 24 24 </script> 25 25 26 <div class="heading ">26 <div class="heading currentTitle"> 27 27 <fmt:message key="query.currentquery"/> 28 28 </div> … … 33 33 <br/> 34 34 <c:choose> 35 <c:when test="${empty QUERY.nodes}">35 <c:when test="${empty qNodes}"> 36 36 <div class="smallnote altmessage"><fmt:message key="query.empty"/></div> 37 37 </c:when> 38 38 <c:otherwise> 39 <c:forEach var="entry" items="${ QUERY.nodes}" varStatus="status">39 <c:forEach var="entry" items="${qNodes}" varStatus="status"> 40 40 <div> 41 41 <div style="white-space: nowrap"> 42 <div> 42 <div> 43 43 <c:set var="node" value="${entry.value}"/> 44 44 <c:if test="${node.indentation > 0}"> … … 46 46 47 47 </c:forEach> 48 </c:if> 49 <c:set var="isClickable" value="false"/> 50 <c:forEach items="${clickableNodes}" var="clickable"> 51 <c:if test="${node.pathString == clickable}"> 52 <c:set var="isClickable" value="true"/> 53 </c:if> 54 </c:forEach> 55 <c:if test="${isClickable == 'true'}"> 56 <img src="images/join_hollow.png" alt="Switch join" title="Switch join" style="v-align:bottom;cursor:pointer" onClick="switchJoin(this,'${node.pathString}');"/> 48 57 </c:if> 49 58 <im:viewableSpan path="${node.pathString}" viewPaths="${viewPaths}" test="${!empty node.fieldName}" idPrefix="query"> … … 93 102 <fmt:param value="${node.fieldName}"/> 94 103 </fmt:message> 95 <html:link action="/mainChange?method=removeNode&path=${node.pathString}" 96 title="${removeNodeTitle}"> 97 <img border="0" src="images/cross.gif" width="13" height="13" 98 title="Remove this constraint"/> 99 </html:link> 104 <c:choose> 105 <%-- View only --%> 106 <c:when test="${empty node.constraints}"> 107 <html:link action="/viewChange?method=removeFromView&path=${node.pathString}" 108 title="${removeNodeTitle}"> 109 <img border="0" src="images/cross.gif" width="13" height="13" 110 title="Remove this constraint"/> 111 </html:link> 112 </c:when> 113 <%-- Constraint --%> 114 <c:otherwise> 115 <html:link action="/mainChange?method=removeNode&path=${node.pathString}" 116 title="${removeNodeTitle}"> 117 <img border="0" src="images/cross.gif" width="13" height="13" 118 title="Remove this constraint"/> 119 </html:link> 120 </c:otherwise> 121 </c:choose> 100 122 </c:if> 101 123 <c:if test="${lockedPaths[node.pathString]}"> … … 199 221 </c:otherwise> 200 222 </c:choose> 223 <tiles:insert page="/mainLogic.jsp"/> 201 224 </div> 202 225 branches/mnw21/outerjoins_in_the_webapp_16418/intermine/webapp/main/resources/webapp/outerjoins.jsp
r16420 r16541 2 2 <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> 3 3 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 4 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 5 4 6 <!-- outerjoins.jsp --> 7 <script src="js/jquery.flydom-3.1.1.js" type="text/javascript" ></script> 5 8 6 ${outerJoinText} 9 <script type="text/javascript" charset="utf-8"> 10 function drawLine(node1,node2) { 11 node1 = '#' + node1.replace('\.','\\.'); 12 node2 = '#' + node2.replace('\.','\\.'); 13 //$('.block').bind("mousemove", function(){ 14 // $('#result').html("top:"+$(this).offset({scroll:false}).top+" left:" + +$(this).offset({scroll:false}).left); 15 var x1 = jQuery(node1).offset().left; 16 var y1 = jQuery(node1).offset().top; 17 //alert(x1+" "+y1); 18
