Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Work in progress: new style for editor
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed Jul 22, 2013
1 parent d2e2c56 commit fc53a02
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 108 deletions.
Expand Up @@ -95,7 +95,7 @@ public int compare(HProject o1, HProject o2)
@Override
public int compare(HProjectIteration o1, HProjectIteration o2)
{
return o2.getCreationDate().after(o1.getCreationDate()) ? -1 : 1;
return o2.getCreationDate().after(o1.getCreationDate()) ? 1 : -1;
}
};

Expand Down
Expand Up @@ -30,10 +30,8 @@
import javax.ws.rs.core.EntityTag;

import org.apache.commons.lang.StringUtils;
import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;
import org.hibernate.search.jpa.FullTextEntityManager;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.AutoCreate;
Expand Down Expand Up @@ -377,7 +375,7 @@ public List<HProjectIteration> searchLikeSlugOrProjectSlug(String searchTerm)

public HProjectIteration getLastCreatedVersion(Long projectId)
{
Query q = getSession().createQuery("from HProjectIteration t where t.project.id = :projectId order by t.creationDate");
Query q = getSession().createQuery("from HProjectIteration t where t.project.id = :projectId order by t.creationDate DESC");
q.setParameter("projectId", projectId);
q.setCacheable(true);
q.setMaxResults(1).setComment("ProjectIterationDAO.getLastCreatedVersion");
Expand Down
Expand Up @@ -32,9 +32,6 @@
<!-- Specify the app entry point class. -->
<entry-point class='org.zanata.webtrans.client.Application'/>

<!-- Specify the application specific style sheet. -->
<stylesheet src="//webassets-zanata.rhcloud.com/1/assets/css/Application.css" />

<!-- Add gwt-log support, default level `OFF` - check for
extended property 'log_level' to see if this is overridden
-->
Expand Down
Expand Up @@ -50,6 +50,7 @@ public class Application implements EntryPoint
{
private static final WebTransGinjector injector = GWT.create(WebTransGinjector.class);
private static final String APP_LOAD_ERROR_CSS_CLASS = "AppLoadError";
private static final String CONTENT_DIV_ID = "container";

private static WorkspaceId workspaceId;
private static UserWorkspaceContext userWorkspaceContext;
Expand Down Expand Up @@ -157,7 +158,7 @@ private void delayedStartApp()
{
final AppPresenter appPresenter = injector.getAppPresenter();
final DocumentListPresenter documentListPresenter = injector.getDocumentListPresenter();
RootPanel.get("contentDiv").add(appPresenter.getDisplay().asWidget());
RootPanel.get(CONTENT_DIV_ID).add(appPresenter.getDisplay().asWidget());
appPresenter.bind();
Window.enableScrolling(true);
// eager load document list
Expand Down Expand Up @@ -323,6 +324,6 @@ private static void showErrorWithLink(String message, Throwable e)
layoutPanel.add(stackTracePanel);
}

RootPanel.get("contentDiv").add(layoutPanel);
RootPanel.get(CONTENT_DIV_ID).add(layoutPanel);
}
}
Expand Up @@ -9,44 +9,59 @@
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">

<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Application</title>
<link rel="shortcut icon" href="//webassets-zanata.rhcloud.com/1/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="gwt/standard/standard.css" />
<link type="text/css" rel="stylesheet" href="#{request.contextPath}/resources/fontello/css/fontello.css"/>
<link type="text/css" rel="stylesheet" href="#{request.contextPath}/resources/css/menu.css"/>

<script src="codemirror-compressed.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="codemirror.css"/>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>#{messages['jsf.PageTitle']}</title>
<link rel="shortcut icon" href="//webassets-zanata.rhcloud.com/1/favicon.ico" type="image/x-icon" />
<link type="text/css" rel="stylesheet" class="user" href="//webassets-zanata.rhcloud.com/1/assets/css/zanata.css"/>
<link type="text/css" rel="stylesheet" href="#{request.contextPath}/resources/fontello/css/fontello.css"/>
<link type="text/css" rel="stylesheet" href="//webassets-zanata.rhcloud.com/1/assets/css/style.css"/>
<link type="text/css" rel="stylesheet" href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,400italic"/>
<link type="text/css" rel="stylesheet" href="//webassets-zanata.rhcloud.com/1/assets/css/application.css"/>
<link type="text/css" rel="stylesheet" href="gwt/standard/standard.css" />

<script src="diff_match_patch/javascript/diff_match_patch.js" type="text/javascript"></script>
<script src="codemirror-compressed.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="codemirror.css"/>

<script src="diff_match_patch/javascript/diff_match_patch.js" type="text/javascript"></script>

<!-- -->
<!-- This script loads your compiled module. -->
<!-- If you add any GWT meta tags, they must -->
<!-- be added before this line. -->
<!-- -->
<script type="text/javascript" language="javascript" src="webtrans.nocache.js"></script>
</head>
<!-- -->
<!-- This script loads your compiled module. -->
<!-- If you add any GWT meta tags, they must -->
<!-- be added before this line. -->
<!-- -->
<script type="text/javascript" language="javascript" src="webtrans.nocache.js"></script>
</head>

<!-- -->
<!-- The body can have arbitrary html, or -->
<!-- you can leave the body empty if you want -->
<!-- to create a completely dynamic UI. -->
<!-- -->
<body>
<div class="header">
<ui:include src="../WEB-INF/template/menu.xhtml" />
</div>

<div id="contentDiv"/>
<!-- -->
<!-- The body can have arbitrary html, or -->
<!-- you can leave the body empty if you want -->
<!-- to create a completely dynamic UI. -->
<!-- -->
<body class="new-zanata-body">
<div class="off-canvas__outer">
<div class="new-zanata-base">
<div class="new-zanata">
<ui:include src="../WEB-INF/template/left_menu.xhtml" />
<ui:include src="../WEB-INF/template/right_menu.xhtml" />
</div>
</div>

<div class="off-canvas__inner">
<div class="new-zanata-base">
<div class="new-zanata">
<ui:include src="../WEB-INF/template/banner.xhtml" />
</div>
</div>
<div id="container"/>
</div>
</div>

<!-- OPTIONAL: include this if you want history support -->
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
<!-- OPTIONAL: include this if you want history support -->
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>

</body>
</body>

</ui:composition>

Expand Up @@ -17,7 +17,6 @@
<ul class="list--slat list--block-links">
<li><s:link id="left_menu_projects_link" view="/project/home.xhtml" propagation="none">#{messages['jsf.Projects']}</s:link></li>
<li><s:link id="left_menu_version-groups_link" view="/version-group/home.xhtml" propagation="none">#{messages['jsf.Groups']}</s:link></li>
<li><a href="#">Users</a></li>
<li><s:link id="left_menu_languages_link" view="/language/home.xhtml" propagation="none">#{messages['jsf.Languages']}</s:link></li>
<li><s:link id="left_menu_help_link" view="/help/view.xhtml" propagation="none">#{messages['jsf.Help']}</s:link></li>
</ul>
Expand Down
2 changes: 0 additions & 2 deletions zanata-war/src/main/webapp/WEB-INF/template/right_menu.xhtml
Expand Up @@ -16,8 +16,6 @@
<nav>
<ul class="list--slat list--block-links txt--invert">
<li><a href="#" class="is-active">#{messages['jsf.Dashboard']}<span class="badge--highlight badge--inline l--float-right"><!-- This is for notification count --></span></a></li>
<li><s:link id="right_menu_projects_link" view="/project/home.xhtml" propagation="none">#{messages['jsf.Projects']}</s:link></li>
<li><s:link id="right_menu_version-groups_link" view="/version-group/home.xhtml" propagation="none">#{messages['jsf.Groups']}</s:link></li>
<li><s:link id="profile" view="/profile/view.xhtml" propagation="none">#{messages['jsf.Settings']}</s:link></li>
<li>
<s:link id="right_menu_sign_out_link" view="/account/logout.seam" propagation="none">#{messages['jsf.Logout']}</s:link>
Expand Down
63 changes: 0 additions & 63 deletions zanata-war/src/main/webapp/WEB-INF/template/template_old.xhtml

This file was deleted.

0 comments on commit fc53a02

Please sign in to comment.