예제 #1
0
파일: init.php 프로젝트: vazahat/dudex
function profile_progressbar_collect_info_config(OW_Event $event)
{
    $params = $event->getParams();
    if (in_array($params['line'], array(HINT_BOL_Service::INFO_LINE0, HINT_BOL_Service::INFO_LINE1, HINT_BOL_Service::INFO_LINE2))) {
        $event->add(array('key' => 'profileprogressbar', 'label' => OW::getLanguage()->text('profileprogressbar', 'user_hint_caption')));
    }
}
예제 #2
0
 public function addProfileActionToolbar(OW_Event $event)
 {
     $params = $event->getParams();
     if (!OW::getUser()->isAuthenticated() || $params['userId'] == OW::getUser()->getId()) {
         return;
     }
     $uniqId = uniqid('bookmarks-');
     $languages = OW::getLanguage();
     $markLabel = $languages->text('bookmarks', 'mark_toolbar_label');
     $unMarkLabel = $languages->text('bookmarks', 'unmark_toolbar_label');
     $label = BOOKMARKS_BOL_Service::getInstance()->isMarked(OW::getUser()->getId(), $params['userId']) ? $unMarkLabel : $markLabel;
     $event->add(array(BASE_CMP_ProfileActionToolbar::DATA_KEY_ITEM_KEY => "bookmark.action", BASE_CMP_ProfileActionToolbar::DATA_KEY_LINK_ID => $uniqId, BASE_CMP_ProfileActionToolbar::DATA_KEY_LABEL => $label, BASE_CMP_ProfileActionToolbar::DATA_KEY_LINK_ORDER => 5));
     OW::getDocument()->addOnloadScript(UTIL_JsGenerator::composeJsString(';var bookmarkBtn = $("#" + {$id}).bind("click", function(event)
             {
                 BOOKMARKS.markState({$userId}, function( data, textStatus, jqXHR )
                 {
                     if ( data.mark === true )
                     {
                         OW.info(\'<div class="clearfix bookmarks_wrap"><span>\' + {$markedNotifyMessage} + \'</span><span class="ow_left boomarks_ic_wrap bookmarks_ic_bookmark_white"></span></div>\');
                         bookmarkBtn.html({$unMarkLabel});
                     }
                     else
                     {
                         OW.info(\'<div class="clearfix bookmarks_wrap"><span>\' + {$unMarkedNotifyMessage} + \'</span><span class="ow_left boomarks_ic_wrap bookmarks_ic_bookmark_white"></span></div>\');
                         bookmarkBtn.html({$markLabel});
                     }
                 });
             });', array('id' => $uniqId, 'userId' => $params['userId'], 'markedNotifyMessage' => $languages->text('bookmarks', 'marked_notify_message', array('bookmarksListURL' => OW::getRouter()->urlForRoute('bookmarks.list', array('category' => BOOKMARKS_BOL_Service::LIST_LATEST)))), 'unMarkedNotifyMessage' => $languages->text('bookmarks', 'unmarked_notify_message', array('bookmarksListURL' => OW::getRouter()->urlForRoute('bookmarks.list', array('category' => BOOKMARKS_BOL_Service::LIST_LATEST)))), 'unMarkLabel' => $unMarkLabel, 'markLabel' => $markLabel)));
 }
예제 #3
0
 public function notificationActions(OW_Event $event)
 {
     $event->add(array('section' => 'birthdays', 'action' => 'comment', 'sectionIcon' => 'ow_ic_calendar', 'sectionLabel' => OW::getLanguage()->text('birthdays', 'email_notifications_section_label'), 'description' => OW::getLanguage()->text('birthdays', 'email_notifications_setting_status_comment'), 'selected' => true));
     $event->add(array('section' => 'birthdays', 'action' => 'like', 'sectionIcon' => 'ow_ic_calendar', 'sectionLabel' => OW::getLanguage()->text('birthdays', 'email_notifications_section_label'), 'description' => OW::getLanguage()->text('birthdays', 'email_notifications_setting_status_like'), 'selected' => true));
 }