NIHVIVO-646 Initial setup for autocomplete field in authors form.
Fixed typos in TabFilteringTest class and getTabHierarchy method names.
This commit is contained in:
parent
09473b4531
commit
2ba28a04a5
8 changed files with 49 additions and 9 deletions
|
@ -60,6 +60,46 @@ public class UrlBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum Css {
|
||||||
|
CUSTOM_FORM("/edit/forms/css/customForm.css"),
|
||||||
|
JQUERY_UI("/js/jquery-ui/css/smoothness/jquery-ui-1.8.2.custom.css");
|
||||||
|
|
||||||
|
private final String path;
|
||||||
|
|
||||||
|
Css(String path) {
|
||||||
|
this.path = path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String path() {
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString() {
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum JavaScript {
|
||||||
|
CUSTOM_FORM_UTILS("/js/customFormUtils.js"),
|
||||||
|
JQUERY("/js/jquery.js"),
|
||||||
|
JQUERY_UI("/js/jquery-ui/js/jquery-ui-1.8.2.custom.min.js"),
|
||||||
|
UTILS("/js/utils.js");
|
||||||
|
|
||||||
|
private final String path;
|
||||||
|
|
||||||
|
JavaScript(String path) {
|
||||||
|
this.path = path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String path() {
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString() {
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public UrlBuilder(Portal portal) {
|
public UrlBuilder(Portal portal) {
|
||||||
this.portal = portal;
|
this.portal = portal;
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ public interface TabDao {
|
||||||
|
|
||||||
String getNameForTabId(int tabId);
|
String getNameForTabId(int tabId);
|
||||||
|
|
||||||
List getTabHierarcy(int tabId, int rootTab);
|
List getTabHierarchy(int tabId, int rootTab);
|
||||||
|
|
||||||
int getRootTabId(int portalId);
|
int getRootTabId(int portalId);
|
||||||
|
|
||||||
|
|
|
@ -139,8 +139,8 @@ public class TabDaoFiltering extends BaseFiltering implements TabDao{
|
||||||
|
|
||||||
|
|
||||||
/** note not currently filtered */
|
/** note not currently filtered */
|
||||||
public List getTabHierarcy(int tabId, int rootTab) {
|
public List getTabHierarchy(int tabId, int rootTab) {
|
||||||
return innerDao.getTabHierarcy(tabId, rootTab);
|
return innerDao.getTabHierarchy(tabId, rootTab);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** note not currently filtered */
|
/** note not currently filtered */
|
||||||
|
|
|
@ -461,7 +461,7 @@ public class TabDaoJena extends JenaBaseDao implements TabDao {
|
||||||
* @param rootTab if > 0 prepend as root
|
* @param rootTab if > 0 prepend as root
|
||||||
* @return List of Integer objects
|
* @return List of Integer objects
|
||||||
*/
|
*/
|
||||||
public List getTabHierarcy(int tabId, int rootTab){
|
public List getTabHierarchy(int tabId, int rootTab){
|
||||||
List hier = new LinkedList();
|
List hier = new LinkedList();
|
||||||
hier.add(0,new Integer(tabId));
|
hier.add(0,new Integer(tabId));
|
||||||
int current = tabId;
|
int current = tabId;
|
||||||
|
|
|
@ -34,10 +34,10 @@ public class TabMenu extends MainMenu {
|
||||||
List<Tab> primaryTabs = vreq.getWebappDaoFactory().getTabDao().getPrimaryTabs(portalId);
|
List<Tab> primaryTabs = vreq.getWebappDaoFactory().getTabDao().getPrimaryTabs(portalId);
|
||||||
int tabId = TabWebUtil.getTabIdFromRequest(vreq);
|
int tabId = TabWebUtil.getTabIdFromRequest(vreq);
|
||||||
int rootId = TabWebUtil.getRootTabId(vreq);
|
int rootId = TabWebUtil.getRootTabId(vreq);
|
||||||
List tabLevels = vreq.getWebappDaoFactory().getTabDao().getTabHierarcy(tabId,rootId);
|
List tabLevels = vreq.getWebappDaoFactory().getTabDao().getTabHierarchy(tabId,rootId);
|
||||||
vreq.setAttribute("tabLevels", tabLevels);
|
vreq.setAttribute("tabLevels", tabLevels);
|
||||||
Iterator<Tab> primaryTabIterator = primaryTabs.iterator();
|
Iterator<Tab> primaryTabIterator = primaryTabs.iterator();
|
||||||
Iterator tabLevelIterator = tabLevels.iterator();
|
//Iterator tabLevelIterator = tabLevels.iterator();
|
||||||
Tab tab;
|
Tab tab;
|
||||||
while (primaryTabIterator.hasNext()) {
|
while (primaryTabIterator.hasNext()) {
|
||||||
tab = (Tab) primaryTabIterator.next();
|
tab = (Tab) primaryTabIterator.next();
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class BreadCrumbsUtil {
|
||||||
//get the "RootBreadCrumb" if there is one
|
//get the "RootBreadCrumb" if there is one
|
||||||
ret += getRootBreadCrumb(vreq, separator, portal);
|
ret += getRootBreadCrumb(vreq, separator, portal);
|
||||||
|
|
||||||
List chain = vreq.getWebappDaoFactory().getTabDao().getTabHierarcy(tabId,rootId);
|
List chain = vreq.getWebappDaoFactory().getTabDao().getTabHierarchy(tabId,rootId);
|
||||||
for(int i=0; i<chain.size(); i++){
|
for(int i=0; i<chain.size(); i++){
|
||||||
Integer id = (Integer)chain.get(i);
|
Integer id = (Integer)chain.get(i);
|
||||||
if( rootId == id.intValue() ){
|
if( rootId == id.intValue() ){
|
||||||
|
|
|
@ -185,7 +185,7 @@ public class TabMenu {
|
||||||
List above = (List)vreq.getAttribute("tabsAboveCurrent");
|
List above = (List)vreq.getAttribute("tabsAboveCurrent");
|
||||||
if( above == null ){
|
if( above == null ){
|
||||||
int currentTab = TabWebUtil.getTabIdFromRequest(vreq);
|
int currentTab = TabWebUtil.getTabIdFromRequest(vreq);
|
||||||
above = vreq.getWebappDaoFactory().getTabDao().getTabHierarcy(currentTab, -1);
|
above = vreq.getWebappDaoFactory().getTabDao().getTabHierarchy(currentTab, -1);
|
||||||
vreq.setAttribute("tabsAboveCurrent", above);
|
vreq.setAttribute("tabsAboveCurrent", above);
|
||||||
}
|
}
|
||||||
return above;
|
return above;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import org.junit.Test;
|
||||||
* Date: Oct 24, 2007
|
* Date: Oct 24, 2007
|
||||||
* Time: 10:51:01 AM
|
* Time: 10:51:01 AM
|
||||||
*/
|
*/
|
||||||
public class TabFitleringTest {
|
public class TabFilteringTest {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
Loading…
Add table
Add a link
Reference in a new issue