Преглед изворни кода

Merge branch 'master' of https://github.com/boonex/dolphin

AntonLV пре 13 година
родитељ
комит
a4f988b74a

+ 1 - 1
contact.php

@@ -15,7 +15,7 @@ bx_import('BxDolLanguages');
 bx_import('BxDolMenu');
 bx_import('BxDolTemplate');
 
-BxDolMenu::setSelected ('system', 'contact'); 
+BxDolMenu::setSelectedGlobal ('system', 'contact'); 
 
 $oTemplate = BxDolTemplate::getInstance();
 $oTemplate->setPageNameIndex (BX_PAGE_DEFAULT);

+ 1 - 1
inc/classes/BxDolAccount.php

@@ -182,7 +182,7 @@ class BxDolAccount extends BxDol {
     static public function getID($s) {
         $oQuery = BxDolAccountQuery::getInstance();
 
-        if (preg_match("/^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,4}$/", $s)) {
+        if (preg_match("/^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,4}$/i", $s)) {
             $iId = (int)$oQuery->getIdByEmail($s);
             return $iId ? $iId : false;
         }

+ 17 - 2
inc/classes/BxDolMenu.php

@@ -89,6 +89,9 @@ class BxDolMenu extends BxDol implements iBxDolFactoryObject {
     protected static $SEL_MODULE = '';
     protected static $SEL_NAME = '';
 
+    protected $_sSelModule;
+    protected $_sSelName;
+
     protected $_sObject;
     protected $_aObject;
     protected $_oQuery;
@@ -138,15 +141,25 @@ class BxDolMenu extends BxDol implements iBxDolFactoryObject {
     }
 
     /**
-     * Set selected menu item.
+     * Set selected menu item globally.
      * @param $sModule menu item module to set as selected
      * @param $sName menu item name to set as selected
      */
-    static public function setSelected ($sModule, $sName) {
+    static public function setSelectedGlobal ($sModule, $sName) {
         self::$SEL_MODULE = $sModule;
         self::$SEL_NAME = $sName;
     }
 
+    /**
+     * Set selected menu item for current menu object only.
+     * @param $sModule menu item module to set as selected
+     * @param $sName menu item name to set as selected
+     */
+    public function setSelected ($sModule, $sName) {
+        $this->_sSelModule = $sModule;
+        $this->_sSelName = $sName;
+    }
+
     /**
      * Add replace markers.
      * @param $a array of markers as key => value
@@ -165,6 +178,8 @@ class BxDolMenu extends BxDol implements iBxDolFactoryObject {
      * @return boolean
      */ 
     protected function _isSelected ($a) {
+        if ($this->_sSelModule || $this->_sSelName)
+            return (!isset($a['module']) || $a['module'] == $this->_sSelModule) && (isset($a['name']) && $a['name'] == $this->_sSelName) ? true : false;
         return (!isset($a['module']) || $a['module'] == self::$SEL_MODULE) && (isset($a['name']) && $a['name'] == self::$SEL_NAME) ? true : false;
     }
 

+ 2 - 0
inc/classes/BxDolTemplate.php

@@ -309,6 +309,8 @@ class BxDolTemplate extends BxDol implements iBxDolSingleton {
         $this->addJs(array(
             'jquery.js',
             'jquery.migrate.js',
+            'jquery.easing.js',
+            'jquery.cookie.js',
             'functions.js',
             'jquery.dolPopup.js',
             'jquery.ui.position.min.js',

+ 106 - 46
inc/js/jquery.cookie.js

@@ -1,47 +1,107 @@
 /*!
-* jQuery Cookie Plugin
-* https://github.com/carhartl/jquery-cookie
-*
-* Copyright 2011, Klaus Hartl
-* Dual licensed under the MIT or GPL Version 2 licenses.
-* http://www.opensource.org/licenses/mit-license.php
-* http://www.opensource.org/licenses/GPL-2.0
-*/
-(function($) {
-    $.cookie = function(key, value, options) {
-
-        // key and at least value given, set cookie...
-        if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) {
-            options = $.extend({}, options);
-
-            if (value === null || value === undefined) {
-                options.expires = -1;
-            }
-
-            if (typeof options.expires === 'number') {
-                var days = options.expires, t = options.expires = new Date();
-                t.setDate(t.getDate() + days);
-            }
-
-            value = String(value);
-
-            return (document.cookie = [
-                encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value),
-                options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
-                options.path ? '; path=' + options.path : '',
-                options.domain ? '; domain=' + options.domain : '',
-                options.secure ? '; secure' : ''
-            ].join(''));
-        }
-
-        // key and possibly options given, get cookie...
-        options = value || {};
-        var decode = options.raw ? function(s) { return s; } : decodeURIComponent;
-
-        var pairs = document.cookie.split('; ');
-        for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) {
-            if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined
-        }
-        return null;
-    };
-})(jQuery);
+ * jQuery Cookie Plugin v1.3.1
+ * https://github.com/carhartl/jquery-cookie
+ *
+ * Copyright 2013 Klaus Hartl
+ * Released under the MIT license
+ */
+(function (factory) {
+	if (typeof define === 'function' && define.amd) {
+		// AMD. Register as anonymous module.
+		define(['jquery'], factory);
+	} else {
+		// Browser globals.
+		factory(jQuery);
+	}
+}(function ($) {
+
+	var pluses = /\+/g;
+
+	function decode(s) {
+		if (config.raw) {
+			return s;
+		}
+		try {
+			// If we can't decode the cookie, ignore it, it's unusable.
+			return decodeURIComponent(s.replace(pluses, ' '));
+		} catch(e) {}
+	}
+
+	function decodeAndParse(s) {
+		if (s.indexOf('"') === 0) {
+			// This is a quoted cookie as according to RFC2068, unescape...
+			s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
+		}
+
+		s = decode(s);
+
+		try {
+			// If we can't parse the cookie, ignore it, it's unusable.
+			return config.json ? JSON.parse(s) : s;
+		} catch(e) {}
+	}
+
+	var config = $.cookie = function (key, value, options) {
+
+		// Write
+		if (value !== undefined) {
+			options = $.extend({}, config.defaults, options);
+
+			if (typeof options.expires === 'number') {
+				var days = options.expires, t = options.expires = new Date();
+				t.setDate(t.getDate() + days);
+			}
+
+			value = config.json ? JSON.stringify(value) : String(value);
+
+			return (document.cookie = [
+				config.raw ? key : encodeURIComponent(key),
+				'=',
+				config.raw ? value : encodeURIComponent(value),
+				options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
+				options.path    ? '; path=' + options.path : '',
+				options.domain  ? '; domain=' + options.domain : '',
+				options.secure  ? '; secure' : ''
+			].join(''));
+		}
+
+		// Read
+
+		var result = key ? undefined : {};
+
+		// To prevent the for loop in the first place assign an empty array
+		// in case there are no cookies at all. Also prevents odd result when
+		// calling $.cookie().
+		var cookies = document.cookie ? document.cookie.split('; ') : [];
+
+		for (var i = 0, l = cookies.length; i < l; i++) {
+			var parts = cookies[i].split('=');
+			var name = decode(parts.shift());
+			var cookie = parts.join('=');
+
+			if (key && key === name) {
+				result = decodeAndParse(cookie);
+				break;
+			}
+
+			// Prevent storing a cookie that we couldn't decode.
+			if (!key && (cookie = decodeAndParse(cookie)) !== undefined) {
+				result[name] = cookie;
+			}
+		}
+
+		return result;
+	};
+
+	config.defaults = {};
+
+	$.removeCookie = function (key, options) {
+		if ($.cookie(key) !== undefined) {
+			// Must not alter options, thus extending a fresh object...
+			$.cookie(key, '', $.extend({}, options, { expires: -1 }));
+			return true;
+		}
+		return false;
+	};
+
+}));

+ 13 - 12
install/sql/v70.sql

@@ -2848,7 +2848,8 @@ INSERT INTO `sys_menu_templates` (`id`, `template`, `title`) VALUES
 (6, 'menu_vertical.html', '_sys_menu_template_title_ver'),
 (7, 'menu_floating_blocks.html', '_sys_menu_template_title_floating_blocks'),
 (8, 'menu_main_submenu.html', '_sys_menu_template_title_main_submenu'),
-(9, 'menu_action.html', '_sys_menu_template_title_action');
+(9, 'menu_action.html', '_sys_menu_template_title_action'),
+(10, 'menu_floating_circles.html', '_sys_menu_template_title_floating_circles');
 
 CREATE TABLE IF NOT EXISTS `sys_objects_menu` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
@@ -2923,7 +2924,7 @@ INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `tit
 
 -- action menu
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('sys_site_action', 'system', 'action', '_sys_menu_item_title_system_action', '', 'javascript:void(0);', 'bx_menu_popup_inline(\'#bx-menu-action-popup-sys_site_action\', this);', '', 'collapse', '', 2147483647, 1, 0, 0);
+('sys_site_action', 'system', 'action', '_sys_menu_item_title_system_action', '', 'javascript:void(0);', 'bx_menu_action_toggle (this);', '', 'caret-left', '', 2147483647, 1, 0, 0);
 
 -- footer menu
 INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
@@ -2945,11 +2946,11 @@ INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `tit
 
 -- account settings menu
 INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
-('sys_account_settings', 'system', 'account-settings-profile-context', '_sys_menu_item_title_system_account_profile_context', '_sys_menu_item_title_account_profile_context', 'page.php?i=account-profile-switcher', '', '', 'user', '', 2147483646, 1, 1, 1),
-('sys_account_settings', 'system', 'account-settings-info', '_sys_menu_item_title_system_account_settings_info', '_sys_menu_item_title_account_settings_info', 'page.php?i=account-settings-info', '', '', 'info-sign', '', 2147483646, 1, 1, 2),
-('sys_account_settings', 'system', 'account-settings-email', '_sys_menu_item_title_system_account_settings_email', '_sys_menu_item_title_account_settings_email', 'page.php?i=account-settings-email', '', '', 'envelope', '', 2147483646, 1, 1, 3),
-('sys_account_settings', 'system', 'account-settings-password', '_sys_menu_item_title_system_account_settings_pwd', '_sys_menu_item_title_account_settings_pwd', 'page.php?i=account-settings-password', '', '', 'key', '', 2147483646, 1, 1, 4),
-('sys_account_settings', 'system', 'account-settings-delete', '_sys_menu_item_title_system_account_settings_delete', '_sys_menu_item_title_account_settings_delete', 'page.php?i=account-settings-delete', '', '', 'remove', '', 2147483646, 1, 1, 5);
+('sys_account_settings', 'system', 'account-settings-profile-context', '_sys_menu_item_title_system_account_profile_context', '_sys_menu_item_title_account_profile_context', 'page.php?i=account-profile-switcher#top', '', '', 'user', '', 2147483646, 1, 1, 1),
+('sys_account_settings', 'system', 'account-settings-info', '_sys_menu_item_title_system_account_settings_info', '_sys_menu_item_title_account_settings_info', 'page.php?i=account-settings-info#top', '', '', 'info-sign', '', 2147483646, 1, 1, 2),
+('sys_account_settings', 'system', 'account-settings-email', '_sys_menu_item_title_system_account_settings_email', '_sys_menu_item_title_account_settings_email', 'page.php?i=account-settings-email#top', '', '', 'envelope', '', 2147483646, 1, 1, 3),
+('sys_account_settings', 'system', 'account-settings-password', '_sys_menu_item_title_system_account_settings_pwd', '_sys_menu_item_title_account_settings_pwd', 'page.php?i=account-settings-password#top', '', '', 'key', '', 2147483646, 1, 1, 4),
+('sys_account_settings', 'system', 'account-settings-delete', '_sys_menu_item_title_system_account_settings_delete', '_sys_menu_item_title_account_settings_delete', 'page.php?i=account-settings-delete#top', '', '', 'remove', '', 2147483646, 1, 1, 5);
 
 
 -- --------------------------------------------------------
@@ -3348,18 +3349,18 @@ INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designb
 ('sys_confirm_email', 1, 'system', '_sys_page_block_title_confirm_email', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:18:"email_confirmation";s:6:"params";a:0:{}s:5:"class";s:19:"TemplServiceAccount";}', 0, 1, 1),
 
 ('sys_account_settings_email', 2, 'system', '_sys_page_block_title_account_settings_email', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:22:"account_settings_email";s:6:"params";a:0:{}s:5:"class";s:19:"TemplServiceAccount";}', 0, 1, 1),
-('sys_account_settings_email', 1, 'system', '_sys_page_block_title_account_settings_menu', 11, 2147483647, 'menu', 'sys_account_settings', 0, 1, 1),
+('sys_account_settings_email', 1, 'system', '_sys_page_block_title_account_settings_menu', 13, 2147483647, 'menu', 'sys_account_settings', 0, 1, 1),
 
 ('sys_account_settings_pwd', 2, 'system', '_sys_page_block_title_account_settings_pwd', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:25:"account_settings_password";s:6:"params";a:0:{}s:5:"class";s:19:"TemplServiceAccount";}', 0, 1, 1),
-('sys_account_settings_pwd', 1, 'system', '_sys_page_block_title_account_settings_menu', 11, 2147483647, 'menu', 'sys_account_settings', 0, 1, 1),
+('sys_account_settings_pwd', 1, 'system', '_sys_page_block_title_account_settings_menu', 13, 2147483647, 'menu', 'sys_account_settings', 0, 1, 1),
 
 ('sys_account_settings_info', 2, 'system', '_sys_page_block_title_account_settings_info', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:21:"account_settings_info";s:6:"params";a:0:{}s:5:"class";s:19:"TemplServiceAccount";}', 0, 1, 1),
-('sys_account_settings_info', 1, 'system', '_sys_page_block_title_account_settings_menu', 11, 2147483647, 'menu', 'sys_account_settings', 0, 1, 1),
+('sys_account_settings_info', 1, 'system', '_sys_page_block_title_account_settings_menu', 13, 2147483647, 'menu', 'sys_account_settings', 0, 1, 1),
 
 ('sys_account_settings_delete', 2, 'system', '_sys_page_block_title_account_settings_delete', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:28:"account_settings_del_account";s:6:"params";a:0:{}s:5:"class";s:19:"TemplServiceAccount";}', 0, 1, 1),
-('sys_account_settings_delete', 1, 'system', '_sys_page_block_title_account_settings_menu', 11, 2147483647, 'menu', 'sys_account_settings', 0, 1, 1),
+('sys_account_settings_delete', 1, 'system', '_sys_page_block_title_account_settings_menu', 13, 2147483647, 'menu', 'sys_account_settings', 0, 1, 1),
 
-('sys_account_profile_switcher', 1, 'system', '_sys_page_block_title_account_settings_menu', 11, 2147483647, 'menu', 'sys_account_settings', 1, 1, 1),
+('sys_account_profile_switcher', 1, 'system', '_sys_page_block_title_account_settings_menu', 13, 2147483647, 'menu', 'sys_account_settings', 1, 1, 1),
 ('sys_account_profile_switcher', 2, 'system', '_sys_page_block_title_account_profile_switcher', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:24:"account_profile_switcher";s:6:"params";a:0:{}s:5:"class";s:20:"TemplServiceProfiles";}', 0, 1, 1),
 
 ('sys_unsubscribe_notifications', 1, 'system', '_sys_page_block_title_unsubscribe_notifications', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:25:"unsubscribe_notifications";s:6:"params";a:0:{}s:5:"class";s:19:"TemplServiceAccount";}', 0, 1, 1),

+ 2 - 1
modules/boonex/english/data/langs/system.xml

@@ -3341,6 +3341,7 @@ More info about URI DNSBL: <br />
     <string name="_sys_menu_template_title_ver_lite"><![CDATA[Vertical Links (lite)]]></string>
     <string name="_sys_menu_template_title_toolbar"><![CDATA[Toolbar Buttons]]></string>
     <string name="_sys_menu_template_title_floating_blocks"><![CDATA[Floating Blocks]]></string>
+    <string name="_sys_menu_template_title_floating_circles"><![CDATA[Floating Circles]]></string>
     <string name="_sys_menu_template_title_action"><![CDATA[Action Menu]]></string>
 
     <string name="_sys_designbox_0"><![CDATA[Content only]]></string>
@@ -3365,7 +3366,7 @@ More info about URI DNSBL: <br />
     <string name="_sys_txt_confirm_email_error_occured"><![CDATA[Error occured, please try to login to your account and resend verification email.]]></string>
     <string name="_sys_txt_confirm_email_success"><![CDATA[You email address was successfully confirmed.]]></string>
     <string name="_sys_txt_confirm_email_desc"><![CDATA[Please enter confirmation code which was sent to your email address, or just click confirmation link in the same email message.]]></string>
-    <string name="_sys_txt_confirm_email_sent"><![CDATA[Email verification letter was send, please check your inbox.]]></string>
+    <string name="_sys_txt_confirm_email_sent"><![CDATA[Email verification letter was sent, please check your inbox.]]></string>
     <string name="_sys_txt_confirm_email_sent_failed"><![CDATA[Error occured, please report error to site administrator.]]></string>
     <string name="_sys_txt_confirm_email_already_confirmed"><![CDATA[Your email address is already confirmed.]]></string>
     <string name="_sys_txt_unsubscribe_wrong_link"><![CDATA[Unsubscribe link is wrong.]]></string>

+ 3 - 9
modules/boonex/notes/classes/BxNotesMenuViewNote.php

@@ -31,12 +31,6 @@ class BxNotesMenuViewNote extends BxTemplMenu {
             $this->addMarkers(array('content_id' => $this->_aContentInfo['id']));
     }
 
-    public function getCode () {
-        if (!bx_get_logged_profile_id())
-            return false;
-        return parent::getCode ();
-    }
-
     /**
      * Check if menu items is visible.
      * @param $a menu item array
@@ -46,9 +40,9 @@ class BxNotesMenuViewNote extends BxTemplMenu {
 
         $iProfileId = bx_get_logged_profile_id();
 
-        // all links are visible for owner
-        if ($this->_aContentInfo['author'] == $iProfileId)
-            return true;
+        // don't show current item, also this will solve problem when only one view note item is visible
+        if ('bx_notes_view' == $this->_sObject && $this->_isSelected($a))
+            return false;
 
         $sFuncCheckAccess = false;
         switch ($a['name']) {

+ 2 - 2
modules/boonex/notes/classes/BxNotesModule.php

@@ -129,7 +129,7 @@ class BxNotesModule extends BxDolModule {
         }
 
         bx_import('BxTemplSocialSharing');
-        return BxTemplSocialSharing::getInstance()->getCode($sUrl, $aContentInfo['title'], $aCustomParams);
+        return BxTemplSocialSharing::getInstance()->getCode(BX_DOL_URL_ROOT . $sUrl, $aContentInfo['title'], $aCustomParams);
     }
 
     public function serviceEntityComments ($iContentId = 0) {
@@ -159,7 +159,7 @@ class BxNotesModule extends BxDolModule {
             bx_import('BxDolProfileUndefined');
             $oProfile = BxDolProfileUndefined::getInstance();
         }
-        return $oProfile->getUnit();
+        return $this->_oTemplate->entryAuthor ($aContentInfo, $oProfile);
     }
 
     // ====== ACTION METHODS

+ 12 - 0
modules/boonex/notes/classes/BxNotesTemplate.php

@@ -86,6 +86,18 @@ class BxNotesTemplate extends BxDolModuleTemplate {
         return $this->parseHtmlByName($sTemplateName, $aVars);
     }
 
+    function entryAuthor ($aData, $oProfile, $sTemplateName = 'author.html') {
+        if (!$oProfile)
+            return '';
+        $aVars = array (
+            'author_url' => $oProfile->getUrl(),
+            'author_thumb_url' => $oProfile->getThumb(),
+            'author_title' => $oProfile->getDisplayName(),
+            'entry_posting_date' => defineTimeInterval($aData['added']),
+        );
+        return $this->parseHtmlByName($sTemplateName, $aVars);
+    }
+
 }
 
 /** @} */ 

+ 1 - 1
modules/boonex/notes/install/langs/en.xml

@@ -47,7 +47,7 @@
     <string name="_bx_notes_page_block_title_delete_note"><![CDATA[Delete Note]]></string>
 	<string name="_bx_notes_page_title_sys_view_note"><![CDATA[View Note]]></string>
 	<string name="_bx_notes_page_title_view_note"><![CDATA[{title}]]></string>
-	<string name="_bx_notes_page_block_title_note_text"><![CDATA[{title}]]></string>
+	<string name="_bx_notes_page_block_title_note_text"><![CDATA[Note Text]]></string>
 	<string name="_bx_notes_page_block_title_note_menu"><![CDATA[Note Menu]]></string>
 	<string name="_bx_notes_page_title_browse"><![CDATA[Notes]]></string>
 	<string name="_bx_notes_page_title_search_results"><![CDATA[Notes matching "{0}"]]></string>

+ 7 - 6
modules/boonex/notes/install/sql/enable.sql

@@ -65,11 +65,12 @@ INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designb
 INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
 ('bx_notes_view_note', '_bx_notes_page_title_sys_view_note', '_bx_notes_page_title_view_note', 'bx_notes', 6, 2147483647, 1, 'view-note', '', '', '', '', 0, 1, 0, 'BxNotesPageNote', 'modules/boonex/notes/classes/BxNotesPageNote.php');
 
-INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
-('bx_notes_view_note', 1, 'bx_notes', '_bx_notes_page_block_title_note_text', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:8:"bx_notes";s:6:"method";s:17:"entity_text_block";}', 0, 0, 0),
-('bx_notes_view_note', 2, 'bx_notes', '_bx_notes_page_block_title_note_social_sharing', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:8:"bx_notes";s:6:"method";s:21:"entity_social_sharing";}', 0, 0, 1),
-('bx_notes_view_note', 2, 'bx_notes', '_bx_notes_page_block_title_note_author', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:8:"bx_notes";s:6:"method";s:13:"entity_author";}', 0, 0, 0),
-('bx_notes_view_note', 3, 'bx_notes', '_bx_notes_page_block_title_note_comments', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:8:"bx_notes";s:6:"method";s:15:"entity_comments";}', 0, 0, 0);
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_notes_view_note', 1, 'bx_notes', '_bx_notes_page_block_title_note_author', 0, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_notes\";s:6:\"method\";s:13:\"entity_author\";}', 0, 0, 0),
+('bx_notes_view_note', 1, 'bx_notes', '_bx_notes_page_block_title_note_text', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_notes\";s:6:\"method\";s:17:\"entity_text_block\";}', 0, 0, 1),
+('bx_notes_view_note', 1, 'bx_notes', '_bx_notes_page_block_title_note_social_sharing', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_notes\";s:6:\"method\";s:21:\"entity_social_sharing\";}', 0, 0, 2),
+('bx_notes_view_note', 1, 'bx_notes', '_bx_notes_page_block_title_note_comments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_notes\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 3);
+
 
 --
 -- Dumping data for 'bx_notes_view_note_comments' page
@@ -114,7 +115,7 @@ INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `tit
 -- Dumping data for 'bx_notes_view' menu
 --
 INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
-('bx_notes_view', '_bx_notes_menu_title_view_note', 'bx_notes_view', 'bx_notes', 4, 0, 1, 'BxNotesMenuViewNote', 'modules/boonex/notes/classes/BxNotesMenuViewNote.php');
+('bx_notes_view', '_bx_notes_menu_title_view_note', 'bx_notes_view', 'bx_notes', 10, 0, 1, 'BxNotesMenuViewNote', 'modules/boonex/notes/classes/BxNotesMenuViewNote.php');
 
 INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
 ('bx_notes_view', 'bx_notes', '_bx_notes_menu_set_title_view_note', 0);

+ 5 - 0
modules/boonex/notes/template/author.html

@@ -0,0 +1,5 @@
+
+<div class="bx-notes-author">
+    <a href="__author_url__"><img class="bx-def-thumb bx-def-thumb-size" src="__author_thumb_url__" /></a><div class="bx-def-thumb-size-max-height bx-def-padding-left"><a href="__author_url__">__author_title__</a> <span class="bullet">&#183;</span> __entry_posting_date__</div>
+</div>
+

+ 20 - 4
modules/boonex/notes/template/css/main.css

@@ -15,9 +15,25 @@
     float:right;
 }
 
-/* enity view */
+/* author block */
 
-.bx-notes-entity-content > p {
-    max-width:95% !important;
-    overflow:scroll !important;
+.bx-notes-author {
 }
+
+.bx-notes-author img {
+    display:inline;
+    display:inline-block;
+
+    vertical-align:middle;
+}
+
+.bx-notes-author div {
+    display:inline;
+    display:inline-block;
+    
+    text-overflow:ellipsis;
+    overflow:hidden;
+
+    vertical-align:middle;
+}
+

+ 7 - 0
template/_header.html

@@ -24,7 +24,9 @@
 
     <bx_include_js />
     <script type="text/javascript" language="javascript">
+
         var sUrlRoot = '<bx_url_root />';
+
         var aSpinnerOpts = {
             lines: 7, // The number of lines to draw
             length: 0, // The length of each line
@@ -51,6 +53,11 @@
             top: 'auto',
             left: 'auto'
         }); 
+
+        $(document).ready(function () {
+            $('#bx-toolbar').css({opacity: 1});
+        });
+
     </script>
     __extra_js__
 

+ 2 - 2
template/_sub_footer.html

@@ -15,7 +15,7 @@
 
 <hr class="bx-def-hr" />
 
-<div class="bx-page-wrapper bx-def-page-width bx-def-padding-sec-left bx-def-padding-sec-right bx-def-padding-bottom">
+<div class="bx-page-wrapper bx-def-page-width bx-def-padding-sec-left bx-def-padding-sec-right">
 
     <div id="bx-footer">
 
@@ -41,7 +41,7 @@
     __boonex_footers__
 </div>
 
-
+<bx_menu:sys_site_action />
 
 <bx_include_auto:_footer.html />
 

+ 0 - 1
template/_sub_header.html

@@ -52,7 +52,6 @@
 
             <div id="bx-menu-main-container" class="bx-clearfix"> 
                 <bx_menu:sys_site_submenu />
-                <bx_menu:sys_site_action />
             </div>
 
             <bx_injection:injection_top_menu_after />

+ 2 - 2
template/comment.html

@@ -1,5 +1,5 @@
 <li id="cmt__id__" class="__style_prefix____class__">
-	<a name="__system____id__"></a>
+	<a id="__system____id__" class="bx-anchor-invisible">&nbsp;</a>
 	<div class="__style_prefix__-author">
 		<div class="__style_prefix__-icon bx-def-icon bx-def-icon-size">
 			<bx_if:show_icon>
@@ -43,4 +43,4 @@
 	</div>
 	__actions__
 	<ul class="cmts cmts-margin">__replies__</ul>
-</li>
+</li>

+ 14 - 3
template/css/common.css

@@ -44,12 +44,23 @@ blockquote {
     clear:both;
 }
 
-/* --------------- design boxes */
-
-.bx-db-container {
+.bx-anchor-invisible,
+.bx-anchor {
+    padding-top:60px;
+    margin-top:-60px;
+    -webkit-background-clip:content-box;
+    background-clip:content-box;
+}
+.bx-anchor-invisible {
+    display:block;
+    display:inline-block;
+    height:0px;
+    width:0px;
     overflow:hidden;
 }
 
+/* --------------- design boxes */
+
 .bx-db-title {
     display:inline-block;
     float:left;

+ 16 - 9
template/css/default.css

@@ -201,7 +201,7 @@
 
 /* colors */
 .bx-def-color-bg-page {
-    background-color:blue;
+    background-color:#f3f4fa;
     background-image:url(../images/bg-page.png);
 }
 .bx-def-color-bg-block {
@@ -218,18 +218,10 @@
 .bx-def-color-bg-hl-hover:hover {
     background-color: rgb(220, 220, 255);
     background-color: rgba(200, 200, 255, 0.2);
-
-    -moz-box-shadow: inset 0px 0px -1px 0px rgba(200, 200, 255, 0.2);
-    -webkit-box-shadow: inset 0px 0px -1px 0px rgba(200, 200, 255, 0.2);
-    box-shadow: inset 0px 0px -1px 0px rgba(200, 200, 255, 0.2);
 }
 
 .bx-def-color-bg-active {
     background-color: rgba(255, 234, 193, 0.5);
-
-    -moz-box-shadow: inset 0px 0px -1px 0px rgba(255, 234, 193, 0.5);
-    -webkit-box-shadow: inset 0px 0px -1px 0px rgba(255, 234, 193, 0.5);
-    box-shadow: inset 0px 0px -1px 0px rgba(255, 234, 193, 0.5);
 }
 
 /* hr */
@@ -320,6 +312,21 @@
 	-webkit-border-radius:3px;	
 }
 
+/* circle */
+.bx-def-circle {
+    background-color:#fff;
+    border:2px solid #fff;
+    border-radius:50%;
+	-moz-border-radius:50%;
+	-webkit-border-radius:50%;
+
+    -webkit-box-shadow: 0 1px 3px rgba(51, 51, 51, 0.5);
+    -moz-box-shadow: 0 1px 3px rgba(51, 51, 51, 0.5);
+    box-shadow: 0 0px 2px rgba(51, 51, 51, 0.5);
+
+    overflow:hidden;
+}
+
 /* fonts */
 
 /* NOTE: bx-def-font, h1, h2, h3 styles were copied to editor.css */

+ 12 - 2
template/css/general.css

@@ -21,6 +21,11 @@
     -moz-box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.8);
     -webkit-box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.8);
     box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.8);
+
+    opacity:0;
+
+    transition: opacity .3s;
+    -webkit-transition: opacity .3s;
 }
 
 #bx-toolbar-content {
@@ -82,13 +87,18 @@
 
 /* --------------- footer */
 
+#bx-footer {
+    margin-bottom:60px;
+}
+
 #bx-footer-copyright {
     float:right;
 }
 
 /* --------------- social buttons */
 
-.bx-social-sharing .bx-social-sharing-btn:first-child {
-    margin-top:0;
+.bx-social-sharing .bx-social-sharing-btn {
+    width:150px;
+    float:left;
 }
 

+ 99 - 31
template/css/menu.css

@@ -163,37 +163,6 @@ ul.bx-menu-main {
     color:#000;
 }
 
-
-/* --------------- action menu */
-
-#bx-menu-action {
-    float:right;
-}
-
-ul.bx-menu-action {
-    padding:0;
-    margin:0;
-    list-style:none;
-    line-height:39px;
-}
-.bx-menu-action li {
-    float:left;
-    margin:0;
-}
-.bx-menu-action li a {
-    text-decoration:none;
-    line-height:normal;
-}
-.bx-menu-action li .sys-icon {
-    display:inline-block;
-    width:24px;
-    height:24px;
-    font-size:24px;
-    text-align:center;
-    vertical-align:middle;
-}
-
-
 /* --------------- toolbar menu */
 
 #bx-popup-ajax-wrapper-sys_site .bx-popup-content-wrapped {
@@ -342,6 +311,105 @@ ul.bx-menu-floating-blocks {
 }
 
 
+/* --------------- floating circles menu */
+
+ul.bx-menu-floating-circles {
+    padding:0;
+    margin:0;
+    list-style:none;    
+}
+
+.bx-menu-floating-circles li {
+    display:inline;
+    display:inline-block;
+    width:44px;
+    height:44px;
+    vertical-align:top;
+    opacity:0.8;
+}
+
+.bx-menu-floating-circles li:hover,
+.bx-menu-floating-circles li:active {
+    opacity:1.0;
+}
+
+.bx-menu-floating-circles li a {
+    display:block;
+    width:100%;
+    height:100%;
+    text-decoration:none;
+}
+
+.bx-menu-floating-circles li .sys-icon {
+    display:block;
+    padding:10px;
+    width:24px;
+    height:24px;
+    line-height:24px;
+    font-size:24px;
+    text-align:center;
+    vertical-align:middle;
+}
+
+.bx-menu-floating-circles li img {
+    width:100%;
+    height:100%;
+    background-position:center center;
+    background-repeat:no-repeat;
+}
+
+/* --------------- action menu */
+
+.bx-menu-action-wrapper {
+    position:fixed; 
+    height:44px; 
+    bottom:0px; 
+    right:-5px;
+    z-index:910;
+}
+
+.bx-menu-action-buttons,
+.bx-menu-action {
+    position:relative;
+    float:right;
+}
+
+ul.bx-menu-action {
+    padding:0;
+    margin-top:20px;
+    list-style:none;
+}
+.bx-menu-action li {
+    float:left;
+    margin:0;
+}
+.bx-menu-action li a {
+    display:block;
+    text-decoration:none;
+    line-height:normal;
+
+    transform:rotate(180deg);
+    -ms-transform:rotate(180deg);
+    -webkit-transform:rotate(180deg);
+
+    transition: transform .5s;
+    -webkit-transition: -webkit-transform .5s;
+}
+.bx-menu-action li a.bx-menu-action-hidden {
+    transform:rotate(0deg);
+    -ms-transform:rotate(0deg);
+    -webkit-transform:rotate(0deg);
+}
+
+.bx-menu-action li .sys-icon {
+    display:inline-block;
+    width:24px;
+    height:24px;
+    font-size:24px;
+    text-align:center;
+    vertical-align:middle;
+}
+
 /* --------------- interactive block menu */
 ul.bx-menu-inter,
 ul.bx-menu-inter-vert {

+ 0 - 1
template/css/page_layouts.css

@@ -3,7 +3,6 @@
 
 .bx-layout-col {
     float:left;
-    overflow:hidden;
 }
 
 /* layout 1 column */

+ 1 - 3
template/designbox_0.html

@@ -1,7 +1,5 @@
 
 <!-- Design Box 0 [start] -->
-<div class="bx-def-margin-bottom bx-clearfix">
-    __designbox_content__
-</div>
+__designbox_content__
 <!-- Design Box 0 [ end ] -->
 

+ 31 - 6
template/menu_action.html

@@ -1,7 +1,32 @@
-<ul id="bx-menu-action" class="bx-menu-action bx-menu-object-__object__ bx-def-font-h3 bx-clearfix">
-    <bx_repeat:menu_items>
-        <li class="bx-def-padding-sec-right bx-def-padding-sec-left __class_add__"><a href="__link__" target="__target__" onclick="__onclick__"><i class="sys-icon __icon__"></i>__title__</a></li>
-    </bx_repeat:menu_items>
-</ul>
+<div class="bx-menu-action-wrapper bx-clearfix">
+    <ul id="bx-menu-action" class="bx-menu-action bx-menu-object-__object__ bx-def-font-h3 bx-def-margin-sec-left bx-clearfix">
+        <bx_repeat:menu_items>
+            <li class="bx-def-circle __class_add__"><a class="bx-menu-action-toggle" href="__link__" target="__target__" onclick="__onclick__"><i class="sys-icon __icon__"></i><span>__title__</span></a></li>
+        </bx_repeat:menu_items>
+    </ul>
+    <div class="bx-menu-action-buttons">
+        __buttons__
+    </div>
+</div>
+<script language="javascript">
+    var sBxMenuActionHide = 'bx-menu-action-hide-__buttons_object__';
 
-<div id="bx-menu-action-popup-__object__" style="display:none">__popup__</div>
+    $(document).ready(function () {
+        if ($.cookie(sBxMenuActionHide))
+            bx_menu_action_toggle($('.bx-menu-action-toggle'), true);
+    });
+
+    function bx_menu_action_toggle (e, bForceHide) {
+        if ($('.bx-menu-action-buttons').is(':visible') || ('undefined' != typeof(bForceHide) && bForceHide)) {
+            $(e).addClass('bx-menu-action-hidden');
+            $('.bx-menu-action-buttons').animate({left:'100%', opacity:0}, bForceHide ? 0 : 1000, 'easeInOutCubic', function () {
+                $(this).hide();
+            });
+            $.cookie(sBxMenuActionHide, 1);
+        } else {
+            $(e).removeClass('bx-menu-action-hidden');
+            $('.bx-menu-action-buttons').show().animate({left:'0px', opacity:1}, 1000, 'easeInOutCubic');
+            $.removeCookie(sBxMenuActionHide);
+        }
+    }
+</script>

+ 18 - 0
template/menu_floating_circles.html

@@ -0,0 +1,18 @@
+<ul class="bx-menu-floating-circles bx-menu-object-__object__ bx-clearfix">
+    <bx_repeat:menu_items>
+        <li class="bx-def-circle bx-def-margin-sec-left __class_add__">
+            <a href="__link__" target="__target__" onclick="__onclick__" class="bx-def-color-bg-hl-hover">
+                    <div class="bx-menu-floating-circles-icon">
+                        <bx_if:icon><i class="sys-icon __icon__"></i></bx_if:icon>
+                        <bx_if:image><img style="background-image:url(__icon_url__)" src="<bx_icon_url:spacer.gif />" /></bx_if:image>
+                    </div>
+            </a>                
+        </li>                
+    </bx_repeat:menu_items>
+</ul>
+<script language="javascript">
+    $(document).ready(function () {
+        // add default class to active menu items
+        $('.bx-menu-floating-circles > li.bx-menu-tab-active').not('.bx-def-color-bg-active').addClass('bx-def-color-bg-active');
+    });
+</script>

+ 2 - 1
template/scripts/BxBaseMenuAction.php

@@ -43,7 +43,8 @@ class BxBaseMenuAction extends BxTemplMenu
         if (!$sMenu)
             return false;
 
-        $a['popup'] = BxTemplFunctions::getInstance()->transBox('<div class="bx-def-padding bx-def-color-bg-block">' . $sMenu . '</div>');
+        $a['buttons'] = $sMenu;
+        $a['buttons_object'] = $this->_sMenu;
         
         return $a;
     }

+ 1 - 1
template/scripts/BxBasePage.php

@@ -159,7 +159,7 @@ class BxBasePage extends BxDolPage {
      */ 
     protected function _selectMenu () {
         bx_import('BxDolMenu');
-        BxDolMenu::setSelected ($this->_aObject['module'], $this->_aObject['uri']); 
+        BxDolMenu::setSelectedGlobal ($this->_aObject['module'], $this->_aObject['uri']); 
     }
 
     /**

+ 7 - 1
template/scripts/BxBasePageAccount.php

@@ -67,7 +67,13 @@ class BxBasePageAccount extends BxTemplPage {
     protected function _getPageCacheParams () {
         return getLoggedId(); // cache is different for every account
     }
-    
+
+    protected function _getBlockCode($aBlock) {
+        $sAdd = '';
+        if ('service' == $aBlock['type'] && $aBlock['content'])
+            $sAdd = '<a id="top" class="bx-anchor-invisible">&nbsp;</a>';
+        return $sAdd . parent::_getBlockCode ($aBlock);
+    }
 }
 
 /** @} */

+ 2 - 2
template/social_sharing.html

@@ -1,8 +1,8 @@
 
-<div class="bx-social-sharing">
+<div class="bx-social-sharing bx-clearfix">
 
     <bx_repeat:buttons>
-        <div class="bx-social-sharing-btn bx-def-margin-sec-top">
+        <div class="bx-social-sharing-btn bx-def-margin-sec-bottom">
             __button__
         </div>
     </bx_repeat:buttons>