- Timestamp:
- 02/02/12 22:47:26 (4 months ago)
- Location:
- trunk/inc
- Files:
-
- 6 edited
-
classes/BxDolAcl.php (modified) (1 diff)
-
classes/BxDolPage.php (modified) (1 diff)
-
classes/BxDolTemplate.php (modified) (7 diffs)
-
design.inc.php (modified) (1 diff)
-
js/functions.js (modified) (4 diffs)
-
js/jquery.dolPopup.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/classes/BxDolAcl.php
r15934 r15942 111 111 return false; 112 112 if (!(int)$iProfileId) 113 $iProfileId = 1; // TODO: get current profile id113 $iProfileId = 1; // TODO: remove this code as soon as it will be some profiles available 114 114 $aACL = $this->getMemberMembershipInfo($iProfileId); 115 115 return ($iPermissions & pow(2, $aACL['id'] - 1)); -
trunk/inc/classes/BxDolPage.php
r15921 r15942 85 85 * - html: HTML string. 86 86 * - lang: language key. 87 * - image: image id in the storage .87 * - image: image id in the storage and alignment (left, center, right) for example: 36#center 88 88 * - rss: URL to RSS with number of displayed items, for example: http://www.example.com/rss#4 89 89 * - menu: menu object name. -
trunk/inc/classes/BxDolTemplate.php
r15934 r15942 305 305 'common.css', 306 306 'default.css', 307 'general.css', 307 308 )); 308 309 … … 695 696 return $this->_getAbsoluteLocation('path', $this->_sFolderCss, $sName, $sCheckIn); 696 697 } 698 699 /** 700 * Get menu. 701 * @param $s menu object name 702 * @return html or empty string 703 */ 704 function getMenu ($s) { 705 bx_import('BxDolMenu'); 706 $oMenu = BxDolMenu::getObjectInstance($s); 707 return $oMenu ? $oMenu->getCode () : ''; 708 } 709 697 710 /** 698 711 * Get content of HTML file. … … 837 850 $sRet = bx_process_output($this->aPage['header_text']); 838 851 break; 852 case 'popup_loading': 853 bx_import('BxTemplFunctions'); 854 $sRet = '<div id="bx-popup-loading" style="display:none;">' . BxTemplFunctions::getInstance()->transBox('<div class="bx-def-padding bx-def-color-bg-block bx-popup-ajax-content"></div>') . '</div>'; 855 break; 839 856 case 'main_div_width': 840 857 if(!empty($this->aPage['width'])) … … 842 859 break; 843 860 case 'main_logo': 844 $sRet = getMainLogo(); 845 break; 846 case 'top_menu': 847 bx_import('BxTemplMenu'); 848 $oMenuSite = BxTemplMenu::getObjectInstance('sys_site'); 849 $sRet = $oMenuSite ? $oMenuSite->getCode () : ''; 850 break; 851 case 'top_submenu': 852 bx_import('BxTemplMenu'); 853 $sRet = '';//BxTemplMenu::getInstance() -> getSubMenu(); 861 bx_import('BxTemplFunctions'); 862 $sRet = BxTemplFunctions::getInstance()->getMainLogo(); 854 863 break; 855 864 case 'top_menu_breadcrumb': 856 865 bx_import('BxTemplMenu'); 857 866 $sRet = '';//BxTemplMenu::getInstance() -> getBreadcrumb(); 858 break;859 case 'extra_top_menu':860 $iProfileId = getLoggedId();861 862 if ($iProfileId && getParam('ext_nav_menu_enabled')) {863 //bx_import('BxTemplMemberMenu');864 //$oMemberMenu = new BxTemplMemberMenu();865 $sRet = ''; //$oMemberMenu -> genMemberMenu($iProfileId); // TODO: member menu866 }867 break;868 case 'bottom_links':869 bx_import('BxTemplMenu');870 $oMenuFooter = BxTemplMenu::getObjectInstance('sys_footer');871 $sRet = $oMenuFooter ? $oMenuFooter->getCode () : 'TODO: footer menu';872 867 break; 873 868 case 'switch_skin_block': … … 1381 1376 "'<bx_text_js:([^\s]+) \/>'se", 1382 1377 "'<bx_text_attribute:([^\s]+) \/>'se", 1378 "'<bx_menu:([^\s]+) \/>'se", 1383 1379 "'<bx_url_root />'", 1384 1380 "'<bx_url_studio />'" … … 1394 1390 "bx_js_string(_t('\\1'))", 1395 1391 "bx_html_attribute(_t('\\1'))", 1392 "\$this->getMenu('\\1')", 1396 1393 BX_DOL_URL_ROOT, 1397 1394 BX_DOL_URL_STUDIO … … 1805 1802 1806 1803 return ' 1807 <div class="bx-def-padding-sec bx-def-border bx-def-color-bg-block bx-std-bx-footer ">1804 <div class="bx-def-padding-sec bx-def-border bx-def-color-bg-block bx-std-bx-footer bx-def-round-corners"> 1808 1805 <div style="text-align:center;"> 1809 1806 ' . _t('_powered_by') . ' <a href="http://www.boonex.com/products/dolphin/' . $sAffID . '" title="Free Community Software">Dolphin</a> -
trunk/inc/design.inc.php
r15922 r15942 151 151 bx_import('BxTemplFunctions'); 152 152 return BxTemplFunctions::getInstance()->popupBox($sName, $sTitle, $sContent, $aActions, $isHiddenByDefault); 153 }154 155 function getMainLogo() {156 bx_import('BxDolConfig');157 $sRprMain = BxDolConfig::getInstance()->get('path_dynamic', 'rpr_images_main');158 159 $sFileName = getParam('sys_main_logo');160 if(!file_exists($sRprMain . $sFileName))161 return '';162 163 return '<a href="' . BX_DOL_URL_ROOT . '"><img src="' . $sRprMain . $sFileName . '" class="mainLogo" alt="logo" /></a>';164 153 } 165 154 -
trunk/inc/js/functions.js
r15934 r15942 135 135 136 136 137 function bx_loading_content (elem, b, isReplace) { 138 var block = $(elem); 139 if (1 == b || true == b) { 140 if ('undefined' != typeof(isReplace) && isReplace) 141 block.html('<div class="bx-loading-ajax" style="position:static;"><div class="bx-loading-ajax-rotating"></div></div>'); 142 else 143 block.append('<div class="bx-loading-ajax"><div class="bx-loading-ajax-rotating"></div></div>'); 144 } else { 145 block.find(".bx-loading-ajax").remove(); 146 } 147 } 148 137 149 function bx_loading (elem, b) { 138 150 … … 144 156 if (1 == b || true == b) { 145 157 146 var e = $('<div class="bx-loading-ajax"><div class="bx-loading-ajax-rotating"></div></div>');147 block.append(e); 158 bx_loading_content(block, b); 159 148 160 e = block.find(".bx-loading-ajax"); 149 161 e.css('left', parseInt(block.width()/2.0 - e.width()/2.0)); … … 176 188 block.css('min-height', block.data('css-save-min-height')); 177 189 178 b lock.find(".bx-loading-ajax").remove();190 bx_loading_content(block, b); 179 191 180 192 } … … 202 214 } 203 215 216 /** 217 * Show pointer popup with menu. 218 * @param e - element to show popup at 219 * @param o - menu object name 220 */ 221 function bx_menu_popup (o, e) { 222 $(e).dolPopupAjax({ 223 url: 'menu.php?o=' + o 224 }); 225 } 226 204 227 function validateLoginForm(eForm) { 205 228 if (! eForm) -
trunk/inc/js/jquery.dolPopup.js
r15932 r15942 161 161 }; 162 162 163 164 $.fn.dolPopupAjax = function(options) { 165 166 if ('undefined' == typeof(options) || 'object' != typeof(options) || 'undefined' == typeof(options.url)) 167 return; 168 169 var bx_menu_on = function (e, b) { 170 var li = $(e).parents('li:first'); 171 if (b) { 172 var ul = $(e).parents('ul:first'); 173 ul.find('li').removeClass('bx-menu-tab-active'); 174 li.addClass('bx-menu-tab-active'); 175 } else { 176 li.removeClass('bx-menu-tab-active'); 177 } 178 } 179 180 var bx_menu_is_on = function (e) { 181 var li = $(e).parents('li:first'); 182 return li.hasClass('bx-menu-tab-active'); 183 } 184 185 return this.each(function() { 186 var e = $(this); 187 188 var id = ('undefined' == typeof(options.id) ? parseInt(2147483647 * Math.random()) : options.id); 189 190 if ($("#bx-popup-ajax-" + id + ":visible").length) { 191 192 $("#bx-popup-ajax-" + id).dolPopupHide(); 193 194 } else if ($("#bx-popup-ajax-" + id).length) { 195 196 bx_menu_on(e, true); 197 $("#bx-popup-ajax-" + id).dolPopup({ 198 pointer: {el:$(e)}, 199 onHide: function () { 200 bx_menu_on(e, false); 201 } 202 }); 203 204 } else { 205 206 bx_menu_on(e, true); 207 bx_loading_content($('#bx-popup-loading .bx-popup-ajax-content'), true, true); 208 $('#bx-popup-loading').dolPopup({ 209 pointer: {el:e}, 210 closeOnOuterClick: false 211 }); 212 $('<div id="bx-popup-ajax-' + id + '" style="display:none;"><div>').appendTo($('body')).load(sUrlRoot + options.url, 213 function() { 214 if (!bx_menu_is_on(e)) 215 return; 216 $('#bx-popup-loading').dolPopupHide({ 217 onHide: function () { 218 $('#bx-popup-ajax-' + id).dolPopup({ 219 pointer: {el:e}, 220 onHide: function () { 221 bx_menu_on(e, false); 222 } 223 }); 224 } 225 }); 226 } 227 ); 228 229 } 230 231 }); 232 }; 233 163 234 $.fn._dolPopupSetPosition = function(o) { 164 235 return this.each(function() {
Note: See TracChangeset
for help on using the changeset viewer.