테스트 사이트 - 개발 중인 베타 버전입니다

DHTML 옵션 표시

LinhMoon 3년 전 조회 2,029

How can I display additional boxes using dhtml?

Thank you !

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

복스리
3년 전

dhtmlxScheduler provides the possibility to define custom display for events

 

Specifying a custom look for the event's box

</p>

<p>scheduler.templates.event_class = function(start, end, event) {

    return "my_event";

};

 

scheduler.renderEvent = function(container, ev) {

    var container_width = container.style.width; // e.g. "105px"

 

    // move section

    var html = "<div class='dhx_event_move my_event_move' style='width: " + 

    container_width + "'></div>";

 

    // container for event's content

    html+= "<div class='my_event_body'>";

    html += "<span class='event_date'>";

    //two options here:show only start date for short events or start+end for long

    if ((ev.end_date - ev.start_date)/60000>40){//if event is longer than 40 minutes

        html += scheduler.templates.event_header(ev.start_date, ev.end_date, ev);

        html += "</span>
";

    } else {

        html += scheduler.templates.event_date(ev.start_date) + "</span>";

    }

    // displaying event's text

    html += "<span>" + scheduler.templates.event_text(ev.start_date,ev.end_date,ev)+

    "</span>" + "</div>";

 

    // resize section

    html += "<div class='dhx_event_resize my_event_resize' style='width: " +

    container_width + "'></div>";

 

    container.innerHTML = html;

    return true; //required, true - to display a custom form, false - the default form

};</p>

<p>

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

L
LinhMoon
3년 전
답장해주셔서 감사합니다.
DHTML을 사용하여 2개의 데이터 입력 테이블을 가질 수 있는지 묻고 싶습니다.
(이 코드를 반복할 수 있습니까?)
<div class="write_div">

<h2 style="text-align:left">*Content</h2>

<label for="wr_content" class="sound_only">내용<strong>필수</strong></label>

<?php if($write_min || $write_max) { ?>

<!-- 최소/최대 글자 수 사용 시 -->

<p id="char_count_desc">이 게시판은 최소 <strong><?php echo $write_min; ?></strong>글자 이상, 최대 <strong><?php echo $write_max; ?></strong>글자 이하까지 글을 쓰실 수 있습니다.</p>

<?php } ?>

<?php echo $editor_html; // 에디터 사용시는 에디터로, 아니면 textarea 로 노출 ?>

<?php if($write_min || $write_max) { ?>

<!-- 최소/최대 글자 수 사용 시 -->

<div id="char_count_wrap"><span id="char_count"></span>글자</div>

<?php } ?>

</div>

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인