• 티스토리 홈
  • 프로필사진
    TheStorybook
  • 방명록
  • 공지사항
  • 태그
  • 블로그 관리
  • 글 작성
TheStorybook
  • 프로필사진
    TheStorybook
    • 분류 전체보기 (223)
      • 시놀로지(Nas) (11)
      • XE(Rhymix) (131)
        • 레이아웃, 스킨 관련 (15)
        • 변수 응용 (109)
        • 문제 해결 (3)
        • 기타 메뉴얼 (1)
        • 기타 자료 (0)
      • 그누보드 (7)
      • 작업 소스들 (53)
      • 기타 (6)
      • 추천 사이트 (7)
  • 방문자 수
    • 전체:
    • 오늘:
    • 어제:
  • 최근 댓글
      등록된 댓글이 없습니다.
    • 최근 공지
      • 개인 자료 보관 blog
      등록된 공지가 없습니다.
    # Home
    # 공지사항
    #
    # 태그
    # 검색결과
    # 방명록
    • #HASHTAG 상단 알림목록에 알림 전체삭제 추가하기
      2022년 03월 30일
      • TheStorybook
      • 작성자
      • 2022.03.30.:23

      알림 전체삭제가 필요해서 추가해보았습니다.

       

      1. 전 components\header\header-right\header-notify.html 에 삭제를 추가했습니다. 붉은색이 변경된 부분입니다.

      {@

        $oNcenterliteClass = getClass('ncenterlite');

        $oNcenterliteModel = getModel('ncenterlite');

        $nCenterList = $oNcenterliteModel->getMyNotifyList();  

       

        // user/user-notification.html에서 쓸 변수

        // 알림센터의 [회원 메뉴 표시] 설정 확인(각 회원 메뉴에 알림 목록 표시)

        $ncDisplayUserMenu = $oNcenterliteModel->getConfig()->user_config_list;

        

        // 알림센터의 [회원 알림 설정] 확인(각 회원들이 알림 설정 가능 유무)

        $ncUserConfig = $oNcenterliteModel->getConfig()->user_notify_setting;

      }

       

      <div class="app-dropdown">

        <a class="app-dropdown-toggle app-header-item">

          <ion-icon name="notifications-outline"></ion-icon>

       

          <span cond="$nCenterList->total_count >= 1" class="app-header-item__badge">

            {$nCenterList->total_count}

          </span>

        </a>

       

        <div class="app-dropdown-menu app-right" style="width: 270px">

          <div class="app-dropdown-header notify">

            <div>{$lang->notify}</div>

            {@

              // 모두 삭제 메시지 변경. ko, en

              if($lang_type=="ko") :

                $lang->ncenterlite_delete_all = "모두 읽음";

              elseif($lang_type=="en") : 

                $lang->ncenterlite_delete_all = "Read All";

              endif;

            }

            <div cond="$nCenterList->total_count >= 1" class="headerReadAll"><a class="app-button app-primary app-xs">{$lang->ncenterlite_delete_all}</a></div>     

          </div>

          <include target="../../user/user-notification.html" />

        </div>

      </div>

       

      2.  components\common\dropdown\dropdown.scss 에 notify 추가(알림과 전체삭제를 좌우 정렬하기 위해서)

        .app-dropdown-header {
          padding: 0.75rem 1.25rem;
          margin-bottom: 0.5rem;
          border-bottom: 1px solid $color-gray-300;

          font-size: 1.25rem;
          font-weight: 600;

          &.notify {
            display: flex;
            justify-content: space-between;

            .headerReadAll {
              display: flex;
            }
          }

        }

       

      3. components\header\header.js 에 삭제 클릭시 실행할 스크립트 추가

      jQuery(function($) {  

        $('.headerReadAll').click(function(){

          exec_json('ncenterlite.procNcenterliteNotifyReadAll', null, function(data) {

             $('.app-dropdown').removeClass('active');   //div 숨기고

             $('.app-header-item__badge').detach();        //알림카운터 삭제하고

             location.reload();

             return false;

          })  

        })

      })

       

      버튼 디자인은 위젯스타일꺼 그대로 따라 했습니다.

       

       

      저는 사용자 알림을 꺼놓고 필요할 때 켜기 때문에 알림 설정과 알림 목록을 껐다 켰다 할 수 있게 수정했습니다.

      위에서 추가 해놓을 것을

        // user/user-notification.html에서 쓸 변수

        // 알림센터의 [회원 메뉴 표시] 설정 확인(각 회원 메뉴에 알림 목록 표시)

        $ncDisplayUserMenu = $oNcenterliteModel->getConfig()->user_config_list;

        

        // 알림센터의 [회원 알림 설정] 확인(각 회원들이 알림 설정 가능 유무)

        $ncUserConfig = $oNcenterliteModel->getConfig()->user_notify_setting;

       

      components\user\user-notification.html 에서 if문으로 감싸줍니다.

       

      <!--@else-->

      <div class="app-header-notify__empty">

        <ion-icon name="notifications"></ion-icon>

        <div class="app-title">{$lang->no_notify}</div>

        <div class="app-desc">{$lang->notify_description_1}<br/>{$lang->notify_description_2}</div>

        <!--@if($ncUserConfig == 'Y')-->

        <a href="{getUrl('', 'mid', $mid, 'act', 'dispNcenterliteUserConfig')}" class="app-button app-primary app-plain">{$lang->my_notification_setting}</a>

        <!--@endif-->

      </div>

      <!--@end-->

       

      <!--@if($ncDisplayUserMenu == 'Y')-->

      <ul class="app-dropdown-menu-list">  

        <li class="app-divider"></li>

        <li>

          <a href="{getUrl('', 'mid', $mid, 'act', 'dispNcenterliteNotifyList')}">

            <span>{$lang->my_notification_list}</span>

          </a>

        </li>   

      </ul>

      <!--@endif-->

       

      저작자표시 (새창열림)

      'XE(Rhymix) > 레이아웃, 스킨 관련' 카테고리의 다른 글

      Slow 스킨 화제의글 작은팁 !  (0) 2022.03.30
      #HASHTAG ionicon 마우스 호버시 타이틀 수정하기  (0) 2022.03.30
      #HASHTAG 신경쓰이는 콘솔 메시지 없애기  (0) 2022.03.30
      #HASHTAG 로그인폼 오류 메시지 표시하기  (0) 2022.03.30
      #HASHTAG 우측 상단 창 하나만 보이기  (0) 2022.03.30
      다음글
      다음 글이 없습니다.
      이전글
      이전 글이 없습니다.
      댓글
    조회된 결과가 없습니다.
    스킨 업데이트 안내
    현재 이용하고 계신 스킨의 버전보다 더 높은 최신 버전이 감지 되었습니다. 최신버전 스킨 파일을 다운로드 받을 수 있는 페이지로 이동하시겠습니까?
    ("아니오" 를 선택할 시 30일 동안 최신 버전이 감지되어도 모달 창이 표시되지 않습니다.)
    목차
    표시할 목차가 없습니다.
      • 안녕하세요
      • 감사해요
      • 잘있어요

      티스토리툴바