Search in sources :

Example 31 with HtmlBuilder

use of org.jmesa.view.html.HtmlBuilder in project OpenClinica by OpenClinica.

the class ListEventsForSubjectTableFactory method viewStudySubjectLinkBuilder.

private String viewStudySubjectLinkBuilder(StudySubjectBean studySubject) {
    HtmlBuilder actionLink = new HtmlBuilder();
    actionLink.a().href("ViewStudySubject?id=" + studySubject.getId());
    actionLink.append("onMouseDown=\"javascript:setImage('bt_View1','images/bt_View_d.gif');\"");
    actionLink.append("onMouseUp=\"javascript:setImage('bt_View1','images/bt_View.gif');\"").close();
    actionLink.img().name("bt_View1").src("images/bt_View.gif").border("0").alt(resword.getString("view")).title(resword.getString("view")).append("hspace=\"2\"").end().aEnd();
    actionLink.append("   ");
    return actionLink.toString();
}
Also used : HtmlBuilder(org.jmesa.view.html.HtmlBuilder)

Example 32 with HtmlBuilder

use of org.jmesa.view.html.HtmlBuilder in project OpenClinica by OpenClinica.

the class ListEventsForSubjectTableFactory method eventDivBuilder.

private String eventDivBuilder(SubjectBean subject, Integer rowCount, List<StudyEventBean> studyEvents, StudyEventDefinitionBean sed, StudySubjectBean studySubject) {
    String studySubjectLabel = studySubject.getLabel();
    String divWidth = studyEvents.size() >= 3 ? "540" : studyEvents.size() == 2 ? "360" : "180";
    HtmlBuilder eventDiv = new HtmlBuilder();
    eventDiv.table(0).border("0").cellpadding("0").cellspacing("0").close();
    // Lock Div
    eventDiv.div().id("S_Lock_" + studySubjectLabel + "_" + sed.getId() + "_" + rowCount).style("position: absolute; visibility: hidden; z-index: 3; width: 50px; height: 30px; top: 0px;").close();
    lockLinkBuilder(eventDiv, studySubjectLabel, rowCount, studyEvents, sed);
    eventDiv.divEnd();
    eventDiv.tr(0).valign("top").close().td(0).close();
    // Event Div
    eventDiv.div().id("S_Event_" + studySubjectLabel + "_" + sed.getId() + "_" + rowCount).style("position: absolute; visibility: hidden; z-index: 3;width:" + divWidth + "px; top: 0px; float: left;").close();
    eventDiv.div().styleClass("box_T").close().div().styleClass("box_L").close().div().styleClass("box_R").close().div().styleClass("box_B").close().div().styleClass("box_TL").close().div().styleClass("box_TR").close().div().styleClass("box_BL").close().div().styleClass("box_BR").close();
    eventDiv.div().styleClass("tablebox_center").close();
    eventDiv.div().styleClass("ViewSubjectsPopup").style("color: rgb(91, 91, 91);").close();
    eventDiv.table(0).border("0").cellpadding("0").cellspacing("0").close();
    eventDiv.tr(0).valign("top").close();
    singleEventDivBuilder(eventDiv, subject, rowCount, studyEvents, sed, studySubject);
    return eventDiv.toString();
}
Also used : HtmlBuilder(org.jmesa.view.html.HtmlBuilder)

Example 33 with HtmlBuilder

use of org.jmesa.view.html.HtmlBuilder in project OpenClinica by OpenClinica.

the class ListEventsForSubjectTableFactory method reAssignStudySubjectLinkBuilder.

private String reAssignStudySubjectLinkBuilder(StudySubjectBean studySubject) {
    HtmlBuilder actionLink = new HtmlBuilder();
    actionLink.a().href("ReassignStudySubject?id=" + studySubject.getId());
    actionLink.append("onMouseDown=\"javascript:setImage('bt_Reassign1','images/bt_Reassign_d.gif');\"");
    actionLink.append("onMouseUp=\"javascript:setImage('bt_Reassign1','images/bt_Reassign.gif');\"").close();
    actionLink.img().name("bt_Reassign1").src("images/bt_Reassign.gif").border("0").alt(resword.getString("reassign")).title(resword.getString("reassign")).append("hspace=\"2\"").end().aEnd();
    actionLink.append("&nbsp;&nbsp;&nbsp;");
    return actionLink.toString();
}
Also used : HtmlBuilder(org.jmesa.view.html.HtmlBuilder)

Example 34 with HtmlBuilder

use of org.jmesa.view.html.HtmlBuilder in project OpenClinica by OpenClinica.

the class ListEventsForSubjectTableFactory method restoreStudySubjectLinkBuilder.

private String restoreStudySubjectLinkBuilder(StudySubjectBean studySubject) {
    HtmlBuilder actionLink = new HtmlBuilder();
    actionLink.a().href("RestoreStudySubject?action=confirm&id=" + studySubject.getId() + "&subjectId=" + studySubject.getSubjectId() + "&studyId=" + studySubject.getStudyId());
    actionLink.append("onMouseDown=\"javascript:setImage('bt_Restor3','images/bt_Restore_d.gif');\"");
    actionLink.append("onMouseUp=\"javascript:setImage('bt_Restor3','images/bt_Restore_d.gif');\"").close();
    actionLink.img().name("bt_Restore1").src("images/bt_Restore.gif").border("0").alt(resword.getString("restore")).title(resword.getString("restore")).append("hspace=\"2\"").end().aEnd();
    return actionLink.toString();
}
Also used : HtmlBuilder(org.jmesa.view.html.HtmlBuilder)

Example 35 with HtmlBuilder

use of org.jmesa.view.html.HtmlBuilder in project OpenClinica by OpenClinica.

the class ListNotesTableFactory method downloadNotesLinkBuilder.

private String downloadNotesLinkBuilder(StudySubjectBean studySubject) {
    HtmlBuilder actionLink = new HtmlBuilder();
    if (this.isStudyHasDiscNotes()) {
        if (this.getResolutionStatus() >= 1 && this.getResolutionStatus() <= 5) {
            actionLink.a().href("javascript:openDocWindow('ChooseDownloadFormat?subjectId=" + studySubject.getId() + "&discNoteType=" + discNoteType + "&resolutionStatus=" + resolutionStatus + "')");
            actionLink.img().name("bt_View1").src("images/bt_Download.gif").border("0").alt(resword.getString("download_discrepancy_notes")).title(resword.getString("download_discrepancy_notes")).append("hspace=\"4\" width=\"24 \" height=\"15\"").end().aEnd();
            actionLink.append("&nbsp;&nbsp;&nbsp;");
        } else {
            actionLink.a().href("javascript:openDocWindow('ChooseDownloadFormat?subjectId=" + studySubject.getId() + "&discNoteType=" + discNoteType + "&module=" + module + "')");
            actionLink.img().name("bt_View1").src("images/bt_Download.gif").border("0").alt(resword.getString("download_discrepancy_notes")).title(resword.getString("download_discrepancy_notes")).append("hspace=\"2\" width=\"24 \" height=\"15\"").end().aEnd();
            actionLink.append("&nbsp;&nbsp;&nbsp;");
        }
    }
    return actionLink.toString();
}
Also used : HtmlBuilder(org.jmesa.view.html.HtmlBuilder)

Aggregations

HtmlBuilder (org.jmesa.view.html.HtmlBuilder)53 HtmlSnippets (org.jmesa.view.html.HtmlSnippets)6 SyndEntryImpl (com.sun.syndication.feed.synd.SyndEntryImpl)1 SimpleDateFormat (java.text.SimpleDateFormat)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 StudyBean (org.akaza.openclinica.bean.managestudy.StudyBean)1 RuleActionBean (org.akaza.openclinica.domain.rule.action.RuleActionBean)1 ParticipantPortalRegistrar (org.akaza.openclinica.service.pmanage.ParticipantPortalRegistrar)1 BasicCellEditor (org.jmesa.view.editor.BasicCellEditor)1 CellEditor (org.jmesa.view.editor.CellEditor)1 HtmlColumn (org.jmesa.view.html.component.HtmlColumn)1 HtmlRow (org.jmesa.view.html.component.HtmlRow)1 HtmlTable (org.jmesa.view.html.component.HtmlTable)1