Просмотр исходного кода

Merge branch 'master' of github.com:unaio/una

Alex Trofimov 10 лет назад
Родитель
Сommit
1fa28c4190
52 измененных файлов с 2971 добавлено и 608 удалено
  1. 5 1
      modules/base/general/classes/BxBaseModGeneralModule.php
  2. 0 4
      modules/base/notifications/classes/BxBaseModNotificationsTemplate.php
  3. 1 1
      modules/base/text/template/author_link.html
  4. 4 0
      modules/base/text/template/css/main.css
  5. 1 0
      modules/boonex/albums/classes/BxAlbumsConfig.php
  6. 1 0
      modules/boonex/albums/install/langs/en.xml
  7. 1 1
      modules/boonex/english/data/langs/system/en.xml
  8. 1 0
      modules/boonex/events/classes/BxEventsConfig.php
  9. 1 0
      modules/boonex/events/install/langs/en.xml
  10. 1 0
      modules/boonex/forum/classes/BxForumConfig.php
  11. 1 0
      modules/boonex/forum/install/langs/en.xml
  12. 1 0
      modules/boonex/groups/classes/BxGroupsConfig.php
  13. 1 0
      modules/boonex/groups/install/langs/en.xml
  14. 1 0
      modules/boonex/market/classes/BxMarketConfig.php
  15. 2 1
      modules/boonex/market/install/langs/en.xml
  16. 5 2
      modules/boonex/market/template/css/main.css
  17. 1 1
      modules/boonex/market/template/snippet-date.html
  18. 1 1
      modules/boonex/market/template/unit_gallery.html
  19. 1 0
      modules/boonex/posts/classes/BxPostsConfig.php
  20. 1 0
      modules/boonex/posts/install/langs/en.xml
  21. 127 137
      modules/boonex/protean/install/sql/install.sql
  22. 1 0
      modules/boonex/russian/data/langs/bx_albums/ru.xml
  23. 1 0
      modules/boonex/russian/data/langs/bx_events/ru.xml
  24. 1 0
      modules/boonex/russian/data/langs/bx_forum/ru.xml
  25. 1 0
      modules/boonex/russian/data/langs/bx_groups/ru.xml
  26. 2 1
      modules/boonex/russian/data/langs/bx_market/ru.xml
  27. 1 0
      modules/boonex/russian/data/langs/bx_posts/ru.xml
  28. 11 5
      modules/boonex/russian/data/langs/bx_timeline/ru.xml
  29. 1 1
      modules/boonex/russian/data/langs/system/ru.xml
  30. 24 12
      modules/boonex/timeline/classes/BxTimelineConfig.php
  31. 2 2
      modules/boonex/timeline/classes/BxTimelineDb.php
  32. 4 5
      modules/boonex/timeline/classes/BxTimelineMenuItemActions.php
  33. 212 134
      modules/boonex/timeline/classes/BxTimelineModule.php
  34. 114 31
      modules/boonex/timeline/classes/BxTimelineTemplate.php
  35. 11 5
      modules/boonex/timeline/install/langs/en.xml
  36. 15 9
      modules/boonex/timeline/install/sql/enable.sql
  37. 94 13
      modules/boonex/timeline/js/main.js
  38. 60 15
      modules/boonex/timeline/js/post.js
  39. 10 0
      modules/boonex/timeline/js/share.js
  40. 282 124
      modules/boonex/timeline/js/view.js
  41. 6 9
      modules/boonex/timeline/template/block_view.html
  42. 232 0
      modules/boonex/timeline/template/css/view-media-desktop.css
  43. 10 0
      modules/boonex/timeline/template/css/view-media-tablet.css
  44. 171 29
      modules/boonex/timeline/template/css/view.css
  45. 3 0
      modules/boonex/timeline/template/divider.html
  46. 0 43
      modules/boonex/timeline/template/item.html
  47. 41 0
      modules/boonex/timeline/template/item_outline.html
  48. 45 0
      modules/boonex/timeline/template/item_timeline.html
  49. 1406 0
      plugins_public/modernizr.js
  50. 33 19
      studio/classes/BxDolStudioForm.php
  51. 8 2
      studio/classes/BxDolStudioLanguagesUtils.php
  52. 11 0
      template/css/common.css

+ 5 - 1
modules/base/general/classes/BxBaseModGeneralModule.php

@@ -468,6 +468,9 @@ class BxBaseModGeneralModule extends BxDolModule
 
         return array(
             'owner_id' => $aContentInfo[$CNF['FIELD_AUTHOR']],
+            'icon' => !empty($CNF['ICON']) ? $CNF['ICON'] : '',
+        	'sample' => isset($CNF['T']['txt_sample_single_with_article']) ? $CNF['T']['txt_sample_single_with_article'] : $CNF['T']['txt_sample_single'],
+    	    'sample_action' => isset($CNF['T']['txt_sample_single_action']) ? $CNF['T']['txt_sample_single_action'] : '',
             'content' => $this->_getContentForTimelinePost($aEvent, $aContentInfo), //a string to display or array to parse default template before displaying.
             'date' => $aContentInfo[$CNF['FIELD_ADDED']],
             'votes' => $aVotes,
@@ -747,7 +750,8 @@ class BxBaseModGeneralModule extends BxDolModule
         $aImages = $this->_getImagesForTimelinePost($aEvent, $aContentInfo, $sUrl);
 
     	return array(
-			'sample' => _t($CNF['T']['txt_sample_single']),
+    		'sample' => isset($CNF['T']['txt_sample_single_with_article']) ? $CNF['T']['txt_sample_single_with_article'] : $CNF['T']['txt_sample_single'],
+    	    'sample_action' => isset($CNF['T']['txt_sample_single_action']) ? $CNF['T']['txt_sample_single_action'] : '',
 			'url' => $sUrl,
 			'title' => isset($CNF['FIELD_TITLE']) && isset($aContentInfo[$CNF['FIELD_TITLE']]) ? $aContentInfo[$CNF['FIELD_TITLE']] : 
 			(isset($CNF['FIELD_TEXT']) && isset($aContentInfo[$CNF['FIELD_TEXT']]) ? strmaxtextlen($aContentInfo[$CNF['FIELD_TEXT']], 20, '...') : ''),

+ 0 - 4
modules/base/notifications/classes/BxBaseModNotificationsTemplate.php

@@ -34,10 +34,6 @@ class BxBaseModNotificationsTemplate extends BxBaseModGeneralTemplate
     {
         $oModule = $this->getModule();
 
-        $sBaseUri = $this->_oConfig->getBaseUri();
-        $sJsClass = $this->_oConfig->getJsClass($sType);
-        $sJsObject = $this->_oConfig->getJsObject($sType);
-
         $aParams = array_merge(array(
         	'iOwnerId' => $oModule->_iOwnerId,
             'sAnimationEffect' => $this->_oConfig->getAnimationEffect(),

+ 1 - 1
modules/base/text/template/author_link.html

@@ -1 +1 @@
-<a href="__href__" title="__title__">__content__</a><bx_if:show_account><span class="bx-def-font-small bx-def-font-grayed"><br />(<a href="__href__" title="__title__" target="_blank" class="bx-def-font-grayed">__content__</a>)</span></bx_if:show_account>
+<a class="bx-base-text-author" href="__href__" title="__title__">__content__</a><bx_if:show_account><span class="bx-def-font-small bx-def-font-grayed"><br />(<a href="__href__" title="__title__" target="_blank" class="bx-def-font-grayed">__content__</a>)</span></bx_if:show_account>

+ 4 - 0
modules/base/text/template/css/main.css

@@ -70,6 +70,10 @@ div.bx-base-text-breadcrumb i {
     text-overflow:ellipsis;
 }
 
+.bx-base-text-unit-date {
+    white-space: nowrap;
+}
+
 .bx-base-text-unit-gallery .bx-base-text-unit-no-thumb,
 .bx-base-text-unit-gallery .bx-base-text-unit-thumb {
     float:none;

+ 1 - 0
modules/boonex/albums/classes/BxAlbumsConfig.php

@@ -119,6 +119,7 @@ class BxAlbumsConfig extends BxBaseModTextConfig
             // some language keys
             'T' => array (
                 'txt_sample_single' => '_bx_albums_txt_sample_single',
+            	'txt_sample_single_with_article' => '_bx_albums_txt_sample_single_with_article',
             	'txt_sample_comment_single' => '_bx_albums_txt_sample_comment_single',
             	'txt_sample_vote_single' => '_bx_albums_txt_sample_vote_single',
                 'txt_media_single' => '_bx_albums_txt_media_single',

+ 1 - 0
modules/boonex/albums/install/langs/en.xml

@@ -176,6 +176,7 @@
 
     <string name="_bx_albums_txt_all_entries_by"><![CDATA[<a href="{0}">All Albums by {1} ({2})</a>]]></string>
     <string name="_bx_albums_txt_sample_single"><![CDATA[album]]></string>
+    <string name="_bx_albums_txt_sample_single_with_article"><![CDATA[an album]]></string>
     <string name="_bx_albums_txt_sample_comment_single"><![CDATA[album's comment]]></string>
     <string name="_bx_albums_txt_sample_vote_single"><![CDATA[album's vote]]></string>
     <string name="_bx_albums_txt_media_single"><![CDATA[image]]></string>

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

@@ -486,7 +486,7 @@
 	<string name="_adm_bp_err_page_title_system"><![CDATA[A name with at least 3 characters is required.]]></string>
 	<string name="_adm_bp_err_page_uri"><![CDATA[A unique URL with at least 3 characters is required.]]></string>
 	<string name="_adm_bp_err_page_visible_for_levels"><![CDATA[Visibility setting are determined by custom code or not applicable here.]]></string>
-	<string name="_adm_bp_err_save"><![CDATA[Cannot save]]></string>
+	<string name="_adm_bp_err_save"><![CDATA[Cannot save or nothing was changed.]]></string>
 	<string name="_adm_bp_mi_page_cache"><![CDATA[Cache]]></string>
 	<string name="_adm_bp_mi_page_cover"><![CDATA[Cover]]></string>
 	<string name="_adm_bp_mi_page_layout"><![CDATA[Layout]]></string>

+ 1 - 0
modules/boonex/events/classes/BxEventsConfig.php

@@ -137,6 +137,7 @@ class BxEventsConfig extends BxBaseModProfileConfig
             // some language keys
             'T' => array (
                 'txt_sample_single' => '_bx_events_txt_sample_single',
+            	'txt_sample_single_with_article' => '_bx_events_txt_sample_single_with_article',
                 'txt_sample_vote_single' => '_bx_events_txt_sample_vote_single',
                 'txt_private_group' => '_bx_events_txt_private_group',
                 'txt_N_fans' => '_bx_events_txt_N_fans',

+ 1 - 0
modules/boonex/events/install/langs/en.xml

@@ -231,6 +231,7 @@
     <string name="_bx_events_txt_account_suspended"><![CDATA[This event is suspended.]]></string>
     <string name="_bx_events_txt_N_fans"><![CDATA[{0} members]]></string>
     <string name="_bx_events_txt_sample_single"><![CDATA[event]]></string>
+    <string name="_bx_events_txt_sample_single_with_article"><![CDATA[an event]]></string>
     <string name="_bx_events_txt_sample_vote_single"><![CDATA[event's vote]]></string>
     <string name="_bx_events_txt_to_admins"><![CDATA[To Admins]]></string>
     <string name="_bx_events_txt_from_admins"><![CDATA[From Admins]]></string>

+ 1 - 0
modules/boonex/forum/classes/BxForumConfig.php

@@ -126,6 +126,7 @@ class BxForumConfig extends BxBaseModTextConfig
             // some language keys
             'T' => array (
                 'txt_sample_single' => '_bx_forum_txt_sample_single',
+            	'txt_sample_single_with_article' => '_bx_forum_txt_sample_single_with_article',
             	'txt_sample_comment_single' => '_bx_forum_txt_sample_comment_single',
             	'grid_action_err_delete' => '_bx_forum_grid_action_err_delete',
             	'grid_txt_account_manager' => '_bx_forum_grid_txt_account_manager',

+ 1 - 0
modules/boonex/forum/install/langs/en.xml

@@ -248,6 +248,7 @@
 	<string name="_bx_forum_txt_entry_sticked"><![CDATA[Pinned discussion]]></string>
     <string name="_bx_forum_txt_sample_comment_single"><![CDATA[discussion's comment]]></string>
     <string name="_bx_forum_txt_sample_single"><![CDATA[discussion]]></string>
+    <string name="_bx_forum_txt_sample_single_with_article"><![CDATA[a discussion]]></string>
     <string name="_bx_forum_x_date_by_x_replier"><![CDATA[{0} by {1}]]></string>
     <string name="_bx_forum_you_are_last_replier"><![CDATA[You are last replier]]></string>
     

+ 1 - 0
modules/boonex/groups/classes/BxGroupsConfig.php

@@ -136,6 +136,7 @@ class BxGroupsConfig extends BxBaseModProfileConfig
             // some language keys
             'T' => array (
                 'txt_sample_single' => '_bx_groups_txt_sample_single',
+            	'txt_sample_single_with_article' => '_bx_groups_txt_sample_single_with_article',
                 'txt_sample_vote_single' => '_bx_groups_txt_sample_vote_single',
                 'txt_private_group' => '_bx_groups_txt_private_group',
                 'txt_N_fans' => '_bx_groups_txt_N_fans',

+ 1 - 0
modules/boonex/groups/install/langs/en.xml

@@ -205,6 +205,7 @@
     <string name="_bx_groups_txt_account_suspended"><![CDATA[This group is suspended.]]></string>
     <string name="_bx_groups_txt_N_fans"><![CDATA[{0} members]]></string>
     <string name="_bx_groups_txt_sample_single"><![CDATA[group]]></string>
+    <string name="_bx_groups_txt_sample_single_with_article"><![CDATA[a group]]></string>
     <string name="_bx_groups_txt_sample_vote_single"><![CDATA[group's vote]]></string>
     <string name="_bx_groups_txt_to_admins"><![CDATA[To Admins]]></string>
     <string name="_bx_groups_txt_from_admins"><![CDATA[From Admins]]></string>

+ 1 - 0
modules/boonex/market/classes/BxMarketConfig.php

@@ -147,6 +147,7 @@ class BxMarketConfig extends BxBaseModTextConfig
             // some language keys
             'T' => array (
                 'txt_sample_single' => '_bx_market_txt_sample_single',
+            	'txt_sample_single_with_article' => '_bx_market_txt_sample_single_with_article',
             	'txt_sample_comment_single' => '_bx_market_txt_sample_comment_single',
             	'txt_sample_vote_single' => '_bx_market_txt_sample_vote_single',
             	'grid_action_err_delete' => '_bx_market_grid_action_err_delete',

+ 2 - 1
modules/boonex/market/install/langs/en.xml

@@ -319,9 +319,10 @@
     <string name="_bx_market_txt_category"><![CDATA[Category:]]></string>
     <string name="_bx_market_txt_most_current_version"><![CDATA[The most current version]]></string>
     <string name="_bx_market_txt_sample_single"><![CDATA[product]]></string>
+    <string name="_bx_market_txt_sample_single_with_article"><![CDATA[a product]]></string>
     <string name="_bx_market_txt_sample_comment_single"><![CDATA[product's comment]]></string>
     <string name="_bx_market_txt_sample_vote_single"><![CDATA[product's vote]]></string>
-    <string name="_bx_market_txt_author_added_product"><![CDATA[{0} added a product {1}]]></string>
+    <string name="_bx_market_txt_author_added_product"><![CDATA[{0} {1}]]></string>
     <string name="_bx_market_txt_joined"><![CDATA[Joined:]]></string>
     <string name="_bx_market_txt_last_active"><![CDATA[Last Active:]]></string>
     <string name="_bx_market_txt_price_single"><![CDATA[Buy for {0}{1}]]></string>

+ 5 - 2
modules/boonex/market/template/css/main.css

@@ -30,8 +30,11 @@ div.bx-market-unit-author-info {
 	margin-right: 32px;
 	margin-right: 2rem;
 }
-div.bx-market-unit-author-name a {
-    font-weight: 600;
+div.bx-market-unit-author-name a.bx-base-text-author {
+	padding-right: 10px;
+	padding-right: 0.625rem;
+
+    font-weight: 700;
 }
 
 /*+++ Item Actions +++*/

+ 1 - 1
modules/boonex/market/template/snippet-date.html

@@ -1 +1 @@
-<span class="bx-def-font-grayed">&#183;</span>&nbsp;__date__
+<span class="bx-base-text-unit-date bx-def-font-small">__date__</span>

+ 1 - 1
modules/boonex/market/template/unit_gallery.html

@@ -11,7 +11,7 @@
 		            </bx_if:show_author_icon_empty>
 		        </div>
 		        <div class="bx-market-unit-author-info bx-def-thumb-size-min-height bx-def-thumb-size-left-indent">
-		            <div class="bx-market-unit-author-name bx-def-font-light bx-def-font-grayed">__author_width_date__</div>
+		            <div class="bx-market-unit-author-name bx-def-font-middle bx-def-font-light bx-def-font-grayed">__author_width_date__</div>
 		        </div>
 		        <div class="bx-market-unit-actions">__actions__</div>
             </div>

+ 1 - 0
modules/boonex/posts/classes/BxPostsConfig.php

@@ -103,6 +103,7 @@ class BxPostsConfig extends BxBaseModTextConfig
             // some language keys
             'T' => array (
                 'txt_sample_single' => '_bx_posts_txt_sample_single',
+            	'txt_sample_single_with_article' => '_bx_posts_txt_sample_single_with_article',
             	'txt_sample_comment_single' => '_bx_posts_txt_sample_comment_single',
             	'txt_sample_vote_single' => '_bx_posts_txt_sample_vote_single',
             	'grid_action_err_delete' => '_bx_posts_grid_action_err_delete',

+ 1 - 0
modules/boonex/posts/install/langs/en.xml

@@ -196,6 +196,7 @@
 
     <string name="_bx_posts_txt_all_entries_by"><![CDATA[<a href="{0}">All Posts by {1} ({2})</a>]]></string>
     <string name="_bx_posts_txt_sample_single"><![CDATA[post]]></string>
+    <string name="_bx_posts_txt_sample_single_with_article"><![CDATA[a post]]></string>
     <string name="_bx_posts_txt_sample_comment_single"><![CDATA[post's comment]]></string>
     <string name="_bx_posts_txt_sample_vote_single"><![CDATA[post's vote]]></string>
 </resources>

+ 127 - 137
modules/boonex/protean/install/sql/install.sql

@@ -21,7 +21,7 @@ INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALU
 SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
-(@iCategoryId, CONCAT(@sName, '_general_item_bg_color_hover'), '_bx_protean_stg_cpt_option_general_item_bg_color_hover', 'rgba(196, 248, 156, 0.2)', 'rgba', '', '', '', 1),
+(@iCategoryId, CONCAT(@sName, '_general_item_bg_color_hover'), '_bx_protean_stg_cpt_option_general_item_bg_color_hover', 'rgba(210, 230, 250, 0.3)', 'rgba', '', '', '', 1),
 (@iCategoryId, CONCAT(@sName, '_general_item_bg_color_active'), '_bx_protean_stg_cpt_option_general_item_bg_color_active', 'rgba(196, 248, 156, 0.4)', 'rgba', '', '', '', 2);
 
 
@@ -31,9 +31,9 @@ INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALU
 SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
-(@iCategoryId, CONCAT(@sName, '_header_height'), '_bx_protean_stg_cpt_option_header_height', '3rem', 'digit', '', '', '', 1),
-(@iCategoryId, CONCAT(@sName, '_header_content_padding'), '_bx_protean_stg_cpt_option_header_content_padding', '0px', 'digit', '', '', '', 2),
-(@iCategoryId, CONCAT(@sName, '_header_bg_color'), '_bx_protean_stg_cpt_option_header_bg_color', 'rgba(59, 134, 134, 1)', 'rgba', '', '', '', 3),
+(@iCategoryId, CONCAT(@sName, '_header_height'), '_bx_protean_stg_cpt_option_header_height', '4rem', 'digit', '', '', '', 1),
+(@iCategoryId, CONCAT(@sName, '_header_content_padding'), '_bx_protean_stg_cpt_option_header_content_padding', '0.5rem', 'digit', '', '', '', 2),
+(@iCategoryId, CONCAT(@sName, '_header_bg_color'), '_bx_protean_stg_cpt_option_header_bg_color', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 3),
 (@iCategoryId, CONCAT(@sName, '_header_bg_image'), '_bx_protean_stg_cpt_option_header_bg_image', '', 'image', '', '', '', 4),
 (@iCategoryId, CONCAT(@sName, '_header_bg_image_repeat'), '_bx_protean_stg_cpt_option_header_bg_image_repeat', 'no-repeat', 'select', 'no-repeat,repeat,repeat-x,repeat-y', '', '', 5),
 (@iCategoryId, CONCAT(@sName, '_header_bg_image_size'), '_bx_protean_stg_cpt_option_header_bg_image_size', 'cover', 'select', 'auto,cover,contain', '', '', 6),
@@ -41,13 +41,13 @@ INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `ex
 (@iCategoryId, CONCAT(@sName, '_site_logo_alt'), '_bx_protean_stg_cpt_option_site_logo_alt', '', 'text', '', '', '', 8),
 (@iCategoryId, CONCAT(@sName, '_site_logo_width'), '_bx_protean_stg_cpt_option_site_logo_width', '240', 'digit', '', '', '', 9),
 (@iCategoryId, CONCAT(@sName, '_site_logo_height'), '_bx_protean_stg_cpt_option_site_logo_height', '48', 'digit', '', '', '', 10),
-(@iCategoryId, CONCAT(@sName, '_header_border_color'), '_bx_protean_stg_cpt_option_header_border_color', 'rgba(208, 208, 208, 1)', 'rgba', '', '', '', 11),
-(@iCategoryId, CONCAT(@sName, '_header_border_size'), '_bx_protean_stg_cpt_option_header_border_size', '0px', 'digit', '', '', '', 12),
-(@iCategoryId, CONCAT(@sName, '_header_shadow'), '_bx_protean_stg_cpt_option_header_shadow', 'none', 'digit', '', '', '', 13),
-(@iCategoryId, CONCAT(@sName, '_header_icon_color'), '_bx_protean_stg_cpt_option_header_icon_color', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 14),
-(@iCategoryId, CONCAT(@sName, '_header_icon_color_hover'), '_bx_protean_stg_cpt_option_header_icon_color_hover', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 15),
-(@iCategoryId, CONCAT(@sName, '_header_link_color'), '_bx_protean_stg_cpt_option_header_link_color', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 16),
-(@iCategoryId, CONCAT(@sName, '_header_link_color_hover'), '_bx_protean_stg_cpt_option_header_link_color_hover', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 17);
+(@iCategoryId, CONCAT(@sName, '_header_border_color'), '_bx_protean_stg_cpt_option_header_border_color', 'rgba(0, 0, 0, 0.2)', 'rgba', '', '', '', 11),
+(@iCategoryId, CONCAT(@sName, '_header_border_size'), '_bx_protean_stg_cpt_option_header_border_size', '1px', 'digit', '', '', '', 12),
+(@iCategoryId, CONCAT(@sName, '_header_shadow'), '_bx_protean_stg_cpt_option_header_shadow', '0px 1px 3px 0px rgba(0, 0, 0, 0.05)', 'digit', '', '', '', 13),
+(@iCategoryId, CONCAT(@sName, '_header_icon_color'), '_bx_protean_stg_cpt_option_header_icon_color', 'rgba(30, 150, 250, 0.8)', 'rgba', '', '', '', 14),
+(@iCategoryId, CONCAT(@sName, '_header_icon_color_hover'), '_bx_protean_stg_cpt_option_header_icon_color_hover', 'rgba(30, 150, 250, 1)', 'rgba', '', '', '', 15),
+(@iCategoryId, CONCAT(@sName, '_header_link_color'), '_bx_protean_stg_cpt_option_header_link_color', 'rgba(30, 150, 250, 0.8)', 'rgba', '', '', '', 16),
+(@iCategoryId, CONCAT(@sName, '_header_link_color_hover'), '_bx_protean_stg_cpt_option_header_link_color_hover', 'rgba(30, 150, 250, 1)', 'rgba', '', '', '', 17);
 
 -- SETTINGS: Protean template Styles Footer
 INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALUES 
@@ -55,19 +55,19 @@ INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALU
 SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
-(@iCategoryId, CONCAT(@sName, '_footer_bg_color'), '_bx_protean_stg_cpt_option_footer_bg_color', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 1),
+(@iCategoryId, CONCAT(@sName, '_footer_bg_color'), '_bx_protean_stg_cpt_option_footer_bg_color', 'rgba(30, 150, 250, 0.5)', 'rgba', '', '', '', 1),
 (@iCategoryId, CONCAT(@sName, '_footer_bg_image'), '_bx_protean_stg_cpt_option_footer_bg_image', '', 'image', '', '', '', 2),
 (@iCategoryId, CONCAT(@sName, '_footer_bg_image_repeat'), '_bx_protean_stg_cpt_option_footer_bg_image_repeat', 'no-repeat', 'select', 'no-repeat,repeat,repeat-x,repeat-y', '', '', 3),
 (@iCategoryId, CONCAT(@sName, '_footer_bg_image_size'), '_bx_protean_stg_cpt_option_footer_bg_image_size', 'cover', 'select', 'auto,cover,contain', '', '', 4),
-(@iCategoryId, CONCAT(@sName, '_footer_content_padding'), '_bx_protean_stg_cpt_option_footer_content_padding', '0px', 'digit', '', '', '', 5),
-(@iCategoryId, CONCAT(@sName, '_footer_border_color'), '_bx_protean_stg_cpt_option_footer_border_color', 'rgba(208, 208, 208, 1)', 'rgba', '', '', '', 6),
+(@iCategoryId, CONCAT(@sName, '_footer_content_padding'), '_bx_protean_stg_cpt_option_footer_content_padding', '1rem', 'digit', '', '', '', 5),
+(@iCategoryId, CONCAT(@sName, '_footer_border_color'), '_bx_protean_stg_cpt_option_footer_border_color', 'rgba(0, 0, 0, 1)', 'rgba', '', '', '', 6),
 (@iCategoryId, CONCAT(@sName, '_footer_border_size'), '_bx_protean_stg_cpt_option_footer_border_size', '1px', 'digit', '', '', '', 7),
 (@iCategoryId, CONCAT(@sName, '_footer_shadow'), '_bx_protean_stg_cpt_option_footer_shadow', 'none', 'digit', '', '', '', 8),
-(@iCategoryId, CONCAT(@sName, '_footer_font_color'), '_bx_protean_stg_cpt_option_footer_font_color', 'rgba(51, 51, 51, 1)', 'rgba', '', '', '', 9),
-(@iCategoryId, CONCAT(@sName, '_footer_icon_color'), '_bx_protean_stg_cpt_option_footer_icon_color', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 10),
-(@iCategoryId, CONCAT(@sName, '_footer_icon_color_hover'), '_bx_protean_stg_cpt_option_footer_icon_color_hover', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 11),
-(@iCategoryId, CONCAT(@sName, '_footer_link_color'), '_bx_protean_stg_cpt_option_footer_link_color', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 12),
-(@iCategoryId, CONCAT(@sName, '_footer_link_color_hover'), '_bx_protean_stg_cpt_option_footer_link_color_hover', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 13);
+(@iCategoryId, CONCAT(@sName, '_footer_font_color'), '_bx_protean_stg_cpt_option_footer_font_color', 'rgba(40, 50, 60, 0.9)', 'rgba', '', '', '', 9),
+(@iCategoryId, CONCAT(@sName, '_footer_icon_color'), '_bx_protean_stg_cpt_option_footer_icon_color', 'rgba(10, 120, 220, 1)', 'rgba', '', '', '', 10),
+(@iCategoryId, CONCAT(@sName, '_footer_icon_color_hover'), '_bx_protean_stg_cpt_option_footer_icon_color_hover', 'rgba(10, 120, 220, 1)', 'rgba', '', '', '', 11),
+(@iCategoryId, CONCAT(@sName, '_footer_link_color'), '_bx_protean_stg_cpt_option_footer_link_color', 'rgba(10, 120, 220, 1)', 'rgba', '', '', '', 12),
+(@iCategoryId, CONCAT(@sName, '_footer_link_color_hover'), '_bx_protean_stg_cpt_option_footer_link_color_hover', 'rgba(10, 120, 220, 1)', 'rgba', '', '', '', 13);
 
 -- SETTINGS: Protean template Styles Body
 INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALUES 
@@ -75,15 +75,15 @@ INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALU
 SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
-(@iCategoryId, CONCAT(@sName, '_body_bg_color'), '_bx_protean_stg_cpt_option_body_bg_color', 'rgb(255, 255, 255)', 'rgb', '', '', '', 1),
+(@iCategoryId, CONCAT(@sName, '_body_bg_color'), '_bx_protean_stg_cpt_option_body_bg_color', 'rgb(230, 240, 250)', 'rgb', '', '', '', 1),
 (@iCategoryId, CONCAT(@sName, '_body_bg_image'), '_bx_protean_stg_cpt_option_body_bg_image', '', 'image', '', '', '', 2),
 (@iCategoryId, CONCAT(@sName, '_body_bg_image_repeat'), '_bx_protean_stg_cpt_option_body_bg_image_repeat', 'no-repeat', 'select', 'no-repeat,repeat,repeat-x,repeat-y', '', '', 3),
 (@iCategoryId, CONCAT(@sName, '_body_bg_image_size'), '_bx_protean_stg_cpt_option_body_bg_image_size', 'cover', 'select', 'auto,cover,contain', '', '', 4),
 (@iCategoryId, CONCAT(@sName, '_page_width'), '_bx_protean_stg_cpt_option_page_width', '1024', 'digit', '', '', '', 5),
-(@iCategoryId, CONCAT(@sName, '_body_icon_color'), '_bx_protean_stg_cpt_option_body_icon_color', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 6),
-(@iCategoryId, CONCAT(@sName, '_body_icon_color_hover'), '_bx_protean_stg_cpt_option_body_icon_color_hover', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 7),
-(@iCategoryId, CONCAT(@sName, '_body_link_color'), '_bx_protean_stg_cpt_option_body_link_color', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 8),
-(@iCategoryId, CONCAT(@sName, '_body_link_color_hover'), '_bx_protean_stg_cpt_option_body_link_color_hover', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 9);
+(@iCategoryId, CONCAT(@sName, '_body_icon_color'), '_bx_protean_stg_cpt_option_body_icon_color', 'rgba(30, 150, 250, 0.9)', 'rgba', '', '', '', 6),
+(@iCategoryId, CONCAT(@sName, '_body_icon_color_hover'), '_bx_protean_stg_cpt_option_body_icon_color_hover', 'rgba(30, 150, 250, 1)', 'rgba', '', '', '', 7),
+(@iCategoryId, CONCAT(@sName, '_body_link_color'), '_bx_protean_stg_cpt_option_body_link_color', 'rgba(30, 150, 250, 0.9)', 'rgba', '', '', '', 8),
+(@iCategoryId, CONCAT(@sName, '_body_link_color_hover'), '_bx_protean_stg_cpt_option_body_link_color_hover', 'rgba(30, 150, 250, 1)', 'rgba', '', '', '', 9);
 
 
 -- SETTINGS: Protean template Styles Cover
@@ -92,10 +92,10 @@ INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALU
 SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
-(@iCategoryId, CONCAT(@sName, '_cover_height'), '_bx_protean_stg_cpt_option_cover_height', '40vh', 'digit', '', '', '', 1),
+(@iCategoryId, CONCAT(@sName, '_cover_height'), '_bx_protean_stg_cpt_option_cover_height', '30vh', 'digit', '', '', '', 1),
 (@iCategoryId, CONCAT(@sName, '_cover_bg_color'), '_bx_protean_stg_cpt_option_cover_bg_color', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 2),
-(@iCategoryId, CONCAT(@sName, '_cover_content_padding'), '_bx_protean_stg_cpt_option_cover_content_padding', '20px 20px 20px 20px', 'digit', '', '', '', 3),
-(@iCategoryId, CONCAT(@sName, '_cover_border_color'), '_bx_protean_stg_cpt_option_cover_border_color', 'rgba(208, 208, 208, 1)', 'rgba', '', '', '', 4),
+(@iCategoryId, CONCAT(@sName, '_cover_content_padding'), '_bx_protean_stg_cpt_option_cover_content_padding', '2rem 3rem 2rem 3rem', 'digit', '', '', '', 3),
+(@iCategoryId, CONCAT(@sName, '_cover_border_color'), '_bx_protean_stg_cpt_option_cover_border_color', 'rgba(208, 208, 208, 0)', 'rgba', '', '', '', 4),
 (@iCategoryId, CONCAT(@sName, '_cover_border_size'), '_bx_protean_stg_cpt_option_cover_border_size', '0px', 'digit', '', '', '', 5),
 (@iCategoryId, CONCAT(@sName, '_cover_border_radius'), '_bx_protean_stg_cpt_option_cover_border_radius', '0px', 'digit', '', '', '', 6),
 (@iCategoryId, CONCAT(@sName, '_cover_shadow'), '_bx_protean_stg_cpt_option_cover_shadow', 'none', 'digit', '', '', '', 7),
@@ -103,9 +103,9 @@ INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `ex
 (@iCategoryId, CONCAT(@sName, '_cover_icon_border_size'), '_bx_protean_stg_cpt_option_cover_icon_border_size', '1px', 'digit', '', '', '', 9),
 (@iCategoryId, CONCAT(@sName, '_cover_icon_border_radius'), '_bx_protean_stg_cpt_option_cover_icon_border_radius', '3px', 'digit', '', '', '', 10),
 (@iCategoryId, CONCAT(@sName, '_cover_icon_shadow'), '_bx_protean_stg_cpt_option_cover_icon_shadow', 'none', 'digit', '', '', '', 11),
-(@iCategoryId, CONCAT(@sName, '_cover_text_align'), '_bx_protean_stg_cpt_option_cover_text_align', 'center', 'select', 'left,center,right', '', '', 12),
-(@iCategoryId, CONCAT(@sName, '_cover_text_shadow'), '_bx_protean_stg_cpt_option_cover_text_shadow', '-1px 0px 0px rgba(0, 0, 0, 0.3), 1px 0px 0px rgba(0, 0, 0, 0.3), 0px -1px 0px rgba(0, 0, 0, 0.3), 0px 1px 0px rgba(0, 0, 0, 0.3)', 'digit', '', '', '', 13),
-(@iCategoryId, CONCAT(@sName, '_cover_font_family'), '_bx_protean_stg_cpt_option_cover_font_family', 'Helvetica, Arial, sans-serif', 'digit', '', '', '', 14),
+(@iCategoryId, CONCAT(@sName, '_cover_text_align'), '_bx_protean_stg_cpt_option_cover_text_align', 'left', 'select', 'left,center,right', '', '', 12),
+(@iCategoryId, CONCAT(@sName, '_cover_text_shadow'), '_bx_protean_stg_cpt_option_cover_text_shadow', '0px 1px 3px rgba(0, 0, 0, .3)', 'digit', '', '', '', 13),
+(@iCategoryId, CONCAT(@sName, '_cover_font_family'), '_bx_protean_stg_cpt_option_cover_font_family', 'Arial, sans-serif', 'digit', '', '', '', 14),
 (@iCategoryId, CONCAT(@sName, '_cover_font_size'), '_bx_protean_stg_cpt_option_cover_font_size', '2.0rem', 'digit', '', '', '', 15),
 (@iCategoryId, CONCAT(@sName, '_cover_font_color'), '_bx_protean_stg_cpt_option_cover_font_color', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 16),
 (@iCategoryId, CONCAT(@sName, '_cover_font_weight'), '_bx_protean_stg_cpt_option_cover_font_weight', '700', 'digit', '', '', '', 17);
@@ -117,26 +117,26 @@ INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALU
 SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
-(@iCategoryId, CONCAT(@sName, '_block_bg_color'), '_bx_protean_stg_cpt_option_block_bg_color', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 1),
+(@iCategoryId, CONCAT(@sName, '_block_bg_color'), '_bx_protean_stg_cpt_option_block_bg_color', 'rgba(245, 250, 255, 0.9)', 'rgba', '', '', '', 1),
 (@iCategoryId, CONCAT(@sName, '_block_bg_image'), '_bx_protean_stg_cpt_option_block_bg_image', '', 'image', '', '', '', 2),
 (@iCategoryId, CONCAT(@sName, '_block_bg_image_repeat'), '_bx_protean_stg_cpt_option_block_bg_image_repeat', 'no-repeat', 'select', 'no-repeat,repeat,repeat-x,repeat-y', '', '', 3),
 (@iCategoryId, CONCAT(@sName, '_block_bg_image_size'), '_bx_protean_stg_cpt_option_block_bg_image_size', 'cover', 'select', 'auto,cover,contain', '', '', 4),
-(@iCategoryId, CONCAT(@sName, '_block_content_padding'), '_bx_protean_stg_cpt_option_block_content_padding', '20px 0px 0px 0px', 'digit', '', '', '', 5),
-(@iCategoryId, CONCAT(@sName, '_block_border_color'), '_bx_protean_stg_cpt_option_block_border_color', 'rgba(208, 208, 208, 1)', 'rgba', '', '', '', 6),
+(@iCategoryId, CONCAT(@sName, '_block_content_padding'), '_bx_protean_stg_cpt_option_block_content_padding', '1rem', 'digit', '', '', '', 5),
+(@iCategoryId, CONCAT(@sName, '_block_border_color'), '_bx_protean_stg_cpt_option_block_border_color', 'rgba(0, 0, 0, 0)', 'rgba', '', '', '', 6),
 (@iCategoryId, CONCAT(@sName, '_block_border_size'), '_bx_protean_stg_cpt_option_block_border_size', '0px', 'digit', '', '', '', 7),
-(@iCategoryId, CONCAT(@sName, '_block_border_radius'), '_bx_protean_stg_cpt_option_block_border_radius', '0px', 'digit', '', '', '', 8),
-(@iCategoryId, CONCAT(@sName, '_block_shadow'), '_bx_protean_stg_cpt_option_block_shadow', 'none', 'digit', '', '', '', 9),
-(@iCategoryId, CONCAT(@sName, '_block_title_bg_color'), '_bx_protean_stg_cpt_option_block_title_bg_color', 'rgba(255, 255, 255, 1.0)', 'rgba', '', '', '', 10),
-(@iCategoryId, CONCAT(@sName, '_block_title_padding'), '_bx_protean_stg_cpt_option_block_title_padding', '0px', 'digit', '', '', '', 11),
-(@iCategoryId, CONCAT(@sName, '_block_title_border_color'), '_bx_protean_stg_cpt_option_block_title_border_color', 'rgba(208, 208, 208, 1)', 'rgba', '', '', '', 12),
+(@iCategoryId, CONCAT(@sName, '_block_border_radius'), '_bx_protean_stg_cpt_option_block_border_radius', '3px', 'digit', '', '', '', 8),
+(@iCategoryId, CONCAT(@sName, '_block_shadow'), '_bx_protean_stg_cpt_option_block_shadow', '0px 1px 2px 0px rgba(0, 0, 0, 0.05);', 'digit', '', '', '', 9),
+(@iCategoryId, CONCAT(@sName, '_block_title_bg_color'), '_bx_protean_stg_cpt_option_block_title_bg_color', 'rgba(255, 255, 255, 0)', 'rgba', '', '', '', 10),
+(@iCategoryId, CONCAT(@sName, '_block_title_padding'), '_bx_protean_stg_cpt_option_block_title_padding', '0.3rem 1rem 0rem 1rem', 'digit', '', '', '', 11),
+(@iCategoryId, CONCAT(@sName, '_block_title_border_color'), '_bx_protean_stg_cpt_option_block_title_border_color', 'rgba(0, 0, 0, 0)', 'rgba', '', '', '', 12),
 (@iCategoryId, CONCAT(@sName, '_block_title_border_size'), '_bx_protean_stg_cpt_option_block_title_border_size', '0px', 'digit', '', '', '', 13),
 (@iCategoryId, CONCAT(@sName, '_block_title_border_radius'), '_bx_protean_stg_cpt_option_block_title_border_radius', '0px', 'digit', '', '', '', 14),
-(@iCategoryId, CONCAT(@sName, '_block_title_font_family'), '_bx_protean_stg_cpt_option_block_title_font_family', 'Helvetica, Arial, sans-serif', 'digit', '', '', '', 15),
-(@iCategoryId, CONCAT(@sName, '_block_title_font_size'), '_bx_protean_stg_cpt_option_block_title_font_size', '1.5rem', 'digit', '', '', '', 16),
-(@iCategoryId, CONCAT(@sName, '_block_title_font_color'), '_bx_protean_stg_cpt_option_block_title_font_color', 'rgba(0, 0, 20, 1)', 'rgba', '', '', '', 17),
-(@iCategoryId, CONCAT(@sName, '_block_title_font_weight'), '_bx_protean_stg_cpt_option_block_title_font_weight', '500', 'digit', '', '', '', 18),
-(@iCategoryId, CONCAT(@sName, '_block_title_div_height'), '_bx_protean_stg_cpt_option_block_title_div_height', '1px', 'digit', '', '', '', 19),
-(@iCategoryId, CONCAT(@sName, '_block_title_div_bg_color'), '_bx_protean_stg_cpt_option_block_title_div_bg_color', 'rgba(208, 208, 208, 1)', 'rgba', '', '', '', 20);
+(@iCategoryId, CONCAT(@sName, '_block_title_font_family'), '_bx_protean_stg_cpt_option_block_title_font_family', 'Arial, sans-serif', 'digit', '', '', '', 15),
+(@iCategoryId, CONCAT(@sName, '_block_title_font_size'), '_bx_protean_stg_cpt_option_block_title_font_size', '1rem', 'digit', '', '', '', 16),
+(@iCategoryId, CONCAT(@sName, '_block_title_font_color'), '_bx_protean_stg_cpt_option_block_title_font_color', 'rgba(40, 50, 60, 0.8)', 'rgba', '', '', '', 17),
+(@iCategoryId, CONCAT(@sName, '_block_title_font_weight'), '_bx_protean_stg_cpt_option_block_title_font_weight', '700', 'digit', '', '', '', 18),
+(@iCategoryId, CONCAT(@sName, '_block_title_div_height'), '_bx_protean_stg_cpt_option_block_title_div_height', '0px', 'digit', '', '', '', 19),
+(@iCategoryId, CONCAT(@sName, '_block_title_div_bg_color'), '_bx_protean_stg_cpt_option_block_title_div_bg_color', 'rgba(40, 60, 80, 0)', 'rgba', '', '', '', 20);
 
 
 -- SETTINGS: Protean template Styles Card
@@ -145,15 +145,15 @@ INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALU
 SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
-(@iCategoryId, CONCAT(@sName, '_card_bg_color'), '_bx_protean_stg_cpt_option_card_bg_color', 'rgba(242, 242, 242, 1)', 'rgba', '', '', '', 1),
+(@iCategoryId, CONCAT(@sName, '_card_bg_color'), '_bx_protean_stg_cpt_option_card_bg_color', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 1),
 (@iCategoryId, CONCAT(@sName, '_card_bg_image'), '_bx_protean_stg_cpt_option_card_bg_image', '', 'image', '', '', '', 2),
 (@iCategoryId, CONCAT(@sName, '_card_bg_image_repeat'), '_bx_protean_stg_cpt_option_card_bg_image_repeat', 'no-repeat', 'select', 'no-repeat,repeat,repeat-x,repeat-y', '', '', 3),
 (@iCategoryId, CONCAT(@sName, '_card_bg_image_size'), '_bx_protean_stg_cpt_option_card_bg_image_size', 'cover', 'select', 'auto,cover,contain', '', '', 4),
-(@iCategoryId, CONCAT(@sName, '_card_content_padding'), '_bx_protean_stg_cpt_option_card_content_padding', '20px', 'digit', '', '', '', 5),
-(@iCategoryId, CONCAT(@sName, '_card_border_color'), '_bx_protean_stg_cpt_option_card_border_color', 'rgba(208, 208, 208, 1)', 'rgba', '', '', '', 6),
-(@iCategoryId, CONCAT(@sName, '_card_border_size'), '_bx_protean_stg_cpt_option_card_border_size', '0px', 'digit', '', '', '', 7),
+(@iCategoryId, CONCAT(@sName, '_card_content_padding'), '_bx_protean_stg_cpt_option_card_content_padding', '1rem', 'digit', '', '', '', 5),
+(@iCategoryId, CONCAT(@sName, '_card_border_color'), '_bx_protean_stg_cpt_option_card_border_color', 'rgba(0, 0, 0, 0.1)', 'rgba', '', '', '', 6),
+(@iCategoryId, CONCAT(@sName, '_card_border_size'), '_bx_protean_stg_cpt_option_card_border_size', '1px', 'digit', '', '', '', 7),
 (@iCategoryId, CONCAT(@sName, '_card_border_radius'), '_bx_protean_stg_cpt_option_card_border_radius', '3px', 'digit', '', '', '', 8),
-(@iCategoryId, CONCAT(@sName, '_card_shadow'), '_bx_protean_stg_cpt_option_card_shadow', 'none', 'digit', '', '', '', 9);
+(@iCategoryId, CONCAT(@sName, '_card_shadow'), '_bx_protean_stg_cpt_option_card_shadow', '0px 1px 3px 0px rgba(0, 0, 0, 0.05)', 'digit', '', '', '', 9);
 
 
 -- SETTINGS: Protean template Styles Popups
@@ -167,15 +167,15 @@ INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `ex
 (@iCategoryId, CONCAT(@sName, '_popup_bg_image_repeat'), '_bx_protean_stg_cpt_option_popup_bg_image_repeat', 'no-repeat', 'select', 'no-repeat,repeat,repeat-x,repeat-y', '', '', 3),
 (@iCategoryId, CONCAT(@sName, '_popup_bg_image_size'), '_bx_protean_stg_cpt_option_popup_bg_image_size', 'cover', 'select', 'auto,cover,contain', '', '', 4),
 (@iCategoryId, CONCAT(@sName, '_popup_content_padding'), '_bx_protean_stg_cpt_option_popup_content_padding', '1.25rem', 'digit', '', '', '', 5),
-(@iCategoryId, CONCAT(@sName, '_popup_border_color'), '_bx_protean_stg_cpt_option_popup_border_color', 'rgba(56, 61, 102, 1)', 'rgba', '', '', '', 6),
+(@iCategoryId, CONCAT(@sName, '_popup_border_color'), '_bx_protean_stg_cpt_option_popup_border_color', 'rgba(0, 0, 0, 0.2)', 'rgba', '', '', '', 6),
 (@iCategoryId, CONCAT(@sName, '_popup_border_size'), '_bx_protean_stg_cpt_option_popup_border_size', '1px', 'digit', '', '', '', 7),
 (@iCategoryId, CONCAT(@sName, '_popup_border_radius'), '_bx_protean_stg_cpt_option_popup_border_radius', '3px', 'digit', '', '', '', 8),
-(@iCategoryId, CONCAT(@sName, '_popup_shadow'), '_bx_protean_stg_cpt_option_popup_shadow', 'none', 'digit', '', '', '', 9),
-(@iCategoryId, CONCAT(@sName, '_popup_title_bg_color'), '_bx_protean_stg_cpt_option_popup_title_bg_color', 'rgba(40, 60, 80, 0.9)', 'rgba', '', '', '', 10),
+(@iCategoryId, CONCAT(@sName, '_popup_shadow'), '_bx_protean_stg_cpt_option_popup_shadow', '0px 1px 5px 0px rgba(0, 0, 0, 0.05)', 'digit', '', '', '', 9),
+(@iCategoryId, CONCAT(@sName, '_popup_title_bg_color'), '_bx_protean_stg_cpt_option_popup_title_bg_color', 'rgba(230, 240, 250, 0.9)', 'rgba', '', '', '', 10),
 (@iCategoryId, CONCAT(@sName, '_popup_title_padding'), '_bx_protean_stg_cpt_option_popup_title_padding', '1.25rem', 'digit', '', '', '', 11),
-(@iCategoryId, CONCAT(@sName, '_popup_title_font_family'), '_bx_protean_stg_cpt_option_popup_title_font_family', 'Helvetica, Arial, sans-serif', 'digit', '', '', '', 12),
-(@iCategoryId, CONCAT(@sName, '_popup_title_font_size'), '_bx_protean_stg_cpt_option_popup_title_font_size', '1.5rem', 'digit', '', '', '', 13),
-(@iCategoryId, CONCAT(@sName, '_popup_title_font_color'), '_bx_protean_stg_cpt_option_popup_title_font_color', 'rgba(255, 255, 255, 1.0)', 'rgba', '', '', '', 14);
+(@iCategoryId, CONCAT(@sName, '_popup_title_font_family'), '_bx_protean_stg_cpt_option_popup_title_font_family', 'Arial, sans-serif', 'digit', '', '', '', 12),
+(@iCategoryId, CONCAT(@sName, '_popup_title_font_size'), '_bx_protean_stg_cpt_option_popup_title_font_size', '1rem', 'digit', '', '', '', 13),
+(@iCategoryId, CONCAT(@sName, '_popup_title_font_color'), '_bx_protean_stg_cpt_option_popup_title_font_color', 'rgba(40, 50, 60, 0.9)', 'rgba', '', '', '', 14);
 
 
 -- SETTINGS: Protean template Styles Main Menu
@@ -189,16 +189,16 @@ INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `ex
 (@iCategoryId, CONCAT(@sName, '_menu_main_bg_image_repeat'), '_bx_protean_stg_cpt_option_menu_main_bg_image_repeat', 'no-repeat', 'select', 'no-repeat,repeat,repeat-x,repeat-y', '', '', 3),
 (@iCategoryId, CONCAT(@sName, '_menu_main_bg_image_size'), '_bx_protean_stg_cpt_option_menu_main_bg_image_size', 'cover', 'select', 'auto,cover,contain', '', '', 4),
 (@iCategoryId, CONCAT(@sName, '_menu_main_content_padding'), '_bx_protean_stg_cpt_option_menu_main_content_padding', '0px', 'digit', '', '', '', 5),
-(@iCategoryId, CONCAT(@sName, '_menu_main_border_color'), '_bx_protean_stg_cpt_option_menu_main_border_color', 'rgba(208, 208, 208, 1)', 'rgba', '', '', '', 6),
+(@iCategoryId, CONCAT(@sName, '_menu_main_border_color'), '_bx_protean_stg_cpt_option_menu_main_border_color', 'rgba(0, 0, 0, 0.1)', 'rgba', '', '', '', 6),
 (@iCategoryId, CONCAT(@sName, '_menu_main_border_size'), '_bx_protean_stg_cpt_option_menu_main_border_size', '0px', 'digit', '', '', '', 7),
 (@iCategoryId, CONCAT(@sName, '_menu_main_shadow'), '_bx_protean_stg_cpt_option_menu_main_shadow', 'none', 'digit', '', '', '', 8),
-(@iCategoryId, CONCAT(@sName, '_menu_main_font_family'), '_bx_protean_stg_cpt_option_menu_main_font_family', '"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif', 'digit', '', '', '', 9),
-(@iCategoryId, CONCAT(@sName, '_menu_main_font_size'), '_bx_protean_stg_cpt_option_menu_main_font_size', '1.125rem', 'digit', '', '', '', 10),
-(@iCategoryId, CONCAT(@sName, '_menu_main_font_color'), '_bx_protean_stg_cpt_option_menu_main_font_color', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 11),
-(@iCategoryId, CONCAT(@sName, '_menu_main_font_color_hover'), '_bx_protean_stg_cpt_option_menu_main_font_color_hover', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 12),
-(@iCategoryId, CONCAT(@sName, '_menu_main_font_color_active'), '_bx_protean_stg_cpt_option_menu_main_font_color_active', 'rgba(0, 0, 0, 1)', 'rgba', '', '', '', 13),
+(@iCategoryId, CONCAT(@sName, '_menu_main_font_family'), '_bx_protean_stg_cpt_option_menu_main_font_family', 'Arial, sans-serif', 'digit', '', '', '', 9),
+(@iCategoryId, CONCAT(@sName, '_menu_main_font_size'), '_bx_protean_stg_cpt_option_menu_main_font_size', '1rem', 'digit', '', '', '', 10),
+(@iCategoryId, CONCAT(@sName, '_menu_main_font_color'), '_bx_protean_stg_cpt_option_menu_main_font_color', 'rgba(40, 50, 60, 0.8)', 'rgba', '', '', '', 11),
+(@iCategoryId, CONCAT(@sName, '_menu_main_font_color_hover'), '_bx_protean_stg_cpt_option_menu_main_font_color_hover', 'rgba(40, 50, 60, 0.9)', 'rgba', '', '', '', 12),
+(@iCategoryId, CONCAT(@sName, '_menu_main_font_color_active'), '_bx_protean_stg_cpt_option_menu_main_font_color_active', 'rgba(20, 30, 40, 1)', 'rgba', '', '', '', 13),
 (@iCategoryId, CONCAT(@sName, '_menu_main_font_shadow'), '_bx_protean_stg_cpt_option_menu_main_font_shadow', 'none', 'digit', '', '', '', 14),
-(@iCategoryId, CONCAT(@sName, '_menu_main_font_weight'), '_bx_protean_stg_cpt_option_menu_main_font_weight', '400', 'digit', '', '', '', 15);
+(@iCategoryId, CONCAT(@sName, '_menu_main_font_weight'), '_bx_protean_stg_cpt_option_menu_main_font_weight', '700', 'digit', '', '', '', 15);
 
 
 -- SETTINGS: Protean template Styles Page Menu
@@ -207,19 +207,19 @@ INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALU
 SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
-(@iCategoryId, CONCAT(@sName, '_menu_page_bg_color'), '_bx_protean_stg_cpt_option_menu_page_bg_color', 'rgba(242, 242, 242, 1)', 'rgba', '', '', '', 1),
+(@iCategoryId, CONCAT(@sName, '_menu_page_bg_color'), '_bx_protean_stg_cpt_option_menu_page_bg_color', 'rgba(255, 255, 255, 0.9)', 'rgba', '', '', '', 1),
 (@iCategoryId, CONCAT(@sName, '_menu_page_bg_image'), '_bx_protean_stg_cpt_option_menu_page_bg_image', '', 'image', '', '', '', 2),
 (@iCategoryId, CONCAT(@sName, '_menu_page_bg_image_repeat'), '_bx_protean_stg_cpt_option_menu_page_bg_image_repeat', 'no-repeat', 'select', 'no-repeat,repeat,repeat-x,repeat-y', '', '', 3),
 (@iCategoryId, CONCAT(@sName, '_menu_page_bg_image_size'), '_bx_protean_stg_cpt_option_menu_page_bg_image_size', 'cover', 'select', 'auto,cover,contain', '', '', 4),
-(@iCategoryId, CONCAT(@sName, '_menu_page_content_padding'), '_bx_protean_stg_cpt_option_menu_page_content_padding', '0px', 'digit', '', '', '', 5),
-(@iCategoryId, CONCAT(@sName, '_menu_page_border_color'), '_bx_protean_stg_cpt_option_menu_page_border_color', 'rgba(208, 208, 208, 1)', 'rgba', '', '', '', 6),
-(@iCategoryId, CONCAT(@sName, '_menu_page_border_size'), '_bx_protean_stg_cpt_option_menu_page_border_size', '0px', 'digit', '', '', '', 7),
+(@iCategoryId, CONCAT(@sName, '_menu_page_content_padding'), '_bx_protean_stg_cpt_option_menu_page_content_padding', '0.3rem', 'digit', '', '', '', 5),
+(@iCategoryId, CONCAT(@sName, '_menu_page_border_color'), '_bx_protean_stg_cpt_option_menu_page_border_color', 'rgba(0, 0, 0, 0.1)', 'rgba', '', '', '', 6),
+(@iCategoryId, CONCAT(@sName, '_menu_page_border_size'), '_bx_protean_stg_cpt_option_menu_page_border_size', '1px', 'digit', '', '', '', 7),
 (@iCategoryId, CONCAT(@sName, '_menu_page_shadow'), '_bx_protean_stg_cpt_option_menu_page_shadow', 'none', 'digit', '', '', '', 8),
-(@iCategoryId, CONCAT(@sName, '_menu_page_font_family'), '_bx_protean_stg_cpt_option_menu_page_font_family', '"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif', 'digit', '', '', '', 9),
-(@iCategoryId, CONCAT(@sName, '_menu_page_font_size'), '_bx_protean_stg_cpt_option_menu_page_font_size', '1.2rem', 'digit', '', '', '', 10),
-(@iCategoryId, CONCAT(@sName, '_menu_page_font_color'), '_bx_protean_stg_cpt_option_menu_page_font_color', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 11),
-(@iCategoryId, CONCAT(@sName, '_menu_page_font_color_hover'), '_bx_protean_stg_cpt_option_menu_page_font_color_hover', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 12),
-(@iCategoryId, CONCAT(@sName, '_menu_page_font_color_active'), '_bx_protean_stg_cpt_option_menu_page_font_color_active', 'rgba(0, 0, 0, 1)', 'rgba', '', '', '', 13),
+(@iCategoryId, CONCAT(@sName, '_menu_page_font_family'), '_bx_protean_stg_cpt_option_menu_page_font_family', 'Arial, sans-serif', 'digit', '', '', '', 9),
+(@iCategoryId, CONCAT(@sName, '_menu_page_font_size'), '_bx_protean_stg_cpt_option_menu_page_font_size', '1rem', 'digit', '', '', '', 10),
+(@iCategoryId, CONCAT(@sName, '_menu_page_font_color'), '_bx_protean_stg_cpt_option_menu_page_font_color', 'rgba(40, 50, 60, 0.8)', 'rgba', '', '', '', 11),
+(@iCategoryId, CONCAT(@sName, '_menu_page_font_color_hover'), '_bx_protean_stg_cpt_option_menu_page_font_color_hover', 'rgba(30, 150, 250, 1)', 'rgba', '', '', '', 12),
+(@iCategoryId, CONCAT(@sName, '_menu_page_font_color_active'), '_bx_protean_stg_cpt_option_menu_page_font_color_active', 'rgba(30, 150, 250, 1)', 'rgba', '', '', '', 13),
 (@iCategoryId, CONCAT(@sName, '_menu_page_font_shadow'), '_bx_protean_stg_cpt_option_menu_page_font_shadow', 'none', 'digit', '', '', '', 14),
 (@iCategoryId, CONCAT(@sName, '_menu_page_font_weight'), '_bx_protean_stg_cpt_option_menu_page_font_weight', '400', 'digit', '', '', '', 15);
 
@@ -235,14 +235,14 @@ INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `ex
 (@iCategoryId, CONCAT(@sName, '_menu_slide_bg_image_repeat'), '_bx_protean_stg_cpt_option_menu_slide_bg_image_repeat', 'no-repeat', 'select', 'no-repeat,repeat,repeat-x,repeat-y', '', '', 3),
 (@iCategoryId, CONCAT(@sName, '_menu_slide_bg_image_size'), '_bx_protean_stg_cpt_option_menu_slide_bg_image_size', 'cover', 'select', 'auto,cover,contain', '', '', 4),
 (@iCategoryId, CONCAT(@sName, '_menu_slide_content_padding'), '_bx_protean_stg_cpt_option_menu_slide_content_padding', '1.25rem', 'digit', '', '', '', 5),
-(@iCategoryId, CONCAT(@sName, '_menu_slide_border_color'), '_bx_protean_stg_cpt_option_menu_slide_border_color', 'rgba(208, 208, 208, 1)', 'rgba', '', '', '', 6),
+(@iCategoryId, CONCAT(@sName, '_menu_slide_border_color'), '_bx_protean_stg_cpt_option_menu_slide_border_color', 'rgba(0, 0, 0, 0.1)', 'rgba', '', '', '', 6),
 (@iCategoryId, CONCAT(@sName, '_menu_slide_border_size'), '_bx_protean_stg_cpt_option_menu_slide_border_size', '1px 0px 1px 0px', 'digit', '', '', '', 7),
 (@iCategoryId, CONCAT(@sName, '_menu_slide_shadow'), '_bx_protean_stg_cpt_option_menu_slide_shadow', 'none', 'digit', '', '', '', 8),
-(@iCategoryId, CONCAT(@sName, '_menu_slide_font_family'), '_bx_protean_stg_cpt_option_menu_slide_font_family', '"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif', 'digit', '', '', '', 9),
+(@iCategoryId, CONCAT(@sName, '_menu_slide_font_family'), '_bx_protean_stg_cpt_option_menu_slide_font_family', 'Arial, sans-serif', 'digit', '', '', '', 9),
 (@iCategoryId, CONCAT(@sName, '_menu_slide_font_size'), '_bx_protean_stg_cpt_option_menu_slide_font_size', '1.0rem', 'digit', '', '', '', 10),
-(@iCategoryId, CONCAT(@sName, '_menu_slide_font_color'), '_bx_protean_stg_cpt_option_menu_slide_font_color', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 11),
-(@iCategoryId, CONCAT(@sName, '_menu_slide_font_color_hover'), '_bx_protean_stg_cpt_option_menu_slide_font_color_hover', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 12),
-(@iCategoryId, CONCAT(@sName, '_menu_slide_font_color_active'), '_bx_protean_stg_cpt_option_menu_slide_font_color_active', 'rgba(0, 0, 0, 1)', 'rgba', '', '', '', 13),
+(@iCategoryId, CONCAT(@sName, '_menu_slide_font_color'), '_bx_protean_stg_cpt_option_menu_slide_font_color', 'rgba(40, 50, 60, 0.8)', 'rgba', '', '', '', 11),
+(@iCategoryId, CONCAT(@sName, '_menu_slide_font_color_hover'), '_bx_protean_stg_cpt_option_menu_slide_font_color_hover', 'rgba(40, 50, 60, 0.9)', 'rgba', '', '', '', 12),
+(@iCategoryId, CONCAT(@sName, '_menu_slide_font_color_active'), '_bx_protean_stg_cpt_option_menu_slide_font_color_active', 'rgba(20, 30, 40, 1)', 'rgba', '', '', '', 13),
 (@iCategoryId, CONCAT(@sName, '_menu_slide_font_shadow'), '_bx_protean_stg_cpt_option_menu_slide_font_shadow', 'none', 'digit', '', '', '', 14),
 (@iCategoryId, CONCAT(@sName, '_menu_slide_font_weight'), '_bx_protean_stg_cpt_option_menu_slide_font_weight', '400', 'digit', '', '', '', 15);
 
@@ -253,16 +253,16 @@ INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALU
 SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
-(@iCategoryId, CONCAT(@sName, '_form_input_height'), '_bx_protean_stg_cpt_option_form_input_height', '2.2rem', 'digit', '', '', '', 1),
-(@iCategoryId, CONCAT(@sName, '_form_input_bg_color'), '_bx_protean_stg_cpt_option_form_input_bg_color', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 2),
+(@iCategoryId, CONCAT(@sName, '_form_input_height'), '_bx_protean_stg_cpt_option_form_input_height', '2rem', 'digit', '', '', '', 1),
+(@iCategoryId, CONCAT(@sName, '_form_input_bg_color'), '_bx_protean_stg_cpt_option_form_input_bg_color', 'rgba(255, 255, 255, 0.8)', 'rgba', '', '', '', 2),
 (@iCategoryId, CONCAT(@sName, '_form_input_bg_color_active'), '_bx_protean_stg_cpt_option_form_input_bg_color_active', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 3),
-(@iCategoryId, CONCAT(@sName, '_form_input_border_color'), '_bx_protean_stg_cpt_option_form_input_border_color', 'rgba(121, 189, 154, 1)', 'rgba', '', '', '', 4),
-(@iCategoryId, CONCAT(@sName, '_form_input_border_color_active'), '_bx_protean_stg_cpt_option_form_input_border_color_active', 'rgba(108, 170, 138, 1)', 'rgba', '', '', '', 5),
-(@iCategoryId, CONCAT(@sName, '_form_input_border_size'), '_bx_protean_stg_cpt_option_form_input_border_size', '2px', 'digit', '', '', '', 6),
-(@iCategoryId, CONCAT(@sName, '_form_input_shadow'), '_bx_protean_stg_cpt_option_form_input_shadow', 'none', 'digit', '', '', '', 7),
-(@iCategoryId, CONCAT(@sName, '_form_input_font_family'), '_bx_protean_stg_cpt_option_form_input_font_family', 'Helvetica, Arial, sans-serif', 'digit', '', '', '', 8),
-(@iCategoryId, CONCAT(@sName, '_form_input_font_size'), '_bx_protean_stg_cpt_option_form_input_font_size', '1.125rem', 'digit', '', '', '', 9),
-(@iCategoryId, CONCAT(@sName, '_form_input_font_color'), '_bx_protean_stg_cpt_option_form_input_font_color', 'rgba(51, 51, 51, 1)', 'rgba', '', '', '', 10);
+(@iCategoryId, CONCAT(@sName, '_form_input_border_color'), '_bx_protean_stg_cpt_option_form_input_border_color', 'rgba(40, 60, 80, 0.5)', 'rgba', '', '', '', 4),
+(@iCategoryId, CONCAT(@sName, '_form_input_border_color_active'), '_bx_protean_stg_cpt_option_form_input_border_color_active', 'rgba(30, 150, 250, 1)', 'rgba', '', '', '', 5),
+(@iCategoryId, CONCAT(@sName, '_form_input_border_size'), '_bx_protean_stg_cpt_option_form_input_border_size', '1px', 'digit', '', '', '', 6),
+(@iCategoryId, CONCAT(@sName, '_form_input_shadow'), '_bx_protean_stg_cpt_option_form_input_shadow', 'inset 0px 0px 2px 1px rgba(0,0,0,0.15);', 'digit', '', '', '', 7),
+(@iCategoryId, CONCAT(@sName, '_form_input_font_family'), '_bx_protean_stg_cpt_option_form_input_font_family', 'Arial, sans-serif', 'digit', '', '', '', 8),
+(@iCategoryId, CONCAT(@sName, '_form_input_font_size'), '_bx_protean_stg_cpt_option_form_input_font_size', '1rem', 'digit', '', '', '', 9),
+(@iCategoryId, CONCAT(@sName, '_form_input_font_color'), '_bx_protean_stg_cpt_option_form_input_font_color', 'rgba(20, 30, 40, 1)', 'rgba', '', '', '', 10);
 
 
 -- SETTINGS: Protean template Styles Large Buttons
@@ -271,20 +271,20 @@ INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALU
 SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
-(@iCategoryId, CONCAT(@sName, '_button_lg_height'), '_bx_protean_stg_cpt_option_button_lg_height', '2.25rem', 'digit', '', '', '', 1),
-(@iCategoryId, CONCAT(@sName, '_button_lg_bg_color'), '_bx_protean_stg_cpt_option_button_lg_bg_color', 'rgba(108, 170, 138, 1)', 'rgba', '', '', '', 2),
-(@iCategoryId, CONCAT(@sName, '_button_lg_bg_color_hover'), '_bx_protean_stg_cpt_option_button_lg_bg_color_hover', 'rgba(58, 134, 134, 1)', 'rgba', '', '', '', 3),
-(@iCategoryId, CONCAT(@sName, '_button_lg_border_color'), '_bx_protean_stg_cpt_option_button_lg_border_color', 'rgba(208, 208, 208, 1)', 'rgba', '', '', '', 4),
-(@iCategoryId, CONCAT(@sName, '_button_lg_border_color_hover'), '_bx_protean_stg_cpt_option_button_lg_border_color_hover', 'rgba(208, 208, 208, 1)', 'rgba', '', '', '', 5),
+(@iCategoryId, CONCAT(@sName, '_button_lg_height'), '_bx_protean_stg_cpt_option_button_lg_height', '2rem', 'digit', '', '', '', 1),
+(@iCategoryId, CONCAT(@sName, '_button_lg_bg_color'), '_bx_protean_stg_cpt_option_button_lg_bg_color', 'rgba(30, 150, 250, 0.8)', 'rgba', '', '', '', 2),
+(@iCategoryId, CONCAT(@sName, '_button_lg_bg_color_hover'), '_bx_protean_stg_cpt_option_button_lg_bg_color_hover', 'rgba(30, 150, 250, 1)', 'rgba', '', '', '', 3),
+(@iCategoryId, CONCAT(@sName, '_button_lg_border_color'), '_bx_protean_stg_cpt_option_button_lg_border_color', 'rgba(30, 150, 250, 1)', 'rgba', '', '', '', 4),
+(@iCategoryId, CONCAT(@sName, '_button_lg_border_color_hover'), '_bx_protean_stg_cpt_option_button_lg_border_color_hover', 'rgba(30, 150, 250, 1)', 'rgba', '', '', '', 5),
 (@iCategoryId, CONCAT(@sName, '_button_lg_border_size'), '_bx_protean_stg_cpt_option_button_lg_border_size', '0px', 'digit', '', '', '', 6),
 (@iCategoryId, CONCAT(@sName, '_button_lg_border_radius'), '_bx_protean_stg_cpt_option_button_lg_border_radius', '3px', 'digit', '', '', '', 7),
-(@iCategoryId, CONCAT(@sName, '_button_lg_shadow'), '_bx_protean_stg_cpt_option_button_lg_shadow', 'none', 'digit', '', '', '', 8),
-(@iCategoryId, CONCAT(@sName, '_button_lg_font_family'), '_bx_protean_stg_cpt_option_button_lg_font_family', '"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif', 'digit', '', '', '', 9),
+(@iCategoryId, CONCAT(@sName, '_button_lg_shadow'), '_bx_protean_stg_cpt_option_button_lg_shadow', '0px 0px 0px 1px rgba(0,0,0,0.0);', 'digit', '', '', '', 8),
+(@iCategoryId, CONCAT(@sName, '_button_lg_font_family'), '_bx_protean_stg_cpt_option_button_lg_font_family', 'Arial, sans-serif', 'digit', '', '', '', 9),
 (@iCategoryId, CONCAT(@sName, '_button_lg_font_size'), '_bx_protean_stg_cpt_option_button_lg_font_size', '1rem', 'digit', '', '', '', 10),
-(@iCategoryId, CONCAT(@sName, '_button_lg_font_color'), '_bx_protean_stg_cpt_option_button_lg_font_color', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 11),
+(@iCategoryId, CONCAT(@sName, '_button_lg_font_color'), '_bx_protean_stg_cpt_option_button_lg_font_color', 'rgba(255, 255, 255, 0.9)', 'rgba', '', '', '', 11),
 (@iCategoryId, CONCAT(@sName, '_button_lg_font_color_hover'), '_bx_protean_stg_cpt_option_button_lg_font_color_hover', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 12),
 (@iCategoryId, CONCAT(@sName, '_button_lg_font_shadow'), '_bx_protean_stg_cpt_option_button_lg_font_shadow', 'none', 'digit', '', '', '', 13),
-(@iCategoryId, CONCAT(@sName, '_button_lg_font_weight'), '_bx_protean_stg_cpt_option_button_lg_font_weight', '400', 'digit', '', '', '', 14);
+(@iCategoryId, CONCAT(@sName, '_button_lg_font_weight'), '_bx_protean_stg_cpt_option_button_lg_font_weight', '700', 'digit', '', '', '', 14);
 
 -- SETTINGS: Protean template Styles Small Buttons
 INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALUES 
@@ -293,16 +293,16 @@ SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
 (@iCategoryId, CONCAT(@sName, '_button_sm_height'), '_bx_protean_stg_cpt_option_button_sm_height', '1.5rem', 'digit', '', '', '', 1),
-(@iCategoryId, CONCAT(@sName, '_button_sm_bg_color'), '_bx_protean_stg_cpt_option_button_sm_bg_color', 'rgba(108, 170, 138, 1)', 'rgba', '', '', '', 2),
-(@iCategoryId, CONCAT(@sName, '_button_sm_bg_color_hover'), '_bx_protean_stg_cpt_option_button_sm_bg_color_hover', 'rgba(58, 134, 134, 1)', 'rgba', '', '', '', 3),
-(@iCategoryId, CONCAT(@sName, '_button_sm_border_color'), '_bx_protean_stg_cpt_option_button_sm_border_color', 'rgba(208, 208, 208, 1)', 'rgba', '', '', '', 4),
-(@iCategoryId, CONCAT(@sName, '_button_sm_border_color_hover'), '_bx_protean_stg_cpt_option_button_sm_border_color_hover', 'rgba(208, 208, 208, 1)', 'rgba', '', '', '', 5),
+(@iCategoryId, CONCAT(@sName, '_button_sm_bg_color'), '_bx_protean_stg_cpt_option_button_sm_bg_color', 'rgba(40, 180, 140, 0.8)', 'rgba', '', '', '', 2),
+(@iCategoryId, CONCAT(@sName, '_button_sm_bg_color_hover'), '_bx_protean_stg_cpt_option_button_sm_bg_color_hover', 'rgba(40, 180, 140, 1)', 'rgba', '', '', '', 3),
+(@iCategoryId, CONCAT(@sName, '_button_sm_border_color'), '_bx_protean_stg_cpt_option_button_sm_border_color', 'rgba(40, 180, 140, 1)', 'rgba', '', '', '', 4),
+(@iCategoryId, CONCAT(@sName, '_button_sm_border_color_hover'), '_bx_protean_stg_cpt_option_button_sm_border_color_hover', 'rgba(40, 180, 140, 1)', 'rgba', '', '', '', 5),
 (@iCategoryId, CONCAT(@sName, '_button_sm_border_size'), '_bx_protean_stg_cpt_option_button_sm_border_size', '0px', 'digit', '', '', '', 6),
-(@iCategoryId, CONCAT(@sName, '_button_sm_border_radius'), '_bx_protean_stg_cpt_option_button_sm_border_radius', '3px', 'digit', '', '', '', 7),
-(@iCategoryId, CONCAT(@sName, '_button_sm_shadow'), '_bx_protean_stg_cpt_option_button_sm_shadow', 'none', 'digit', '', '', '', 8),
-(@iCategoryId, CONCAT(@sName, '_button_sm_font_family'), '_bx_protean_stg_cpt_option_button_sm_font_family', '"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif', 'digit', '', '', '', 9),
-(@iCategoryId, CONCAT(@sName, '_button_sm_font_size'), '_bx_protean_stg_cpt_option_button_sm_font_size', '0.9rem', 'digit', '', '', '', 10),
-(@iCategoryId, CONCAT(@sName, '_button_sm_font_color'), '_bx_protean_stg_cpt_option_button_sm_font_color', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 11),
+(@iCategoryId, CONCAT(@sName, '_button_sm_border_radius'), '_bx_protean_stg_cpt_option_button_sm_border_radius', '2px', 'digit', '', '', '', 7),
+(@iCategoryId, CONCAT(@sName, '_button_sm_shadow'), '_bx_protean_stg_cpt_option_button_sm_shadow', '0px 0px 0px 1px rgba(0,0,0,0);', 'digit', '', '', '', 8),
+(@iCategoryId, CONCAT(@sName, '_button_sm_font_family'), '_bx_protean_stg_cpt_option_button_sm_font_family', 'Arial, sans-serif', 'digit', '', '', '', 9),
+(@iCategoryId, CONCAT(@sName, '_button_sm_font_size'), '_bx_protean_stg_cpt_option_button_sm_font_size', '0.75rem', 'digit', '', '', '', 10),
+(@iCategoryId, CONCAT(@sName, '_button_sm_font_color'), '_bx_protean_stg_cpt_option_button_sm_font_color', 'rgba(255, 255, 255, 0.9)', 'rgba', '', '', '', 11),
 (@iCategoryId, CONCAT(@sName, '_button_sm_font_color_hover'), '_bx_protean_stg_cpt_option_button_sm_font_color_hover', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 12),
 (@iCategoryId, CONCAT(@sName, '_button_sm_font_shadow'), '_bx_protean_stg_cpt_option_button_sm_font_shadow', 'none', 'digit', '', '', '', 13),
 (@iCategoryId, CONCAT(@sName, '_button_sm_font_weight'), '_bx_protean_stg_cpt_option_button_sm_font_weight', '400', 'digit', '', '', '', 14);
@@ -313,35 +313,35 @@ INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALU
 SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
-(@iCategoryId, CONCAT(@sName, '_font_family'), '_bx_protean_stg_cpt_option_font_family', '"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif', 'digit', '', '', '', 1),
+(@iCategoryId, CONCAT(@sName, '_font_family'), '_bx_protean_stg_cpt_option_font_family', 'Arial, sans-serif', 'digit', '', '', '', 1),
 (@iCategoryId, CONCAT(@sName, '_font_size_default'), '_bx_protean_stg_cpt_option_font_size_default', '18px', 'digit', '', '', '', 2),
-(@iCategoryId, CONCAT(@sName, '_font_color_default'), '_bx_protean_stg_cpt_option_font_color_default', 'rgba(51, 51, 51, 1)', 'rgba', '', '', '', 3),
-(@iCategoryId, CONCAT(@sName, '_font_color_grayed'), '_bx_protean_stg_cpt_option_font_color_grayed', 'rgba(153, 153, 153, 1)', 'rgba', '', '', '', 4),
+(@iCategoryId, CONCAT(@sName, '_font_color_default'), '_bx_protean_stg_cpt_option_font_color_default', 'rgba(40, 50, 60, 0.9)', 'rgba', '', '', '', 3),
+(@iCategoryId, CONCAT(@sName, '_font_color_grayed'), '_bx_protean_stg_cpt_option_font_color_grayed', 'rgba(40, 50, 60, 0.5)', 'rgba', '', '', '', 4),
 (@iCategoryId, CONCAT(@sName, '_font_color_contrasted'), '_bx_protean_stg_cpt_option_font_color_contrasted', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 5),
-(@iCategoryId, CONCAT(@sName, '_font_size_small'), '_bx_protean_stg_cpt_option_font_size_small', '14px', 'digit', '', '', '', 6),
-(@iCategoryId, CONCAT(@sName, '_font_size_middle'), '_bx_protean_stg_cpt_option_font_size_middle', '16px', 'digit', '', '', '', 7),
-(@iCategoryId, CONCAT(@sName, '_font_size_large'), '_bx_protean_stg_cpt_option_font_size_large', '22px', 'digit', '', '', '', 8),
-(@iCategoryId, CONCAT(@sName, '_font_size_h1'), '_bx_protean_stg_cpt_option_font_size_h1', '38px', 'digit', '', '', '', 9),
+(@iCategoryId, CONCAT(@sName, '_font_size_small'), '_bx_protean_stg_cpt_option_font_size_small', '12px', 'digit', '', '', '', 6),
+(@iCategoryId, CONCAT(@sName, '_font_size_middle'), '_bx_protean_stg_cpt_option_font_size_middle', '15px', 'digit', '', '', '', 7),
+(@iCategoryId, CONCAT(@sName, '_font_size_large'), '_bx_protean_stg_cpt_option_font_size_large', '18px', 'digit', '', '', '', 8),
+(@iCategoryId, CONCAT(@sName, '_font_size_h1'), '_bx_protean_stg_cpt_option_font_size_h1', '32px', 'digit', '', '', '', 9),
 (@iCategoryId, CONCAT(@sName, '_font_weight_h1'), '_bx_protean_stg_cpt_option_font_weight_h1', '700', 'digit', '', '', '', 10),
-(@iCategoryId, CONCAT(@sName, '_font_color_default_h1'), '_bx_protean_stg_cpt_option_font_color_default_h1', 'rgba(51, 51, 51, 1)', 'rgba', '', '', '', 11),
-(@iCategoryId, CONCAT(@sName, '_font_color_grayed_h1'), '_bx_protean_stg_cpt_option_font_color_grayed_h1', 'rgba(153, 153, 153, 1)', 'rgba', '', '', '', 12),
-(@iCategoryId, CONCAT(@sName, '_font_color_contrasted_h1'), '_bx_protean_stg_cpt_option_font_color_contrasted_h1', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 13),
-(@iCategoryId, CONCAT(@sName, '_font_color_link_h1'), '_bx_protean_stg_cpt_option_font_color_link_h1', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 14),
-(@iCategoryId, CONCAT(@sName, '_font_color_link_h1_hover'), '_bx_protean_stg_cpt_option_font_color_link_h1_hover', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 15),
+(@iCategoryId, CONCAT(@sName, '_font_color_default_h1'), '_bx_protean_stg_cpt_option_font_color_default_h1', 'rgba(40, 50, 60, 1)', 'rgba', '', '', '', 11),
+(@iCategoryId, CONCAT(@sName, '_font_color_grayed_h1'), '_bx_protean_stg_cpt_option_font_color_grayed_h1', 'rgba(40, 50, 60, 0.5)', 'rgba', '', '', '', 12),
+(@iCategoryId, CONCAT(@sName, '_font_color_contrasted_h1'), '_bx_protean_stg_cpt_option_font_color_contrasted_h1', 'rgba(255, 255, 255, 0.9)', 'rgba', '', '', '', 13),
+(@iCategoryId, CONCAT(@sName, '_font_color_link_h1'), '_bx_protean_stg_cpt_option_font_color_link_h1', 'rgba(30, 150, 250, 0.9)', 'rgba', '', '', '', 14),
+(@iCategoryId, CONCAT(@sName, '_font_color_link_h1_hover'), '_bx_protean_stg_cpt_option_font_color_link_h1_hover', 'rgba(30, 150, 250, 1)', 'rgba', '', '', '', 15),
 (@iCategoryId, CONCAT(@sName, '_font_size_h2'), '_bx_protean_stg_cpt_option_font_size_h2', '24px', 'digit', '', '', '', 16),
 (@iCategoryId, CONCAT(@sName, '_font_weight_h2'), '_bx_protean_stg_cpt_option_font_weight_h2', '700', 'digit', '', '', '', 17),
-(@iCategoryId, CONCAT(@sName, '_font_color_default_h2'), '_bx_protean_stg_cpt_option_font_color_default_h2', 'rgba(51, 51, 51, 1)', 'rgba', '', '', '', 18),
-(@iCategoryId, CONCAT(@sName, '_font_color_grayed_h2'), '_bx_protean_stg_cpt_option_font_color_grayed_h2', 'rgba(153, 153, 153, 1)', 'rgba', '', '', '', 19),
+(@iCategoryId, CONCAT(@sName, '_font_color_default_h2'), '_bx_protean_stg_cpt_option_font_color_default_h2', 'rgba(40, 60, 80, 0.9)', 'rgba', '', '', '', 18),
+(@iCategoryId, CONCAT(@sName, '_font_color_grayed_h2'), '_bx_protean_stg_cpt_option_font_color_grayed_h2', 'rgba(40, 60, 80, 0.5)', 'rgba', '', '', '', 19),
 (@iCategoryId, CONCAT(@sName, '_font_color_contrasted_h2'), '_bx_protean_stg_cpt_option_font_color_contrasted_h2', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 20),
-(@iCategoryId, CONCAT(@sName, '_font_color_link_h2'), '_bx_protean_stg_cpt_option_font_color_link_h2', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 21),
-(@iCategoryId, CONCAT(@sName, '_font_color_link_h2_hover'), '_bx_protean_stg_cpt_option_font_color_link_h2_hover', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 22),
-(@iCategoryId, CONCAT(@sName, '_font_size_h3'), '_bx_protean_stg_cpt_option_font_size_h3', '18px', 'digit', '', '', '', 23),
+(@iCategoryId, CONCAT(@sName, '_font_color_link_h2'), '_bx_protean_stg_cpt_option_font_color_link_h2', 'rgba(30, 150, 250, 0.9)', 'rgba', '', '', '', 21),
+(@iCategoryId, CONCAT(@sName, '_font_color_link_h2_hover'), '_bx_protean_stg_cpt_option_font_color_link_h2_hover', 'rgba(30, 150, 250, 1)', 'rgba', '', '', '', 22),
+(@iCategoryId, CONCAT(@sName, '_font_size_h3'), '_bx_protean_stg_cpt_option_font_size_h3', '20px', 'digit', '', '', '', 23),
 (@iCategoryId, CONCAT(@sName, '_font_weight_h3'), '_bx_protean_stg_cpt_option_font_weight_h3', '500', 'digit', '', '', '', 24),
-(@iCategoryId, CONCAT(@sName, '_font_color_default_h3'), '_bx_protean_stg_cpt_option_font_color_default_h3', 'rgba(51, 51, 51, 1)', 'rgba', '', '', '', 25),
-(@iCategoryId, CONCAT(@sName, '_font_color_grayed_h3'), '_bx_protean_stg_cpt_option_font_color_grayed_h3', 'rgba(153, 153, 153, 1)', 'rgba', '', '', '', 26),
+(@iCategoryId, CONCAT(@sName, '_font_color_default_h3'), '_bx_protean_stg_cpt_option_font_color_default_h3', 'rgba(40, 60, 80, 0.9)', 'rgba', '', '', '', 25),
+(@iCategoryId, CONCAT(@sName, '_font_color_grayed_h3'), '_bx_protean_stg_cpt_option_font_color_grayed_h3', 'rgba(40, 60, 80, 0.5)', 'rgba', '', '', '', 26),
 (@iCategoryId, CONCAT(@sName, '_font_color_contrasted_h3'), '_bx_protean_stg_cpt_option_font_color_contrasted_h3', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 27),
-(@iCategoryId, CONCAT(@sName, '_font_color_link_h3'), '_bx_protean_stg_cpt_option_font_color_link_h3', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 28),
-(@iCategoryId, CONCAT(@sName, '_font_color_link_h3_hover'), '_bx_protean_stg_cpt_option_font_color_link_h3_hover', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 29);
+(@iCategoryId, CONCAT(@sName, '_font_color_link_h3'), '_bx_protean_stg_cpt_option_font_color_link_h3', 'rgba(30, 150, 250, 0.9)', 'rgba', '', '', '', 28),
+(@iCategoryId, CONCAT(@sName, '_font_color_link_h3_hover'), '_bx_protean_stg_cpt_option_font_color_link_h3_hover', 'rgba(30, 150, 250, 1)', 'rgba', '', '', '', 29);
 
 -- SETTINGS: Protean template Custom Styles
 INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALUES 
@@ -349,7 +349,7 @@ INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALU
 SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
-(@iCategoryId, CONCAT(@sName, '_styles_custom'), '_bx_protean_stg_cpt_option_styles_custom', '', 'text', '', '', '', 1);
+(@iCategoryId, CONCAT(@sName, '_styles_custom'), '_bx_protean_stg_cpt_option_styles_custom', 'div.bx-market-unit-cover div.bx-base-text-unit-no-thumb {\r\n border-width: 0px;\r\n}', 'text', '', '', '', 1);
 
 -- SETTINGS: Protean template Viewport Tablet
 INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALUES 
@@ -365,7 +365,7 @@ INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALU
 SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
-(@iCategoryId, CONCAT(@sName, '_vpm_font_size_scale'), '_bx_protean_stg_cpt_option_vpm_font_size_scale', '85%', 'digit', '', '', '', 1);
+(@iCategoryId, CONCAT(@sName, '_vpm_font_size_scale'), '_bx_protean_stg_cpt_option_vpm_font_size_scale', '100%', 'digit', '', '', '', 1);
 
 
 -- MIXES
@@ -387,11 +387,6 @@ INSERT INTO `sys_options_mixes2options` (`option`, `mix_id`, `value`) VALUES
 ('bx_protean_button_lg_border_color_hover', @iMixId, 'rgba(20, 40, 60, 0.9)'),
 ('bx_protean_popup_menu_shadow', @iMixId, 'none'),
 ('bx_protean_button_lg_border_color', @iMixId, 'rgba(20, 40, 60, 0.8)'),
-('bx_protean_popup_menu_border_size', @iMixId, '0px'),
-('bx_protean_popup_menu_border_color', @iMixId, 'rgba(208, 208, 208, 1)'),
-('bx_protean_popup_menu_content_padding', @iMixId, 'inherit'),
-('bx_protean_popup_menu_bg_image', @iMixId, '0'),
-('bx_protean_popup_menu_bg_color', @iMixId, 'rgba(255, 255, 255, 1)'),
 ('bx_protean_popup_title_font_color', @iMixId, 'rgba(0, 0, 20, 1)'),
 ('bx_protean_popup_title_font_size', @iMixId, '1.5rem'),
 ('bx_protean_popup_title_padding', @iMixId, '1.25rem'),
@@ -480,20 +475,16 @@ INSERT INTO `sys_options_mixes2options` (`option`, `mix_id`, `value`) VALUES
 ('bx_protean_button_sm_font_shadow', @iMixId, 'none'),
 ('bx_protean_button_sm_font_weight', @iMixId, '400'),
 ('bx_protean_font_family', @iMixId, 'Arial, sans-serif'),
-('bx_protean_font_size_default', @iMixId, '16px'),
+('bx_protean_font_size_default', @iMixId, '15px'),
 ('bx_protean_font_color_default', @iMixId, 'rgba(40, 60, 80, 0.9)'),
 ('bx_protean_font_size_small', @iMixId, '12px'),
-('bx_protean_font_color_small', @iMixId, 'rgba(40, 60, 80, 0.9)'),
 ('bx_protean_font_size_middle', @iMixId, '14px'),
 ('bx_protean_font_color_middle', @iMixId, 'rgba(40, 60, 80, 0.9)'),
 ('bx_protean_font_size_large', @iMixId, '18px'),
 ('bx_protean_font_color_large', @iMixId, 'rgba(40, 60, 80, 0.9)'),
 ('bx_protean_font_size_h1', @iMixId, '32px'),
-('bx_protean_font_color_h1', @iMixId, 'rgba(40, 60, 80, 1)'),
 ('bx_protean_font_size_h2', @iMixId, '24px'),
-('bx_protean_font_color_h2', @iMixId, 'rgba(40, 60, 80, 1)'),
 ('bx_protean_font_size_h3', @iMixId, '20px'),
-('bx_protean_font_color_h3', @iMixId, 'rgba(40, 60, 80, 1)'),
 ('bx_protean_font_color_grayed', @iMixId, 'rgba(40, 60, 80, 0.5)'),
 ('bx_protean_font_color_contrasted', @iMixId, 'rgba(255, 255, 255, 1)'),
 ('bx_protean_vpt_font_size_scale', @iMixId, '100%'),
@@ -512,7 +503,6 @@ INSERT INTO `sys_options_mixes2options` (`option`, `mix_id`, `value`) VALUES
 ('bx_protean_popup_bg_image_size', @iMixId, 'cover'),
 ('bx_protean_menu_slide_bg_image_repeat', @iMixId, 'no-repeat'),
 ('bx_protean_menu_slide_bg_image_size', @iMixId, 'cover'),
-('bx_protean_menu_page_height', @iMixId, '2.6rem'),
 ('bx_protean_menu_page_bg_color', @iMixId, 'rgba(255, 255, 255, 0.9)'),
 ('bx_protean_menu_page_bg_image_repeat', @iMixId, 'no-repeat'),
 ('bx_protean_menu_page_bg_image', @iMixId, '0'),

+ 1 - 0
modules/boonex/russian/data/langs/bx_albums/ru.xml

@@ -176,6 +176,7 @@
 
     <string name="_bx_albums_txt_all_entries_by"><![CDATA[<a href="{0}">Все альбомы от {1} ({2})</a>]]></string>
     <string name="_bx_albums_txt_sample_single"><![CDATA[альбом]]></string>
+    <string name="_bx_albums_txt_sample_single_with_article"><![CDATA[альбом]]></string>
     <string name="_bx_albums_txt_sample_comment_single"><![CDATA[комментарий к альбому]]></string>
     <string name="_bx_albums_txt_sample_vote_single"><![CDATA[голос за альбом]]></string>
     <string name="_bx_albums_txt_media_single"><![CDATA[изображение]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/bx_events/ru.xml

@@ -229,6 +229,7 @@
     <string name="_bx_events_txt_account_suspended"><![CDATA[Это событие заблокировано.]]></string>
     <string name="_bx_events_txt_N_fans"><![CDATA[{0} участников]]></string>
     <string name="_bx_events_txt_sample_single"><![CDATA[событие]]></string>
+    <string name="_bx_events_txt_sample_single_with_article"><![CDATA[событие]]></string>
     <string name="_bx_events_txt_sample_vote_single"><![CDATA[голос за событие]]></string>
     <string name="_bx_events_txt_to_admins"><![CDATA[В админы]]></string>
     <string name="_bx_events_txt_from_admins"><![CDATA[Из админов]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/bx_forum/ru.xml

@@ -244,6 +244,7 @@
 	<string name="_bx_forum_txt_entry_sticked"><![CDATA[Закрепленное обсуждение]]></string>
 	<string name="_bx_forum_txt_sample_comment_single"><![CDATA[комментарий к обсуждению]]></string>
 	<string name="_bx_forum_txt_sample_single"><![CDATA[обсуждение]]></string>
+	<string name="_bx_forum_txt_sample_single_with_article"><![CDATA[обсуждение]]></string>
     <string name="_bx_forum_x_date_by_x_replier"><![CDATA[{0} {1}]]></string>
     <string name="_bx_forum_you_are_last_replier"><![CDATA[Вы - последний ответивший]]></string>
 

+ 1 - 0
modules/boonex/russian/data/langs/bx_groups/ru.xml

@@ -204,6 +204,7 @@
     <string name="_bx_groups_txt_account_suspended"><![CDATA[Эта группа заблокирована.]]></string>
     <string name="_bx_groups_txt_N_fans"><![CDATA[{0} участников]]></string>
     <string name="_bx_groups_txt_sample_single"><![CDATA[группа]]></string>
+    <string name="_bx_groups_txt_sample_single_with_article"><![CDATA[группа]]></string>
     <string name="_bx_groups_txt_sample_vote_single"><![CDATA[голос за группу]]></string>
     <string name="_bx_groups_txt_to_admins"><![CDATA[В админы]]></string>
     <string name="_bx_groups_txt_from_admins"><![CDATA[Из админов]]></string>

+ 2 - 1
modules/boonex/russian/data/langs/bx_market/ru.xml

@@ -319,9 +319,10 @@
     <string name="_bx_market_txt_category"><![CDATA[Категория:]]></string>
     <string name="_bx_market_txt_most_current_version"><![CDATA[Самая новая версия]]></string>
     <string name="_bx_market_txt_sample_single"><![CDATA[продукт]]></string>
+    <string name="_bx_market_txt_sample_single_with_article"><![CDATA[продукт]]></string>
     <string name="_bx_market_txt_sample_comment_single"><![CDATA[Обзоры к продукту]]></string>
     <string name="_bx_market_txt_sample_vote_single"><![CDATA[голос за продукт]]></string>
-    <string name="_bx_market_txt_author_added_product"><![CDATA[{0} добавил продукт {1}]]></string>
+    <string name="_bx_market_txt_author_added_product"><![CDATA[{0} {1}]]></string>
     <string name="_bx_market_txt_joined"><![CDATA[Зарегистрирован:]]></string>
     <string name="_bx_market_txt_last_active"><![CDATA[Последняя активность:]]></string>
     <string name="_bx_market_txt_price_single"><![CDATA[Приобрести за {0}{1}]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/bx_posts/ru.xml

@@ -196,6 +196,7 @@
 
     <string name="_bx_posts_txt_all_entries_by"><![CDATA[<a href="{0}">Все публикации от {1} ({2})</a>]]></string>
     <string name="_bx_posts_txt_sample_single"><![CDATA[публикация]]></string>
+    <string name="_bx_posts_txt_sample_single_with_article"><![CDATA[публикация]]></string>
     <string name="_bx_posts_txt_sample_comment_single"><![CDATA[комментарии к публикации]]></string>
     <string name="_bx_posts_txt_sample_vote_single"><![CDATA[голос за публикацию]]></string>
 </resources>

+ 11 - 5
modules/boonex/russian/data/langs/bx_timeline/ru.xml

@@ -59,13 +59,16 @@
 	<string name="_bx_timeline_page_title_account"><![CDATA[Лента]]></string>
 	<string name="_bx_timeline_page_block_title_post"><![CDATA[Разместить в Ленте]]></string>
 	<string name="_bx_timeline_page_block_title_view"><![CDATA[Лента]]></string>
-	<string name="_bx_timeline_page_block_title_post_profile_persons"><![CDATA[Разместить в Ленте]]></string>
-	<string name="_bx_timeline_page_block_title_post_profile_organizations"><![CDATA[Разместить в Ленте]]></string>
-	<string name="_bx_timeline_page_block_title_view_profile_persons"><![CDATA[Лента]]></string>
-	<string name="_bx_timeline_page_block_title_view_profile_organizations"><![CDATA[Лента]]></string>
+	<string name="_bx_timeline_page_block_title_view_outline"><![CDATA[Сводка]]></string>
+	<string name="_bx_timeline_page_block_title_post_profile"><![CDATA[Разместить в Ленте]]></string>
+	<string name="_bx_timeline_page_block_title_view_profile"><![CDATA[Лента]]></string>
+	<string name="_bx_timeline_page_block_title_view_profile_outline"><![CDATA[Сводка]]></string>
 	<string name="_bx_timeline_page_block_title_item"><![CDATA[Элемент]]></string>
 	<string name="_bx_timeline_page_block_title_view_account"><![CDATA[Лента Подписки]]></string>
-	<string name="_bx_timeline_page_block_title_view_home"><![CDATA[Сводка]]></string>
+	<string name="_bx_timeline_page_block_title_view_account_outline"><![CDATA[Сводка Подписки]]></string>
+	<string name="_bx_timeline_page_block_title_post_home"><![CDATA[Разместить в Ленте]]></string>
+	<string name="_bx_timeline_page_block_title_view_home"><![CDATA[Лента]]></string>
+	<string name="_bx_timeline_page_block_title_view_home_outline"><![CDATA[Сводка]]></string>
 	<string name="_bx_timeline_page_block_title_browse_cmts"><![CDATA[Лента - Комментарии]]></string>
 
     <string name="_bx_timeline_menu_item_view_all"><![CDATA[Все сообщения]]></string>
@@ -124,12 +127,15 @@
 	<string name="_bx_timeline_txt_pinned"><![CDATA[Приколотое событие]]></string>
 
 	<string name="_bx_timeline_txt_rss_caption"><![CDATA[Лента {0}]]></string>
+	<string name="_bx_timeline_txt_added_sample"><![CDATA[добавил {0}]]></string>
 	<string name="_bx_timeline_txt_user_added_sample"><![CDATA[{0} добавил {1}]]></string>
 	<string name="_bx_timeline_txt_user_shared_sample"><![CDATA[{0} снова разместил {1} {2}]]></string>
 	<string name="_bx_timeline_txt_sample"><![CDATA[сообщение]]></string>
+	<string name="_bx_timeline_txt_sample_with_article"><![CDATA[сообщение]]></string>
 	<string name="_bx_timeline_txt_sample_ext"><![CDATA[сообщение в ленте]]></string>
 	<string name="_bx_timeline_txt_sample_comment_single"><![CDATA[комментарий к сообщению в ленте]]></string>
 	<string name="_bx_timeline_txt_sample_vote_single"><![CDATA[голос за сообщение в ленте]]></string>
+    <string name="_bx_timeline_txt_today"><![CDATA[Сегодня]]></string>
 
 	<string name="_bx_timeline_txt_do_share"><![CDATA[Поделиться]]></string>
 	<string name="_bx_timeline_txt_shared"><![CDATA[Поделился {0} {1}.]]></string>

+ 1 - 1
modules/boonex/russian/data/langs/system/ru.xml

@@ -486,7 +486,7 @@
 	<string name="_adm_bp_err_page_title_system"><![CDATA[Необходимо указать название из как минимум 3 символов.]]></string>
 	<string name="_adm_bp_err_page_uri"><![CDATA[Необходимо указать уникальный URL из как минимум 3 символов.]]></string>
 	<string name="_adm_bp_err_page_visible_for_levels"><![CDATA[Настройки видимости определяются индивидуальным кодом или не применимы в данном случае.]]></string>
-	<string name="_adm_bp_err_save"><![CDATA[Невозможно сохранить]]></string>
+	<string name="_adm_bp_err_save"><![CDATA[Невозможно сохранить или ничего не изменилось.]]></string>
 	<string name="_adm_bp_mi_page_cache"><![CDATA[Кэш]]></string>
 	<string name="_adm_bp_mi_page_cover"><![CDATA[Обложка]]></string>
 	<string name="_adm_bp_mi_page_layout"><![CDATA[Отображение]]></string>

+ 24 - 12
modules/boonex/timeline/classes/BxTimelineConfig.php

@@ -40,6 +40,8 @@ class BxTimelineConfig extends BxBaseModNotificationsConfig
         parent::__construct($aModule);
 
         $this->CNF = array (
+            'ICON' => 'clock-o col-green1',
+        
 	        // database fields
         	'FIELD_ID' => 'id',
         	'FIELD_LOCATION_PREFIX' => 'location',
@@ -108,23 +110,33 @@ class BxTimelineConfig extends BxBaseModNotificationsConfig
             'share' => 'oTimelineShare'
         );
 
-        $sHtmlPrefix = str_replace('_', '-', $this->_sName);
+        $sHp = str_replace('_', '-', $this->_sName);
+        $sHpT = BX_TIMELINE_VIEW_TIMELINE;
+        $sHpO = BX_TIMELINE_VIEW_OUTLINE;
         $this->_aHtmlIds = array(
-            'view' => array(
-        		'main' => $sHtmlPrefix,
-        		'item' => $sHtmlPrefix . '-item-',
-                'menu_popup' => $sHtmlPrefix . '-menu-popup-',
-                'photo_popup' => $sHtmlPrefix . '-photo-popup',
+        	'view' => array(
+                'main_' . $sHpT => $sHp . '-' . $sHpT,
+        		'item_' . $sHpT => $sHp . '-item-' . $sHpT . '-',
+                'photo_popup_' . $sHpT => $sHp . '-photo-popup-' . $sHpT,
+
+        		'main_' . $sHpO => $sHp . '-' . $sHpO,
+        		'item_' . $sHpO => $sHp . '-item-' . $sHpO . '-',
+                'photo_popup_' . $sHpO => $sHp . '-photo-popup-' . $sHpO,
+
+				'menu_popup' => $sHp . '-menu-popup-',
             ),
             'post' => array(
-                'attach_link_popup' =>  $sHtmlPrefix . '-attach-link-popup',
-                'attach_link_form_field' => $sHtmlPrefix . '-attach-link-form_field',
-                'attach_link_item' => $sHtmlPrefix . '-attach-link-item-',
+                'attach_link_popup' =>  $sHp . '-attach-link-popup',
+                'attach_link_form_field' => $sHp . '-attach-link-form_field',
+                'attach_link_item' => $sHp . '-attach-link-item-',
+
+            	'main_' . $sHpT => $sHp . '-' . $sHpT,
+            	'main_' . $sHpO => $sHp . '-' . $sHpO,
             ),
             'share' => array(
-                'main' => $sHtmlPrefix . '-share-',
-                'counter' => $sHtmlPrefix . '-share-counter-',
-                'by_popup' => $sHtmlPrefix . '-share-by-',
+                'main' => $sHp . '-share-',
+                'counter' => $sHp . '-share-counter-',
+                'by_popup' => $sHp . '-share-by-',
             )
         );
 

+ 2 - 2
modules/boonex/timeline/classes/BxTimelineDb.php

@@ -332,7 +332,7 @@ class BxTimelineDb extends BxBaseModNotificationsDb
             	list($sMethod, $sSelectClause, $sJoinClause, $sWhereClause, $sOrderClause, $sLimitClause) = parent::_getSqlPartsEvents($aParams);
         }
 
-		$sSelectClause .= "YEAR(FROM_UNIXTIME(`{$this->_sTable}`.`date`)) AS `year`, ";
+		$sSelectClause .= "DAYOFYEAR(FROM_UNIXTIME(`{$this->_sTable}`.`date`)) AS `days`, DAYOFYEAR(NOW()) AS `today`, ROUND((UNIX_TIMESTAMP() - `{$this->_sTable}`.`date`)/86400) AS `ago_days`, YEAR(FROM_UNIXTIME(`{$this->_sTable}`.`date`)) AS `year`, ";
 		if($aParams['browse'] == 'list')
 			$sOrderClause = "ORDER BY `{$this->_sTable}`.`pinned` DESC, `{$this->_sTable}`.`date` DESC";
 
@@ -401,7 +401,7 @@ class BxTimelineDb extends BxBaseModNotificationsDb
 
 			case BX_BASE_MOD_NTFS_TYPE_PUBLIC:
 				$sCommonPostPrefix = $this->_oConfig->getPrefix('common_post');
-				$sWhereClause .= "AND SUBSTRING(`{$this->_sTable}`.`type`, 1, " . strlen($sCommonPostPrefix) . ") <> '" . $sCommonPostPrefix . "' ";
+				$sWhereClause .= $this->prepareAsString("AND (SUBSTRING(`{$this->_sTable}`.`type`, 1, " . strlen($sCommonPostPrefix) . ") <> '" . $sCommonPostPrefix . "' OR `{$this->_sTable}`.`owner_id`=?) ", 0);
 				break;
 		}
 

+ 4 - 5
modules/boonex/timeline/classes/BxTimelineMenuItemActions.php

@@ -22,13 +22,9 @@ class BxTimelineMenuItemActions extends BxTemplMenuCustom
         parent::__construct($aObject, $oTemplate);
 
         $this->_oModule = BxDolModule::getInstance('bx_timeline');
-
-        $this->addMarkers(array(
-            'js_object_view' => $this->_oModule->_oConfig->getJsObject('view'),
-        ));
     }
 
-    public function setEvent($aEvent)
+    public function setEvent($sView, $aEvent)
     {
         if(empty($aEvent) || !is_array($aEvent))
             return;
@@ -44,6 +40,9 @@ class BxTimelineMenuItemActions extends BxTemplMenuCustom
         }
 
         $this->addMarkers(array(
+        	'js_object_view' => $this->_oModule->_oConfig->getJsObject('view_' . $sView),
+
+            'view' => $sView,
             'content_id' => $aEvent['id'],
 
             'comment_system' => $sCommentsSystem,

+ 212 - 134
modules/boonex/timeline/classes/BxTimelineModule.php

@@ -15,6 +15,10 @@ bx_import('BxBaseModNotificationsModule');
 define('BX_TIMELINE_TYPE_ITEM', 'view_item');
 define('BX_TIMELINE_TYPE_DEFAULT', BX_BASE_MOD_NTFS_TYPE_OWNER);
 
+define('BX_TIMELINE_VIEW_TIMELINE', 'timeline');
+define('BX_TIMELINE_VIEW_OUTLINE', 'outline');
+define('BX_TIMELINE_VIEW_DEFAULT', BX_TIMELINE_VIEW_OUTLINE);
+
 define('BX_TIMELINE_FILTER_ALL', 'all');
 define('BX_TIMELINE_FILTER_OWNER', 'owner');
 define('BX_TIMELINE_FILTER_OTHER', 'other');
@@ -86,30 +90,31 @@ class BxTimelineModule extends BxBaseModNotificationsModule
         if(!$this->_oDb->updateEvent(array('pinned' => $aEvent['pinned']), array('id' => $iId)))
         	return echoJson(array('code' => 2));
 
-        $aResult = array('code' => 0, 'id' => $iId);
-		if($aEvent['pinned'] != 0)
-			$aResult['content'] = $this->_oTemplate->getPost($aEvent, array('type' => 'owner', 'owner_id' => $this->_iOwnerId, 'dynamic_mode' => true));
-
-		echoJson($aResult);
+		echoJson(array(
+			'code' => 0, 
+			'id' => $iId, 
+			'eval' => $this->_oConfig->getJsObject('view') . '.onPinPost(oData)'
+		));
     }
 
     function actionDelete()
     {
         $this->_iOwnerId = bx_process_input(bx_get('owner_id'), BX_DATA_INT);
 
-        $iId = bx_process_input(bx_get('id'), BX_DATA_INT);
-        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iId));
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => bx_process_input(bx_get('id'), BX_DATA_INT)));
 
         $mixedAllowed = $this->isAllowedDelete($aEvent, true);
-        if($mixedAllowed !== true) {
-            echoJson(array('code' => 1, 'msg' => strip_tags($mixedAllowed)));
-            return;
-        }
+        if($mixedAllowed !== true)
+            return echoJson(array('code' => 1, 'msg' => strip_tags($mixedAllowed)));
 
         if(!$this->deleteEvent($aEvent))
-        	echoJson(array('code' => 2));
-        else 
-        	echoJson(array('code' => 0, 'id' => $iId));
+            return echoJson(array('code' => 2));
+
+        echoJson(array(
+        	'code' => 0, 
+        	'id' => $aEvent['id'], 
+        	'eval' => $this->_oConfig->getJsObject('view') . '.onDeletePost(oData)'
+        ));
     }
 
     public function actionShare()
@@ -173,20 +178,39 @@ class BxTimelineModule extends BxBaseModNotificationsModule
 
     function actionGetPost()
     {
+        $sView = bx_process_input(bx_get('view'));
         $this->_iOwnerId = bx_process_input(bx_get('owner_id'), BX_DATA_INT);
 
-        $iEvent = bx_process_input(bx_get('id'), BX_DATA_INT);
-        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iEvent));
-
-        echoJson(array('item' => $this->_oTemplate->getPost($aEvent, array('type' => 'owner', 'owner_id' => $this->_iOwnerId, 'dynamic_mode' => true))));
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => bx_process_input(bx_get('id'), BX_DATA_INT)));
+        if(empty($aEvent) || !is_array($aEvent))
+            return echoJson(array());
+
+        echoJson(array(
+            'id' => $aEvent['id'],
+            'view' => $sView,
+        	'item' => $this->_oTemplate->getPost($aEvent, array(
+        		'view' => $sView, 
+        		'type' => 'owner', 
+        		'owner_id' => $this->_iOwnerId, 
+        		'dynamic_mode' => true
+            )),
+            'eval' => $this->_oConfig->getJsObject('post') . "._onGetPost(oData)"
+        ));
     }
 
     function actionGetPosts()
     {
         $aParams = $this->_prepareParamsGet();
-        list($sItems, $sLoadMore, $sBack) = $this->_oTemplate->getPosts($aParams);
-
-        echoJson(array('items' => $sItems, 'load_more' => $sLoadMore, 'back' => $sBack));
+        list($sItems, $sLoadMore, $sBack, $sEmpty) = $this->_oTemplate->getPosts($aParams);
+
+        echoJson(array(
+        	'view' => $aParams['view'],
+        	'items' => $sItems, 
+        	'load_more' => $sLoadMore, 
+        	'back' => $sBack,
+            'empty' => $sEmpty,
+        	'eval' => $this->_oConfig->getJsObject('view') . "._onGetPosts(oData)"
+        ));
     }
 
     public function actionGetPostForm($sType)
@@ -305,7 +329,10 @@ class BxTimelineModule extends BxBaseModNotificationsModule
 		if(empty($iProfileId) && isLogged())
 			$iProfileId = bx_get_logged_profile_id();
 
-        return $this->getBlockPost($iProfileId);
+        if(!$iProfileId)
+            return array();
+
+        return $this->_getBlockPost($iProfileId);
     }
 
     public function serviceGetBlockPostProfile($sProfileModule = 'bx_persons', $iProfileContentId = 0)
@@ -320,7 +347,13 @@ class BxTimelineModule extends BxBaseModNotificationsModule
 		if(empty($oProfile))
 			return array();
 
-		return $this->getBlockPost($oProfile->id());
+		return $this->_getBlockPost($oProfile->id());
+    }
+
+    public function serviceGetBlockPostHome()
+    {
+        $iProfileId = 0;
+        return $this->_getBlockPost($iProfileId);
     }
 
     /*
@@ -328,54 +361,46 @@ class BxTimelineModule extends BxBaseModNotificationsModule
      */
     public function serviceGetBlockView($iProfileId = 0)
     {
-    	if(empty($iProfileId) && bx_get('profile_id') !== false)
-			$iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
+    	return $this->_serviceGetBlockView($iProfileId, BX_TIMELINE_VIEW_TIMELINE);
+    }
 
-		if(empty($iProfileId) && isLogged())
-			$iProfileId = bx_get_logged_profile_id();
+    public function serviceGetBlockViewOutline($iProfileId = 0)
+    {
+        return $this->_serviceGetBlockView($iProfileId, BX_TIMELINE_VIEW_OUTLINE);
+    }
 
-        $aBlock = $this->getBlockView($iProfileId);
-        if(!empty($aBlock))
-            return $aBlock;
+    public function serviceGetBlockViewProfile($sProfileModule = 'bx_persons', $iProfileContentId = 0, $iStart = -1, $iPerPage = -1, $sFilter = '', $aModules = array(), $iTimeline = -1)
+    {
+        $sView = BX_TIMELINE_VIEW_TIMELINE;
 
-        return array('content' => MsgBox(_t('_bx_timeline_txt_msg_no_results')));
+        return $this->_serviceGetBlockViewProfile($sProfileModule, $iProfileContentId, $sView, $iStart, $iPerPage, $sFilter, $aModules, $iTimeline);
     }
 
-	public function serviceGetBlockViewProfile($sProfileModule = 'bx_persons', $iProfileContentId = 0, $iStart = -1, $iPerPage = -1, $sFilter = '', $aModules = array(), $iTimeline = -1)
+	public function serviceGetBlockViewProfileOutline($sProfileModule = 'bx_persons', $iProfileContentId = 0, $iStart = -1, $iPerPage = -1, $sFilter = '', $aModules = array(), $iTimeline = -1)
     {
-    	if(empty($sProfileModule))
-    		return array();
+        $sView = BX_TIMELINE_VIEW_OUTLINE;
 
-    	if(empty($iProfileContentId) && bx_get('id') !== false)
-    		$iProfileContentId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        return $this->_serviceGetBlockViewProfile($sProfileModule, $iProfileContentId, $sView, $iStart, $iPerPage, $sFilter, $aModules, $iTimeline);
+    }
 
-		$oProfile = BxDolProfile::getInstanceByContentAndType($iProfileContentId, $sProfileModule);
-		if(empty($oProfile))
-			return array();
+    public function serviceGetBlockViewHome($iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
+    {
+        return $this->_serviceGetBlockViewByType($iProfileId, BX_TIMELINE_VIEW_TIMELINE, BX_BASE_MOD_NTFS_TYPE_PUBLIC, $iStart, $iPerPage, $this->_oConfig->getPerPage('home'), $iTimeline, $sFilter, $aModules);
+    }
 
-        return $this->getBlockView($oProfile->id(), $iStart, $iPerPage, $sFilter, $aModules, $iTimeline);
+	public function serviceGetBlockViewHomeOutline($iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
+    {
+        return $this->_serviceGetBlockViewByType($iProfileId, BX_TIMELINE_VIEW_OUTLINE, BX_BASE_MOD_NTFS_TYPE_PUBLIC, $iStart, $iPerPage, $this->_oConfig->getPerPage('home'), $iTimeline, $sFilter, $aModules);
     }
 
     public function serviceGetBlockViewAccount($iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
     {
-        $aParams = $this->_prepareParams(BX_BASE_MOD_NTFS_TYPE_CONNECTIONS, $iProfileId, $iStart, $iPerPage, $sFilter, $aModules, $iTimeline);
-        $aParams['per_page'] = (int)$iPerPage > 0 ? $iPerPage : $this->_oConfig->getPerPage('account');
-
-        $this->_iOwnerId = $aParams['owner_id'];
-
-        $sContent = $this->_oTemplate->getViewBlock($aParams);
-        return array('content' => $sContent);
+        return $this->_serviceGetBlockViewByType($iProfileId, BX_TIMELINE_VIEW_TIMELINE, BX_BASE_MOD_NTFS_TYPE_CONNECTIONS, $iStart, $iPerPage, $this->_oConfig->getPerPage('account'), $iTimeline, $sFilter, $aModules);
     }
 
-	public function serviceGetBlockViewHome($iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
+    public function serviceGetBlockViewAccountOutline($iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
     {
-        $aParams = $this->_prepareParams(BX_BASE_MOD_NTFS_TYPE_PUBLIC, $iProfileId, $iStart, $iPerPage, $sFilter, $aModules, $iTimeline);
-        $aParams['per_page'] = (int)$iPerPage > 0 ? $iPerPage : $this->_oConfig->getPerPage('home');
-
-        $this->_iOwnerId = $aParams['owner_id'];
-
-        $sContent = $this->_oTemplate->getViewBlock($aParams);
-        return array('content' => $sContent);
+        return $this->_serviceGetBlockViewByType($iProfileId, BX_TIMELINE_VIEW_OUTLINE, BX_BASE_MOD_NTFS_TYPE_CONNECTIONS, $iStart, $iPerPage, $this->_oConfig->getPerPage('account'), $iTimeline, $sFilter, $aModules);
     }
 
     public function serviceGetBlockItem()
@@ -549,51 +574,6 @@ class BxTimelineModule extends BxBaseModNotificationsModule
     /*
      * COMMON METHODS
      */
-	public function getBlockPost($iProfileId)
-    {
-    	if(!$iProfileId)
-            return array();
-
-        $this->_iOwnerId = $iProfileId;
-
-        if($this->isAllowedPost() !== true)
-            return array();
-
-		$sContent = $this->_oTemplate->getPostBlock($this->_iOwnerId);
-        return array('content' => $sContent);
-    }
-
-    public function getBlockView($iProfileId, $iStart = -1, $iPerPage = -1, $sFilter = '', $aModules = array(), $iTimeline = -1)
-    {
-        if(!$iProfileId)
-			return array();
-
-        $sJsObject = $this->_oConfig->getJsObject('view');
-        $aParams = $this->_prepareParams(BX_BASE_MOD_NTFS_TYPE_OWNER, $iProfileId, $iStart, $iPerPage, $sFilter, $aModules, $iTimeline);
-        $aParams['per_page'] = (int)$iPerPage > 0 ? $iPerPage : $this->_oConfig->getPerPage('profile');
-
-        $this->_iOwnerId = $aParams['owner_id'];
-        list($sUserName, $sUserUrl) = $this->getUserInfo($aParams['owner_id']);
-
-        $aMenu = array(
-            array('id' => 'timeline-view-all', 'name' => 'timeline-view-all', 'class' => '', 'link' => 'javascript:void(0)', 'onclick' => 'javascript:' . $sJsObject . '.changeFilter(this)', 'target' => '_self', 'title' => _t('_bx_timeline_menu_item_view_all'), 'active' => 1),
-            array('id' => 'timeline-view-owner', 'name' => 'timeline-view-owner', 'class' => '', 'link' => 'javascript:void(0)', 'onclick' => 'javascript:' . $sJsObject . '.changeFilter(this)', 'target' => '_self', 'title' => _t('_bx_timeline_menu_item_view_owner', $sUserName)),
-            array('id' => 'timeline-view-other', 'name' => 'timeline-view-other', 'class' => '', 'link' => 'javascript:void(0)', 'onclick' => 'javascript:' . $sJsObject . '.changeFilter(this)', 'target' => '_self', 'title' => _t('_bx_timeline_menu_item_view_other')),
-            array('id' => 'timeline-get-rss', 'name' => 'timeline-get-rss', 'class' => '', 'link' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'rss/' . $iProfileId . '/', 'target' => '_blank', 'title' => _t('_bx_timeline_menu_item_get_rss')),
-        );
-
-        $sContent = '';
-        $oProfileOwner = BxDolProfile::getInstance($this->_iOwnerId);
-        bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_view', $this->_iOwnerId, $this->getUserId(), array('override_content' => &$sContent, 'params' => &$aParams, 'menu' => &$aMenu));
-
-        $oMenu = new BxTemplMenuInteractive(array('template' => 'menu_interactive_vertical.html', 'menu_id'=> 'timeline-view-all', 'menu_items' => $aMenu));
-        $oMenu->setSelected('', 'timeline-view-all');
-
-        if (!$sContent)
-            $sContent = $this->_oTemplate->getViewBlock($aParams);
-
-        return array('content' => $sContent, 'menu' => $oMenu);
-    }
     public function deleteEvent($aEvent)
     {
     	if(empty($aEvent) || !is_array($aEvent) || !$this->_oDb->deleteEvent(array('id' => (int)$aEvent['id'])))
@@ -787,19 +767,16 @@ class BxTimelineModule extends BxBaseModNotificationsModule
     }
 
     //--- Check permissions methods ---//
-
     public function isAllowedPost($bPerform = false)
     {
         if(isAdmin())
             return true;
 
         $iUserId = $this->getUserId();
-        if($this->_iOwnerId == $this->getUserId())
-            return true;
-
         $aCheckResult = checkActionModule($iUserId, 'post', $this->getName(), $bPerform);
 
-        if ($oProfileOwner = BxDolProfile::getInstance($this->_iOwnerId))
+        $oProfileOwner = BxDolProfile::getInstance($this->_iOwnerId);
+        if($oProfileOwner !== false)
             bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_post', $oProfileOwner->id(), $iUserId, array('check_result' => &$aCheckResult));
 
         return $aCheckResult[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED ? $aCheckResult[CHECK_ACTION_MESSAGE] : true;
@@ -807,6 +784,9 @@ class BxTimelineModule extends BxBaseModNotificationsModule
 
     public function isAllowedDelete($aEvent, $bPerform = false)
     {
+        if(!isLogged())
+            return false;
+
         if(isAdmin())
             return true;
 
@@ -1041,6 +1021,97 @@ class BxTimelineModule extends BxBaseModNotificationsModule
         return array($sSystem, $iObjectId, $iCount);
     }
 
+    /**
+     * Protected Methods 
+     */
+    protected function _serviceGetBlockView($iProfileId = 0, $sView = BX_TIMELINE_VIEW_DEFAULT)
+    {
+        if(empty($iProfileId) && bx_get('profile_id') !== false)
+			$iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
+
+		if(empty($iProfileId) && isLogged())
+			$iProfileId = bx_get_logged_profile_id();
+
+        $aBlock = $this->_getBlockView($iProfileId, $sView);
+        if(!empty($aBlock))
+            return $aBlock;
+
+        return array('content' => MsgBox(_t('_bx_timeline_txt_msg_no_results')));
+    }
+
+    protected function _serviceGetBlockViewProfile($sProfileModule = 'bx_persons', $iProfileContentId = 0, $sView = BX_TIMELINE_VIEW_DEFAULT, $iStart = -1, $iPerPage = -1, $sFilter = '', $aModules = array(), $iTimeline = -1)
+    {
+    	if(empty($sProfileModule))
+    		return array();
+
+    	if(empty($iProfileContentId) && bx_get('id') !== false)
+    		$iProfileContentId = bx_process_input(bx_get('id'), BX_DATA_INT);
+
+		$oProfile = BxDolProfile::getInstanceByContentAndType($iProfileContentId, $sProfileModule);
+		if(empty($oProfile))
+			return array();
+
+        return $this->_getBlockView($oProfile->id(), $sView, $iStart, $iPerPage, $sFilter, $aModules, $iTimeline);
+    }
+
+    protected function _serviceGetBlockViewByType($iProfileId = 0, $sView = BX_TIMELINE_VIEW_DEFAULT, $sType = BX_TIMELINE_TYPE_DEFAULT, $iStart = -1, $iPerPage = -1, $iPerPageDefault = -1,  $iTimeline = -1, $sFilter = '', $aModules = array())
+    {
+        $aParams = $this->_prepareParams($sType, $iProfileId, $iStart, $iPerPage, $sFilter, $aModules, $iTimeline);
+
+        $aParams['view'] = $sView;
+        $aParams['per_page'] = (int)$iPerPage > 0 ? $iPerPage : ((int)$iPerPageDefault > 0 ? $iPerPageDefault : $this->_oConfig->getPerPage());
+
+        $this->_iOwnerId = $aParams['owner_id'];
+
+        $sContent = $this->_oTemplate->getViewBlock($aParams);
+        return array('content' => $sContent);
+    }
+
+    protected function _getBlockPost($iProfileId)
+    {
+        $this->_iOwnerId = $iProfileId;
+
+        if($this->isAllowedPost() !== true)
+            return array();
+
+		$sContent = $this->_oTemplate->getPostBlock($this->_iOwnerId);
+        return array('content' => $sContent);
+    }
+
+    protected function _getBlockView($iProfileId, $sView = BX_TIMELINE_VIEW_DEFAULT, $iStart = -1, $iPerPage = -1, $sFilter = '', $aModules = array(), $iTimeline = -1)
+    {
+        if(!$iProfileId)
+			return array();
+
+        $aParams = $this->_prepareParams(BX_BASE_MOD_NTFS_TYPE_OWNER, $iProfileId, $iStart, $iPerPage, $sFilter, $aModules, $iTimeline);
+
+        $aParams['view'] = $sView;
+        $aParams['per_page'] = (int)$iPerPage > 0 ? $iPerPage : $this->_oConfig->getPerPage('profile');
+
+        $this->_iOwnerId = $aParams['owner_id'];
+        list($sUserName, $sUserUrl) = $this->getUserInfo($aParams['owner_id']);
+
+        $sJsObject = $this->_oConfig->getJsObject('view');
+        $aMenu = array(
+            array('id' => $sView . '-view-all', 'name' => $sView . '-view-all', 'class' => '', 'link' => 'javascript:void(0)', 'onclick' => 'javascript:' . $sJsObject . '.changeFilter(this)', 'target' => '_self', 'title' => _t('_bx_timeline_menu_item_view_all'), 'active' => 1),
+            array('id' => $sView . '-view-owner', 'name' => $sView . '-view-owner', 'class' => '', 'link' => 'javascript:void(0)', 'onclick' => 'javascript:' . $sJsObject . '.changeFilter(this)', 'target' => '_self', 'title' => _t('_bx_timeline_menu_item_view_owner', $sUserName)),
+            array('id' => $sView . '-view-other', 'name' => $sView . '-view-other', 'class' => '', 'link' => 'javascript:void(0)', 'onclick' => 'javascript:' . $sJsObject . '.changeFilter(this)', 'target' => '_self', 'title' => _t('_bx_timeline_menu_item_view_other')),
+            array('id' => $sView . '-get-rss', 'name' => $sView . '-get-rss', 'class' => '', 'link' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'rss/' . $iProfileId . '/', 'target' => '_blank', 'title' => _t('_bx_timeline_menu_item_get_rss')),
+        );
+
+        $sContent = '';
+        $oProfileOwner = BxDolProfile::getInstance($this->_iOwnerId);
+        bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_view', $this->_iOwnerId, $this->getUserId(), array('override_content' => &$sContent, 'params' => &$aParams, 'menu' => &$aMenu));
+
+        $oMenu = new BxTemplMenuInteractive(array('template' => 'menu_interactive_vertical.html', 'menu_id'=> $sView . '-view-all', 'menu_items' => $aMenu));
+        $oMenu->setSelected('', $sView . '-view-all');
+
+        if (!$sContent)
+            $sContent = $this->_oTemplate->getViewBlock($aParams);
+
+        return array('content' => $sContent, 'menu' => $oMenu);
+    }
+
 	protected function _isAllowedPin($aEvent, $bPerform = false)
     {
         if(isAdmin())
@@ -1102,46 +1173,53 @@ class BxTimelineModule extends BxBaseModNotificationsModule
 
     protected function _prepareParams($sType, $iOwnerId, $iStart, $iPerPage, $sFilter, $aModules, $iTimeline)
     {
-        $aParams = array();
-        $aParams['browse'] = 'list';
-        $aParams['type'] = !empty($sType) ? $sType : BX_TIMELINE_TYPE_DEFAULT;
-        $aParams['owner_id'] = (int)$iOwnerId != 0 ? $iOwnerId : $this->getUserId();
-        $aParams['start'] = (int)$iStart > 0 ? $iStart : 0;
-        $aParams['per_page'] = (int)$iPerPage > 0 ? $iPerPage : $this->_oConfig->getPerPage();
-        $aParams['filter'] = !empty($sFilter) ? $sFilter : BX_TIMELINE_FILTER_ALL;
-        $aParams['modules'] = is_array($aModules) && !empty($aModules) ? $aModules : array();
-        $aParams['timeline'] = (int)$iTimeline > 0 ? $iTimeline : 0;
-        $aParams['active'] = 1;
-        $aParams['hidden'] = 0;
-
-        return $aParams;
+        return array(
+            'view' => BX_TIMELINE_VIEW_DEFAULT,
+
+            'browse' => 'list',
+            'type' => !empty($sType) ? $sType : BX_TIMELINE_TYPE_DEFAULT,
+            'owner_id' => (int)$iOwnerId != 0 ? $iOwnerId : $this->getUserId(),
+            'filter' => !empty($sFilter) ? $sFilter : BX_TIMELINE_FILTER_ALL,
+            'modules' => is_array($aModules) && !empty($aModules) ? $aModules : array(),
+            'timeline' => (int)$iTimeline > 0 ? $iTimeline : 0,
+            'active' => 1,
+            'hidden' => 0,
+
+            'start' => (int)$iStart > 0 ? $iStart : 0,
+            'per_page' => (int)$iPerPage > 0 ? $iPerPage : $this->_oConfig->getPerPage(),
+        );
     }
 
     protected function _prepareParamsGet()
     {
-        $aParams = array();
-        $aParams['browse'] = 'list';
-        $aParams['dynamic_mode'] = true;
+        $aParams = array(
+            'browse' => 'list',
+            'dynamic_mode' => true,
+        );
+
+        $aParams['view'] = bx_get('view');
+        $aParams['view'] = $aParams['view'] !== false ? bx_process_input($aParams['view'], BX_DATA_TEXT) : BX_TIMELINE_VIEW_DEFAULT;
 
-        $sType = bx_get('type');
-        $aParams['type'] = $sType !== false ? bx_process_input($sType, BX_DATA_TEXT) : BX_TIMELINE_TYPE_DEFAULT;
+        $aParams['type'] = bx_get('type');
+        $aParams['type'] = $aParams['type'] !== false ? bx_process_input($aParams['type'], BX_DATA_TEXT) : BX_TIMELINE_TYPE_DEFAULT;
 
-        $aParams['owner_id'] = $sType !== false ? bx_process_input(bx_get('owner_id'), BX_DATA_INT) : $this->getUserId();
+        $aParams['owner_id'] = bx_get('owner_id');
+        $aParams['owner_id'] = $aParams['owner_id'] !== false ? bx_process_input($aParams['owner_id'], BX_DATA_INT) : $this->getUserId();
 
-        $iStart = bx_get('start');
-        $aParams['start'] = $iStart !== false ? bx_process_input($iStart, BX_DATA_INT) : 0;
+        $aParams['start'] = bx_get('start');
+        $aParams['start'] = $aParams['start'] !== false ? bx_process_input($aParams['start'], BX_DATA_INT) : 0;
 
-        $iPerPage = bx_get('per_page');
-        $aParams['per_page'] = $iPerPage !== false ? bx_process_input($iPerPage, BX_DATA_INT) : $this->_oConfig->getPerPage();
+        $aParams['per_page'] = bx_get('per_page');
+        $aParams['per_page'] = $aParams['per_page'] !== false ? bx_process_input($aParams['per_page'], BX_DATA_INT) : $this->_oConfig->getPerPage();
 
-        $sFilter = bx_get('filter');
-        $aParams['filter'] = $sFilter !== false ? bx_process_input($sFilter, BX_DATA_TEXT) : BX_TIMELINE_FILTER_ALL;
+        $aParams['filter'] = bx_get('filter');
+        $aParams['filter'] = $aParams['filter'] !== false ? bx_process_input($aParams['filter'], BX_DATA_TEXT) : BX_TIMELINE_FILTER_ALL;
 
-        $aModules = bx_get('modules');
-        $aParams['modules'] = $aModules !== false ? bx_process_input($aModules, BX_DATA_TEXT) : array();
+        $aParams['modules'] = bx_get('modules');
+        $aParams['modules'] = $aParams['modules'] !== false ? bx_process_input($aParams['modules'], BX_DATA_TEXT) : array();
 
-        $iTimeline = bx_get('timeline');
-        $aParams['timeline'] = $iTimeline !== false ? bx_process_input($iTimeline, BX_DATA_INT) : 0;
+        $aParams['timeline'] = bx_get('timeline');
+        $aParams['timeline'] = $aParams['timeline'] !== false ? bx_process_input($aParams['timeline'], BX_DATA_INT) : 0;
 
         $aParams['active'] = 1;
         $aParams['hidden'] = 0;

+ 114 - 31
modules/boonex/timeline/classes/BxTimelineTemplate.php

@@ -11,9 +11,13 @@
 
 class BxTimelineTemplate extends BxBaseModNotificationsTemplate
 {
+    protected $_bShowTimelineDividers;
+
     function __construct(&$oConfig, &$oDb)
     {
         parent::__construct($oConfig, $oDb);
+
+        $this->_bShowTimelineDividers = false;
     }
 
     public function getCssJs()
@@ -32,6 +36,7 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
             'jquery.ba-resize.min.js',
         	'autosize.min.js',
             'masonry.pkgd.min.js',
+            'modernizr.js',
         	'flickity/flickity.pkgd.min.js',
             'post.js',
             'share.js',
@@ -54,15 +59,17 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
 
     public function getViewBlock($aParams)
     {
-        list($sContent, $sLoadMore, $sBack) = $this->getPosts($aParams);
+        list($sContent, $sLoadMore, $sBack, $sEmpty) = $this->getPosts($aParams);
 
         return $this->parseHtmlByName('block_view.html', array(
             'style_prefix' => $this->_oConfig->getPrefix('style'),
-        	'html_id' => $this->_oConfig->getHtmlIds('view', 'main'),
+        	'html_id' => $this->_oConfig->getHtmlIds('view', 'main_' . $aParams['view']),
+            'view' => $aParams['view'],
             'back' => $sBack,
+            'empty' => $sEmpty, 
             'content' => $sContent,
             'load_more' =>  $sLoadMore,
-        	'view_image_popup' => $this->_getImagePopup(),
+        	'view_image_popup' => $this->_getImagePopup($aParams),
             'js_content' => $this->getJsCode('view', array(
             	'oRequestParams' => array(
 	                'type' => $aParams['type'],
@@ -83,9 +90,14 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
         if(empty($aEvent))
             return '';
 
+        $aParams = array(
+        	'view' => BX_TIMELINE_VIEW_DEFAULT, 
+        	'type' => BX_TIMELINE_TYPE_ITEM
+        );
+         
         $sContent = $this->getJsCode('view');
-        $sContent .= $this->getPost($aEvent, array('type' => BX_TIMELINE_TYPE_ITEM));
-        $sContent .= $this->_getImagePopup();
+        $sContent .= $this->getPost($aEvent, $aParams);
+        $sContent .= $this->_getImagePopup($aParams);
 
         return $sContent;
     }
@@ -98,12 +110,9 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
 
         list($sUserName) = $this->getModule()->getUserInfo($aResult['owner_id']);
 
+        $sSample = !empty($aResult['sample']) ? $aResult['sample'] : '_bx_timeline_txt_sample';
         if(empty($aEvent['title']) || empty($aEvent['description'])) {
-            $sTitle = !empty($aResult['title']) ? $aResult['title'] : '';
-            if($sTitle == '') {
-                $sSample = !empty($aResult['content']['sample']) ? $aResult['content']['sample'] : '_bx_timeline_txt_sample';
-                $sTitle = _t('_bx_timeline_txt_user_added_sample', $sUserName, _t($sSample));
-            }
+            $sTitle = !empty($aResult['title']) ? $aResult['title'] : _t('_bx_timeline_txt_user_added_sample', $sUserName, _t($sSample));
 
             $sDescription = !empty($aResult['description']) ? $aResult['description'] : '';
             if($sDescription == '' && !empty($aResult['content']['text']))
@@ -116,6 +125,9 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
         }
 
         $aEvent['object_owner_id'] = $aResult['owner_id'];
+        $aEvent['icon'] = !empty($aResult['icon']) ? $aResult['icon'] : '';
+        $aEvent['sample'] = $sSample;
+        $aEvent['sample_action'] = !empty($aResult['sample_action']) ? $aResult['sample_action'] : '_bx_timeline_txt_added_sample';
         $aEvent['content'] = $aResult['content'];
         $aEvent['votes'] = $aResult['votes'];
         $aEvent['reports'] = $aResult['reports'];
@@ -127,12 +139,15 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
 
     public function getPosts($aParams)
     {
+        $bViewTimeline = $aParams['view'] == BX_TIMELINE_VIEW_TIMELINE;
+
         $iStart = $aParams['start'];
         $iPerPage = $aParams['per_page'];
 
         $aParamsDb = $aParams;
 
         //--- Check for Previous
+        $iDays = -1;
         $bPrevious = false;
         if($iStart - 1 >= 0) {
             $aParamsDb['start'] -= 1;
@@ -145,8 +160,10 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
         $aEvents = $this->_oDb->getEvents($aParamsDb);
 
         //--- Check for Previous
-        if($bPrevious)
+        if($bPrevious) {
             $aEvent = array_shift($aEvents);
+            $iDays = (int)$aEvent['days'];
+        }
 
         //--- Check for Next
         $bNext = false;
@@ -156,22 +173,30 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
         }
 
         $iEvents = count($aEvents);
-        $sContent = $this->getEmpty($iEvents <= 0);
+        $sContent = '';
+        if($bViewTimeline && $iEvents <= 0)
+        	$sContent .= $this->getDividerToday();
 
+        $bFirst = true;
         foreach($aEvents as $aEvent) {
             $sEvent = $this->getPost($aEvent, $aParams);
-            if(empty($sEvent))
+            $bEvent = !empty($sEvent);
+            if(!$bEvent)
                 continue;
 
+            if($bViewTimeline && $bFirst) {
+                $sContent .= $this->getDividerToday($aEvent);
+                $bFirst = false;
+            }
+
+            $sContent .= $bViewTimeline && $bEvent ? $this->getDivider($iDays, $aEvent) : '';
             $sContent .= $sEvent;
         }
 
-        $iYearSel = (int)$aParams['timeline'];
-        $iYearMin = $this->_oDb->getMaxDuration($aParams);
-
-        $sBack = $this->getBack($iYearSel);
-        $sLoadMore = $this->getLoadMore($iStart, $iPerPage, $bNext, $iYearSel, $iYearMin, $iEvents > 0);
-        return array($sContent, $sLoadMore, $sBack);
+        $sBack = $this->getBack($aParams);
+        $sLoadMore = $this->getLoadMore($aParams, $bNext, $iEvents > 0);
+        $sEmpty = $this->getEmpty($iEvents <= 0);
+        return array($sContent, $sLoadMore, $sBack, $sEmpty);
     }
 
     public function getEmpty($bVisible)
@@ -183,8 +208,48 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
         ));
     }
 
-    public function getBack($iYearSel)
+    public function getDivider(&$iDays, &$aEvent)
     {
+        if(!$this->_bShowTimelineDividers || $iDays == $aEvent['days'])
+            return '';
+
+        $iDays = $aEvent['days'];
+        $iDaysAgo = (int)$aEvent['ago_days'];
+        if($aEvent['today'] == $aEvent['days'] || (($aEvent['today'] - $aEvent['days']) == 1 && $iDaysAgo == 0))
+            return '';
+
+        return $this->parseHtmlByName('divider.html', array(
+        	'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'type' => 'common',
+            'bx_if:show_hidden' => array(
+                'condition' => false,
+                'content' => array()
+            ),
+            'content' => bx_time_js($aEvent['date'])
+        ));
+    }
+
+    public function getDividerToday($aEvent = array())
+    {
+        if(!$this->_bShowTimelineDividers)
+            return '';
+
+    	$bToday = !empty($aEvent) && ($aEvent['today'] == $aEvent['days'] || (($aEvent['today'] - $aEvent['days']) == 1 && (int)$aEvent['ago_days'] == 0));
+
+        return $this->parseHtmlByName('divider.html', array(
+        	'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'type' => 'today',
+        	'bx_if:show_hidden' => array(
+                'condition' => !$bToday,
+                'content' => array()
+            ),
+            'content' => _t('_bx_timeline_txt_today')
+        ));
+    }
+
+    public function getBack($aParams)
+    {
+        $iYearSel = (int)$aParams['timeline'];
         if($iYearSel == 0)
             return '';
 
@@ -203,8 +268,13 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
         ));
     }
 
-    public function getLoadMore($iStart, $iPerPage, $bEnabled, $iYearSel, $iYearMin, $bVisible = true)
+    public function getLoadMore($aParams, $bEnabled, $bVisible = true)
     {
+        $iStart = $aParams['start'];
+        $iPerPage = $aParams['per_page'];
+        $iYearSel = (int)$aParams['timeline'];
+        $iYearMin = $this->_oDb->getMaxDuration($aParams);
+
         $sStylePrefix = $this->_oConfig->getPrefix('style');
         $sJsObject = $this->_oConfig->getJsObject('view');
 
@@ -226,7 +296,7 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
 
         $aTmplVars = array(
             'style_prefix' => $sStylePrefix,
-            'visible' => $bEnabled && $bVisible ? 'block' : 'none',
+            'visible' => ($aParams['view'] == BX_TIMELINE_VIEW_TIMELINE && $bVisible) || ($aParams['view'] == BX_TIMELINE_VIEW_OUTLINE && $bEnabled && $bVisible) ? 'block' : 'none',
             'bx_if:is_disabled' => array(
                 'condition' => !$bEnabled,
                 'content' => array()
@@ -491,6 +561,8 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
 
     protected function _getPost($sType, $aEvent, $aBrowseParams = array())
     {
+        $CNF = &$this->_oConfig->CNF;
+
         $oModule = $this->getModule();
         $sStylePrefix = $this->_oConfig->getPrefix('style');
         $sJsObject = $this->_oConfig->getJsObject('view');
@@ -505,6 +577,7 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
             $aTmplVarsTimelineOwner = $this->_getTmplVarsTimelineOwner($aEvent);
 
         $bBrowseItem = isset($aBrowseParams['type']) && $aBrowseParams['type'] == BX_TIMELINE_TYPE_ITEM;
+        $bViewTimeline = isset($aBrowseParams['view']) && $aBrowseParams['view'] == BX_TIMELINE_VIEW_TIMELINE;
 
         $oMetatags = BxDolMetatags::getObjectInstance($this->_oConfig->getObject('metatags'));
  		$sLocation = $oMetatags->locationsString($aEvent['id']);
@@ -512,22 +585,25 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
         $aTmplVars = array (
             'style_prefix' => $sStylePrefix,
             'js_object' => $sJsObject,
-        	'html_id' => $this->_oConfig->getHtmlIds('view', 'item') . $aEvent['id'],
-            'class' => $bBrowseItem ? 'bx-tl-view-sizer' : 'bx-tl-grid-sizer',
+        	'html_id' => $this->_oConfig->getHtmlIds('view', 'item_' . $aBrowseParams['view']) . $aEvent['id'],
+            'class' => $bBrowseItem || $bViewTimeline ? 'bx-tl-view-sizer' : 'bx-tl-grid-sizer',
         	'class_content' => $bBrowseItem ? 'bx-def-color-bg-block' : 'bx-def-color-bg-box',
-            'bx_if:show_icon' => array(
+            'id' => $aEvent['id'],
+            'bx_if:show_owner_icon' => array(
                 'condition' => $bAuthorIcon,
                 'content' => array(
-                    'author_icon' => $sAuthorIcon
+                    'owner_icon' => $sAuthorIcon
                 )
             ),
-            'bx_if:show_icon_empty' => array(
+            'bx_if:show_owner_icon_empty' => array(
                 'condition' => !$bAuthorIcon,
                 'content' => array()
             ),
+            'item_icon' => !empty($aEvent['icon']) ? $aEvent['icon'] : $CNF['ICON'],
             'item_owner_url' => $sAuthorUrl,
             'item_owner_title' => bx_html_attribute($sAuthorName),
             'item_owner_name' => $sAuthorName,
+            'item_owner_action' => _t($aEvent['sample_action'], _t($aEvent['sample'])),
             'bx_if:show_timeline_owner' => array(
                 'condition' => !empty($aTmplVarsTimelineOwner),
                 'content' => $aTmplVarsTimelineOwner
@@ -555,7 +631,7 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
             'comments' => $bBrowseItem ? $this->_getComments($aEvent['comments']) : '',
         );
 
-        return $this->parseHtmlByName('item.html', $aTmplVars);
+        return $this->parseHtmlByName('item_' . $aBrowseParams['view'] . '.html', $aTmplVars);
     }
 
     protected function _getContent($sType, $aEvent, $aBrowseParams = array())
@@ -578,9 +654,9 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
         return $this->getComments($sSystem, $iObjectId);
     }
 
-    protected function _getImagePopup()
+    protected function _getImagePopup($aParams)
     {
-        $sViewImagePopupId = $this->_oConfig->getHtmlIds('view', 'photo_popup');
+        $sViewImagePopupId = $this->_oConfig->getHtmlIds('view', 'photo_popup_' . $aParams['view']);
         $sViewImagePopupContent = $this->parseHtmlByName('popup_image.html', array(
     		'image_url' => ''
     	));
@@ -591,7 +667,7 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
     protected function _getTmplVarsMenuItemActions(&$aEvent, $aBrowseParams = array())
     {
         $oMenu = BxDolMenu::getObjectInstance($this->_oConfig->getObject('menu_item_actions'));
-        $oMenu->setEvent($aEvent);
+        $oMenu->setEvent($aBrowseParams['view'], $aEvent);
         $oMenu->setDynamicMode(isset($aBrowseParams['dynamic_mode']) && $aBrowseParams['dynamic_mode'] === true);
 
         $sMenu = $oMenu->getCode();
@@ -614,6 +690,7 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
             list($sTimelineAuthorName, $sTimelineAuthorUrl) = $oModule->getUserInfo($aEvent['owner_id']);
 
             $aTmplVarsTimelineOwner = array(
+            	'style_prefix' => $this->_oConfig->getPrefix('style'),
                 'owner_url' => $sTimelineAuthorUrl,
                 'owner_username' => $sTimelineAuthorName,
             );
@@ -857,6 +934,8 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
 
     protected function _getCommonData(&$aEvent)
     {
+        $CNF = $this->_oConfig->CNF;
+
         $oModule = $this->getModule();
         $sJsObject = $this->_oConfig->getJsObject('view');
         $sPrefix = $this->_oConfig->getPrefix('common_post');
@@ -864,9 +943,13 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
 
         $aResult = array(
             'owner_id' => $aEvent['object_id'],
+            'icon' => $CNF['ICON'],
+        	'sample' => '_bx_timeline_txt_sample_with_article',
+        	'sample_action' => '_bx_timeline_txt_added_sample',
             'content_type' => $sType,
             'content' => array(
                 'sample' => '_bx_timeline_txt_sample',
+        		'sample_action' => '_bx_timeline_txt_added_sample',
                 'url' => $this->_oConfig->getItemViewUrl($aEvent)
             ), //a string to display or array to parse default template before displaying.
             'votes' => '',

+ 11 - 5
modules/boonex/timeline/install/langs/en.xml

@@ -59,13 +59,16 @@
 	<string name="_bx_timeline_page_title_account"><![CDATA[Timeline]]></string>
 	<string name="_bx_timeline_page_block_title_post"><![CDATA[Post to Timeline]]></string>
 	<string name="_bx_timeline_page_block_title_view"><![CDATA[Timeline]]></string>
-	<string name="_bx_timeline_page_block_title_post_profile_persons"><![CDATA[Post to Timeline]]></string>
-	<string name="_bx_timeline_page_block_title_post_profile_organizations"><![CDATA[Post to Timeline]]></string>
-	<string name="_bx_timeline_page_block_title_view_profile_persons"><![CDATA[Timeline]]></string>
-	<string name="_bx_timeline_page_block_title_view_profile_organizations"><![CDATA[Timeline]]></string>
+	<string name="_bx_timeline_page_block_title_view_outline"><![CDATA[Outline]]></string>
+	<string name="_bx_timeline_page_block_title_post_profile"><![CDATA[Post to Timeline]]></string>
+	<string name="_bx_timeline_page_block_title_view_profile"><![CDATA[Timeline]]></string>	
+	<string name="_bx_timeline_page_block_title_view_profile_outline"><![CDATA[Outline]]></string>
 	<string name="_bx_timeline_page_block_title_item"><![CDATA[Item]]></string>
 	<string name="_bx_timeline_page_block_title_view_account"><![CDATA[Subscriptions Timeline]]></string>
-	<string name="_bx_timeline_page_block_title_view_home"><![CDATA[Outline]]></string>
+	<string name="_bx_timeline_page_block_title_view_account_outline"><![CDATA[Subscriptions Outline]]></string>
+	<string name="_bx_timeline_page_block_title_post_home"><![CDATA[Post to Timeline]]></string>
+	<string name="_bx_timeline_page_block_title_view_home"><![CDATA[Timeline]]></string>
+	<string name="_bx_timeline_page_block_title_view_home_outline"><![CDATA[Outline]]></string>
 	<string name="_bx_timeline_page_block_title_browse_cmts"><![CDATA[Timelines' Comments]]></string>
 
     <string name="_bx_timeline_menu_item_view_all"><![CDATA[All posts]]></string>
@@ -124,12 +127,15 @@
 	<string name="_bx_timeline_txt_pinned"><![CDATA[Pinned post]]></string>
 
 	<string name="_bx_timeline_txt_rss_caption"><![CDATA[{0}'s timeline]]></string>
+	<string name="_bx_timeline_txt_added_sample"><![CDATA[added {0}]]></string>
 	<string name="_bx_timeline_txt_user_added_sample"><![CDATA[{0} added {1}]]></string>
 	<string name="_bx_timeline_txt_user_shared_sample"><![CDATA[{0} reposted {1}'s {2}]]></string>
 	<string name="_bx_timeline_txt_sample"><![CDATA[post]]></string>
+	<string name="_bx_timeline_txt_sample_with_article"><![CDATA[a post]]></string>
 	<string name="_bx_timeline_txt_sample_ext"><![CDATA[timeline post]]></string>
 	<string name="_bx_timeline_txt_sample_comment_single"><![CDATA[timeline post's comment]]></string>
     <string name="_bx_timeline_txt_sample_vote_single"><![CDATA[timeline post's vote]]></string>
+    <string name="_bx_timeline_txt_today"><![CDATA[Today]]></string>
 
 	<string name="_bx_timeline_txt_do_share"><![CDATA[Repost]]></string>
 	<string name="_bx_timeline_txt_shared"><![CDATA[Reposted {0}'s {1}.]]></string>

+ 15 - 9
modules/boonex/timeline/install/sql/enable.sql

@@ -6,6 +6,7 @@ INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `lay
 INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
 ('bx_timeline_view', 1, 'bx_timeline', '_bx_timeline_page_block_title_post', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:14:"get_block_post";}', 0, 0, 1),
 ('bx_timeline_view', 1, 'bx_timeline', '_bx_timeline_page_block_title_view', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:14:"get_block_view";}', 0, 0, 2),
+('bx_timeline_view', 1, 'bx_timeline', '_bx_timeline_page_block_title_view_outline', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_view_outline";}', 0, 0, 3),
 
 ('bx_timeline_item', 1, 'bx_timeline', '_bx_timeline_page_block_title_item', 0, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:14:"get_block_item";}', 0, 0, 1);
 
@@ -13,23 +14,28 @@ INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designb
 SET @iPBCellDashboard = 1;
 SET @iPBOrderDashboard = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_pages_blocks` WHERE `object` = 'sys_dashboard' AND `cell_id` = @iPBCellDashboard LIMIT 1);
 INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
-('sys_dashboard', @iPBCellDashboard, 'bx_timeline', '_bx_timeline_page_block_title_view_account', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_view_account";}', 0, 1, @iPBOrderDashboard + 1);
+('sys_dashboard', @iPBCellDashboard, 'bx_timeline', '_bx_timeline_page_block_title_view_account', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_view_account";}', 0, 1, @iPBOrderDashboard + 1),
+('sys_dashboard', @iPBCellDashboard, 'bx_timeline', '_bx_timeline_page_block_title_view_account_outline', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:30:"get_block_view_account_outline";}', 0, 1, @iPBOrderDashboard + 2);
 
 -- PAGES: add page block on home
 SET @iPBCellHome = 1;
 SET @iPBOrderHome = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_pages_blocks` WHERE `object` = 'sys_home' AND `cell_id` = @iPBCellHome ORDER BY `order` DESC LIMIT 1);
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
-('sys_home', @iPBCellHome, 'bx_timeline', '_bx_timeline_page_block_title_view_home', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:19:"get_block_view_home";}', 0, 1, @iPBOrderHome + 1);
+('sys_home', @iPBCellHome, 'bx_timeline', '_bx_timeline_page_block_title_post_home', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:19:"get_block_post_home";}', 0, 1, @iPBOrderHome + 1),
+('sys_home', @iPBCellHome, 'bx_timeline', '_bx_timeline_page_block_title_view_home', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:19:"get_block_view_home";}', 0, 1, @iPBOrderHome + 2),
+('sys_home', @iPBCellHome, 'bx_timeline', '_bx_timeline_page_block_title_view_home_outline', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:27:"get_block_view_home_outline";}', 0, 1, @iPBOrderHome + 3);
 
 -- PAGES: add page block to profiles modules (trigger* page objects are processed separately upon modules enable/disable)
 SET @iPBCellProfile = 2;
 SET @iPBCellGroup = 4;
 INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
-('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_timeline', '_bx_timeline_page_block_title_post_profile_persons', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_post_profile";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 0),
-('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_timeline', '_bx_timeline_page_block_title_view_profile_persons', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_view_profile";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 0),
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_timeline', '_bx_timeline_page_block_title_post_profile', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_post_profile";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 0),
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_timeline', '_bx_timeline_page_block_title_view_profile', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_view_profile";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 0),
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_timeline', '_bx_timeline_page_block_title_view_profile_outline', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:30:"get_block_view_profile_outline";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 0),
 
-('trigger_page_group_view_entry', @iPBCellGroup, 'bx_timeline', '_bx_timeline_page_block_title_post_profile_persons', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_post_profile";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 0),
-('trigger_page_group_view_entry', @iPBCellGroup, 'bx_timeline', '_bx_timeline_page_block_title_view_profile_persons', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_view_profile";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 0);
+('trigger_page_group_view_entry', @iPBCellGroup, 'bx_timeline', '_bx_timeline_page_block_title_post_profile', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_post_profile";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 0),
+('trigger_page_group_view_entry', @iPBCellGroup, 'bx_timeline', '_bx_timeline_page_block_title_view_profile', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_view_profile";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 0),
+('trigger_page_group_view_entry', @iPBCellGroup, 'bx_timeline', '_bx_timeline_page_block_title_view_profile_outline', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_view_profile_outline";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 0);
 
 -- MENU: Item Manage (Delete)
 INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
@@ -39,8 +45,8 @@ INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
 ('bx_timeline_menu_item_manage', 'bx_timeline', '_bx_timeline_menu_set_title_item_manage', 0);
 
 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 
-('bx_timeline_menu_item_manage', 'bx_timeline', 'item-pin', '_bx_timeline_menu_item_title_system_item_pin', '_bx_timeline_menu_item_title_item_pin', 'javascript:void(0)', 'javascript:{js_object_view}.pinPost(this, {content_id})', '_self', 'thumb-tack', '', 2147483647, 1, 0, 0),
-('bx_timeline_menu_item_manage', 'bx_timeline', 'item-unpin', '_bx_timeline_menu_item_title_system_item_unpin', '_bx_timeline_menu_item_title_item_unpin', 'javascript:void(0)', 'javascript:{js_object_view}.unpinPost(this, {content_id})', '_self', 'thumb-tack', '', 2147483647, 1, 0, 1),
+('bx_timeline_menu_item_manage', 'bx_timeline', 'item-pin', '_bx_timeline_menu_item_title_system_item_pin', '_bx_timeline_menu_item_title_item_pin', 'javascript:void(0)', 'javascript:{js_object_view}.pinPost(this, {content_id}, 1)', '_self', 'thumb-tack', '', 2147483647, 1, 0, 0),
+('bx_timeline_menu_item_manage', 'bx_timeline', 'item-unpin', '_bx_timeline_menu_item_title_system_item_unpin', '_bx_timeline_menu_item_title_item_unpin', 'javascript:void(0)', 'javascript:{js_object_view}.pinPost(this, {content_id}, 0)', '_self', 'thumb-tack', '', 2147483647, 1, 0, 1),
 ('bx_timeline_menu_item_manage', 'bx_timeline', 'item-delete', '_bx_timeline_menu_item_title_system_item_delete', '_bx_timeline_menu_item_title_item_delete', 'javascript:void(0)', 'javascript:{js_object_view}.deletePost(this, {content_id})', '_self', 'remove', '', 2147483647, 1, 0, 2);
 
 -- MENU: Item Actions (Comment, Plus)
@@ -51,7 +57,7 @@ INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
 ('bx_timeline_menu_item_actions', 'bx_timeline', '_bx_timeline_menu_set_title_item_actions', 0);
 
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES 
-('bx_timeline_menu_item_actions', 'bx_timeline', 'item-comment', '_bx_timeline_menu_item_title_system_item_comment', '_bx_timeline_menu_item_title_item_comment', 'javascript:void(0)', 'javascript:{comment_onclick}', '_self', 'comment', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:27:"get_menu_item_addon_comment";s:6:"params";a:2:{i:0;s:16:"{comment_system}";i:1;s:16:"{comment_object}";}}', '', 0, 2147483647, 1, 0, 1, 1),
+('bx_timeline_menu_item_actions', 'bx_timeline', 'item-comment', '_bx_timeline_menu_item_title_system_item_comment', '_bx_timeline_menu_item_title_item_comment', 'javascript:void(0)', 'javascript:{comment_onclick}', '_self', 'comment', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:27:"get_menu_item_addon_comment";s:6:"params";a:3:{i:0;s:16:"{comment_system}";i:1;s:16:"{comment_object}";i:2;s:6:"{view}";}}', '', 0, 2147483647, 1, 0, 1, 1),
 ('bx_timeline_menu_item_actions', 'bx_timeline', 'item-vote', '_bx_timeline_menu_item_title_system_item_vote', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 1, 0, 0, 2),
 ('bx_timeline_menu_item_actions', 'bx_timeline', 'item-share', '_bx_timeline_menu_item_title_system_item_share', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 1, 0, 0, 3),
 ('bx_timeline_menu_item_actions', 'bx_timeline', 'item-report', '_bx_timeline_menu_item_title_system_item_report', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 1, 0, 0, 4),

+ 94 - 13
modules/boonex/timeline/js/main.js

@@ -1,29 +1,51 @@
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Timeline Timeline
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
 function BxTimelineMain() {
 	this.sIdPost = '#bx-timeline-post';
 
-	this.sIdView = '#bx-timeline';
+	this.sIdView = '#bx-timeline-';
+	this.sIdViewTimeline = '#bx-timeline-timeline';
+	this.sIdViewOutline = '#bx-timeline-outline';
 	this.sIdItem = '#bx-timeline-item-';
+	this.sIdItemTimeline = '#bx-timeline-item-timeline-';
+	this.sIdItemOutline = '#bx-timeline-item-outline-';
 
 	this.sSP = 'bx-tl';
+	this.sClassView = this.sSP + '-view';
 	this.sClassMasonry = this.sSP + '-masonry';
 	this.sClassItems = this.sSP + '-items';
 	this.sClassItem = this.sSP + '-item';
+	this.sClassDividerToday = this.sSP + '-divider-today';
 	this.sClassItemComments = this.sSP + '-item-comments-holder';
 	this.sClassItemImages = this.sSP + '-item-images';
 	this.sClassItemImage = this.sSP + '-item-image';
+
+	this.oViewTimeline = null;
+	this.bViewTimeline = false;
+
+	this.oViewOutline = null;
+	this.bViewOutline = false;
 }
 
 BxTimelineMain.prototype.isMasonry = function() {
-	return $(this.sIdView + ' .' + this.sClassItems).hasClass(this.sClassMasonry);
+	return $(this.sIdViewOutline + ' .' + this.sClassItems).hasClass(this.sClassMasonry);
 };
 
 BxTimelineMain.prototype.isMasonryEmpty = function() {
-	return $(this.sIdView + ' .' + this.sClassItems + ' .' + this.sClassItem).length == 0;
+	return $(this.sIdViewOutline + ' .' + this.sClassItems + ' .' + this.sClassItem).length == 0;
 };
 
 BxTimelineMain.prototype.initMasonry = function() {
 	var $this = this;
-	var oHolder = $(this.sIdView + ' .' + this.sClassItems);
+	var oHolder = $(this.sIdViewOutline + ' .' + this.sClassItems);
 
 	var oItems = oHolder.find('.' + this.sClassItem);
 	if(oItems.length == 0) 
@@ -40,7 +62,7 @@ BxTimelineMain.prototype.initMasonry = function() {
 };
 
 BxTimelineMain.prototype.destroyMasonry = function() {
-	$(this.sIdView + ' .' + this.sClassItems).removeClass(this.sClassMasonry).masonry('destroy');
+	$(this.sIdViewOutline + ' .' + this.sClassItems).removeClass(this.sClassMasonry).masonry('destroy');
 };
 
 BxTimelineMain.prototype.appendMasonry = function(oItems) {
@@ -52,7 +74,7 @@ BxTimelineMain.prototype.appendMasonry = function(oItems) {
 		$this.reloadMasonry();
 	});
 
-	var oHolder = $(this.sIdView + ' .' + this.sClassItems).masonry('layout').append(oItems);
+	var oHolder = $(this.sIdViewOutline + ' .' + this.sClassItems).masonry('layout').append(oItems);
 	if(!this.isMasonry())
 		this.initMasonry();
 	else
@@ -68,7 +90,7 @@ BxTimelineMain.prototype.prependMasonry = function(oItems) {
 		$this.reloadMasonry();
 	});
 
-	var oHolder = $(this.sIdView + ' .' + this.sClassItems).masonry('layout').prepend(oItems);
+	var oHolder = $(this.sIdViewOutline + ' .' + this.sClassItems).masonry('layout').prepend(oItems);
 	if(!this.isMasonry())
 		this.initMasonry();
 	else
@@ -79,7 +101,7 @@ BxTimelineMain.prototype.removeMasonry = function(oItems, onRemove) {
 	var $this = this;
 	var oItems = $(oItems);
 
-	var oHolder = $(this.sIdView + ' .' + this.sClassItems);
+	var oHolder = $(this.sIdViewOutline + ' .' + this.sClassItems);
 	if(typeof onRemove === 'function')
 		oHolder.masonry('once', 'removeComplete', onRemove);
 
@@ -87,13 +109,13 @@ BxTimelineMain.prototype.removeMasonry = function(oItems, onRemove) {
 };
 
 BxTimelineMain.prototype.reloadMasonry = function() {
-	$(this.sIdView + ' .' + this.sClassItems).masonry('reloadItems').masonry('layout');
+	$(this.sIdViewOutline + ' .' + this.sClassItems).masonry('reloadItems').masonry('layout');
 };
 
 BxTimelineMain.prototype.initFlickity = function() {
 	var $this = this;
 
-	$(this.sIdView + ' .' + this.sClassItemImages).each(function() {
+	$('.' + this.sClassView + ' .' + this.sClassItemImages).each(function() {
 		if($(this).find('.' + $this.sClassItemImage).length <= 1)
 			return;
 
@@ -106,6 +128,43 @@ BxTimelineMain.prototype.initFlickity = function() {
 	});
 };
 
+BxTimelineMain.prototype.processResult = function(oData) {
+	var $this = this;
+
+	if(oData && oData.msg != undefined && oData.msg.length != 0)
+    	alert(oData.msg);
+
+	if(oData && oData.message != undefined && oData.message.length != 0)
+    	alert(oData.message);
+
+    if(oData && oData.reload != undefined && parseInt(oData.reload) == 1)
+    	document.location = document.location;
+
+    if(oData && oData.popup != undefined) {
+    	var oPopup = null;
+    	var oOptions = {
+            fog: {
+				color: '#fff',
+				opacity: .7
+            },
+            closeOnOuterClick: false
+        };
+
+    	if(typeof(oData.popup) == 'object') {
+    		oOptions = $.extend({}, oOptions, oData.popup.options);
+    		oPopup = $(oData.popup.html);
+    	}
+    	else 
+    		oPopup = $(oData.popup);
+
+    	$('#' + oPopup.attr('id')).remove();
+        oPopup.hide().prependTo('body').bxTime().dolPopup(oOptions);
+    }
+
+    if (oData && oData.eval != undefined)
+        eval(oData.eval);
+};
+
 BxTimelineMain.prototype.loadingInButton = function(e, bShow) {
 	if($(e).length)
 		bx_loading_btn($(e), bShow);
@@ -114,7 +173,10 @@ BxTimelineMain.prototype.loadingInButton = function(e, bShow) {
 };
 
 BxTimelineMain.prototype.loadingInItem = function(e, bShow) {
-	var oParent = $(e).length ? $(e).parents('.' + this.sClassItem + ':first') : $('body'); 
+	var oParent = $('body');
+	if($(e).length)
+		oParent = !$(e).hasClass(this.sClassItem) ? $(e).parents('.' + this.sClassItem + ':first') : $(e);
+
 	bx_loading(oParent, bShow);
 };
 
@@ -133,7 +195,26 @@ BxTimelineMain.prototype._loading = function(e, bShow) {
 	bx_loading(oParent, bShow);
 };
 
-BxTimelineMain.prototype._getDefaultData = function () {
+BxTimelineMain.prototype._getView = function(oView) {
+	oView = $(oView);
+	if(!oView.hasClass(this.sClassView))
+		oView = oView.parents('.bx-db-container:first').find('.' + this.sClassView + ':first');
+
+	if(oView.hasClass(this.sClassView + '-timeline'))
+		return 'timeline';
+
+	if(oView.hasClass(this.sClassView + '-outline'))
+		return 'outline';
+
+	return '';
+};
+
+BxTimelineMain.prototype._getDefaultData = function(oElement) {
 	var oDate = new Date();
-    return jQuery.extend({}, this._oRequestParams, {_t:oDate.getTime()});
+	var sView = oElement != undefined ? this._getView(oElement) : '';
+
+    return jQuery.extend({}, this._oRequestParams[sView.length > 0 ? sView : 'general'], {
+    	view: sView,
+		_t:oDate.getTime()
+    });
 };

+ 60 - 15
modules/boonex/timeline/js/post.js

@@ -1,3 +1,13 @@
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Timeline Timeline
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
 function BxTimelinePost(oOptions) {
 	this._sActionsUri = oOptions.sActionUri;
     this._sActionsUrl = oOptions.sActionUrl;
@@ -53,7 +63,12 @@ BxTimelinePost.prototype.afterFormPostSubmit = function (oForm, oData)
         if(iId <= 0) 
         	return;
 
-        this._getPost(oForm, iId);
+        if($('#' + this._aHtmlIds['main_timeline']).length)
+        	this._getPost(oForm, iId, 'timeline');
+
+        if($('#' + this._aHtmlIds['main_outline']).length)
+        	this._getPost(oForm, iId, 'outline');
+
         this._getForm(oForm, $(oForm).find("input[name = 'type']").val());
 
         return;
@@ -177,30 +192,60 @@ BxTimelinePost.prototype._getForm = function(oElement, sType) {
 	);
 };
 
-BxTimelinePost.prototype._getPost = function(oElement, iPostId) {
+BxTimelinePost.prototype._getPost = function(oElement, iId, sView) {
     var $this = this;
     var oData = this._getDefaultData();
-    oData['id'] = iPostId;
+    oData['id'] = iId;
+    oData['view'] = sView;
 
-    var oView = $(this.sIdView);
-    this.loadingInBlock(oView, true);
+    var oElementView = $('#' + this._aHtmlIds['main_' + sView]);
+    this.loadingInBlock(oElementView, true);
 
     jQuery.post (
         this._sActionsUrl + 'get_post/',
         oData,
         function(oData) {
-        	$this.loadingInBlock(oView, false);
-
-        	if($.trim(oData.item).length) {
-        		if(!oView.find('.' + $this.sSP + '-load-more').is(':visible'))
-        			oView.find('.' + $this.sSP + '-load-more').show();
+        	$this.loadingInBlock(oElementView, false);
 
-        		if(oView.find('.' + $this.sSP + '-empty').is(':visible'))
-        			oView.find('.' + $this.sSP + '-empty').hide();
-
-        		$this.prependMasonry($(oData.item).bxTime());
-        	}
+        	$this.processResult(oData);
         },
         'json'
     );
 };
+
+BxTimelinePost.prototype._onGetPost = function(oData) {
+	if(!$.trim(oData.item).length) 
+		return;
+
+	var oView = $('#' + this._aHtmlIds['main_' + oData.view]);
+
+	var oLoadMore = oView.find('.' + this.sSP + '-load-more');
+	if(!oLoadMore.is(':visible'))
+		oLoadMore.show();
+
+	var oEmpty = oView.find('.' + this.sSP + '-empty');
+	if(oEmpty.is(':visible'))
+		oEmpty.hide();
+
+	var oContent = $(oData.item).bxTime();
+	switch(oData.view) {
+		case 'timeline':
+			var oItem = null;
+			var oItems = $('#' + this._aHtmlIds['main_timeline'] + ' ' + '.' + this.sClassItems);
+			var oDivider  = oItems.find('.' + this.sClassDividerToday);
+			var bDivider = oDivider.length > 0;
+
+			if(bDivider && !oDivider.is(':visible'))
+				oDivider.show();
+
+			oContent.hide();
+
+			oItem = bDivider ? oDivider.after(oContent).next('.' + this.sClassItem + ':hidden') : oContent.prependTo(oItems);
+			oItem.bx_anim('show', this._sAnimationEffect, this._iAnimationSpeed);
+			break;
+
+		case 'outline':
+			this.prependMasonry(oContent);
+			break;
+	}
+};

+ 10 - 0
modules/boonex/timeline/js/share.js

@@ -1,3 +1,13 @@
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Timeline Timeline
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
 function BxTimelineShare(oOptions) {
 	this._sActionsUri = oOptions.sActionUri;
     this._sActionsUrl = oOptions.sActionUrl;

+ 282 - 124
modules/boonex/timeline/js/view.js

@@ -1,3 +1,13 @@
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Timeline Timeline
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
 function BxTimelineView(oOptions) {
 	this._sActionsUri = oOptions.sActionUri;
     this._sActionsUrl = oOptions.sActionUrl;
@@ -6,107 +16,168 @@ function BxTimelineView(oOptions) {
     this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'slide' : oOptions.sAnimationEffect;
     this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
     this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
-    this._oRequestParams = oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams;
+    this._oRequestParams = {
+    	timeline: null,
+    	outline: null,
+    	general: oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams
+    };
+
+    this._fOutsideOffset = 0.8;
 
     var $this = this;
     $(document).ready(function() {
-    	$this.initMasonry();
-    	$('.bx-tl-item').resize(function() {
-    		$this.reloadMasonry();
-    	});
-    	$('img.bx-tl-item-image').load(function() {
-    		$this.reloadMasonry();
-    	});
-
-    	$this.initFlickity();
+    	$this.init();
     });
 }
 
 BxTimelineView.prototype = new BxTimelineMain();
 
-BxTimelineView.prototype.changePage = function(oElement, iStart, iPerPage) {
-	this._oRequestParams.start = iStart;
-    this._oRequestParams.per_page = iPerPage;
+BxTimelineView.prototype.init = function() {
+	var $this = this;
 
-    this._getPosts(oElement, 'page');
-};
+	this.oViewTimeline = $('#' + this._aHtmlIds['main_timeline']);
+	this.bViewTimeline = this.oViewTimeline.length > 0;
 
-BxTimelineView.prototype.changeFilter = function(oLink) {
-    var sId = $(oLink).attr('id');
+	this.oViewOutline = $('#' + this._aHtmlIds['main_outline']);
+	this.bViewOutline = this.oViewOutline.length > 0;	
 
-    this._oRequestParams.start = 0;
-    this._oRequestParams.filter = sId.substr(sId.lastIndexOf('-') + 1, sId.length);
+	if(this.bViewTimeline) {
+		this._oRequestParams['timeline'] = jQuery.extend({}, this._oRequestParams['general']);
 
-    this._getPosts(oLink, 'filter');
-};
+		var oItems = this.oViewTimeline.find('.' + this.sClassItem);
 
-BxTimelineView.prototype.changeTimeline = function(oLink, iYear) {
-	this._oRequestParams.start = 0;
-    this._oRequestParams.timeline = iYear;
+		//--- Hide timeline Events which are outside the viewport
+		this.hideEvents(oItems, this._fOutsideOffset);
 
-	this._getPosts(oLink, 'timeline');
+		//on scolling, show/animate timeline Events when enter the viewport
+		$(window).on('scroll', function() {
+			if(!window.requestAnimationFrame) 
+				setTimeout(function() {
+					$this.showEvents(oItems, $this._fOutsideOffset);
+				}, 100);
+			else
+				window.requestAnimationFrame(function() {
+					$this.showEvents(oItems, $this._fOutsideOffset);
+				});
+		});
+	}
+
+	if(this.bViewOutline) {
+		this._oRequestParams['outline'] = jQuery.extend({}, this._oRequestParams['general']);
+
+    	this.initMasonry();
+
+    	this.oViewOutline.find('.' + this.sClassItem).resize(function() {
+    		$this.reloadMasonry();
+    	});
+    	this.oViewOutline.find('img.' + this.sClassItemImage).load(function() {
+    		$this.reloadMasonry();
+    	});
+	}
+
+	this.initFlickity();
 };
 
-BxTimelineView.prototype.pinPost = function(oLink, iId) {
-	this._pinPost(oLink, iId, 1);
+BxTimelineView.prototype.hideEvents = function(oEvents, fOffset) {
+	oEvents.each(function() {
+		( $(this).offset().top > $(window).scrollTop() + $(window).height() * fOffset ) && $(this).find('.bx-tl-item-type, .bx-tl-item-cnt').addClass('is-hidden');
+	});
 };
 
-BxTimelineView.prototype.unpinPost = function(oLink, iId) {
-	this._pinPost(oLink, iId, 0);
+BxTimelineView.prototype.showEvents = function(oEvents, fOffset) {
+	oEvents.each(function() {
+		( $(this).offset().top <= $(window).scrollTop() + $(window).height() * fOffset && $(this).find('.bx-tl-item-type').hasClass('is-hidden') ) && $(this).find('.bx-tl-item-type, .bx-tl-item-cnt').removeClass('is-hidden').addClass('bounce-in');
+	});
 };
 
-BxTimelineView.prototype.deletePost = function(oLink, iId) {
-    var $this = this;
-    var oView = $(this.sIdView);
-    var oData = this._getDefaultData();
-    oData['id'] = iId;
+BxTimelineView.prototype.changePage = function(oLink, iStart, iPerPage) {
+	var $this = this;
+	var sView = this._getView(oLink);
+
+	this.loadingInButton(oLink, true);
+
+	this._oRequestParams[sView].start = iStart;
+    this._oRequestParams[sView].per_page = iPerPage;
+    this._getPosts(oLink, function(oData) {
+    	$this.loadingInButton(oLink, false);
+
+    	var oView = null;
+    	var sItems = $.trim(oData.items);
+    	switch(sView) {
+    		case 'timeline':
+    			oView = $this.oViewTimeline;
+    			oView.find('.' + $this.sClassItems).append($(sItems).hide()).find('.' + $this.sClassItem + ':hidden').bx_anim('show', $this._sAnimationEffect, $this._iAnimationSpeed, function() {
+					$(this).bxTime();
+			    });
+    			break;
+
+    		case 'outline':
+    			oView = $this.oViewOutline;
+    			$this.appendMasonry($(sItems).bxTime());
+    			break;
+    	}
+
+    	if(oView && oData && oData.load_more != undefined)
+    		oView.find('.' + $this.sSP + '-load-more-holder').html($.trim(oData.load_more));
+
+    	if(oView && oData && oData.back != undefined)
+    		oView.find('.' + $this.sSP + '-back-holder').html($.trim(oData.back));
+
+    	if(oData && oData.empty != undefined)
+			oView.find('.' + $this.sSP + '-empty-holder').html($.trim(oData.empty));
+    });
+};
 
-    this.loadingInBlock(oLink, true);
+BxTimelineView.prototype.changeFilter = function(oLink) {
+	var sView = this._getView(oLink);
 
-    $.post(
-        this._sActionsUrl + 'delete/',
-        oData,
-        function(oData) {
-        	$this.loadingInBlock(oLink, false);
+    var sId = $(oLink).attr('id');
+    sId = sId.substr(sId.lastIndexOf('-') + 1, sId.length);
 
-        	if(oData && oData.msg != undefined)
-                alert(oData.msg);
+    this.loadingInBlock(oLink, true);
 
-            if(oData && oData.code == 0) {
-            	$(oLink).parents('.bx-popup-applied:first:visible').dolPopupHide();
+    this._oRequestParams[sView].start = 0;
+    this._oRequestParams[sView].filter = sId;
+    this._getPosts(oLink);
+};
 
-                $($this.sIdItem + oData.id).bx_anim('hide', $this._sAnimationEffect, $this._iAnimationSpeed, function() {
-                    $(this).remove();
+BxTimelineView.prototype.changeTimeline = function(oLink, iYear) {
+	var sView = this._getView(oLink);
 
-                    if(oView.find('.bx-tl-item').length != 0) {
-                    	$this.reloadMasonry();
-                    	return;
-                    } 
+	this.loadingInBlock(oLink, true);
 
-                    $this.destroyMasonry();
-                    oView.find('.bx-tl-load-more').hide();
-                    oView.find('.bx-tl-empty').show();
-                });
-            }
-        },
-        'json'
-    );
+	this._oRequestParams[sView].start = 0;
+    this._oRequestParams[sView].timeline = iYear;
+	this._getPosts(oLink);
+	
+	console.log(this._oRequestParams);
 };
 
 BxTimelineView.prototype.showMoreContent = function(oLink) {
+	var sView = this._getView(oLink);
+
 	$(oLink).parent('span').next('span').show().prev('span').remove();
-	this.reloadMasonry();
+
+	switch(sView) {
+		case 'timeline':
+			break;
+	
+		case 'outline':
+			this.reloadMasonry();
+			break;
+	}	
 };
 
 BxTimelineView.prototype.showPhoto = function(oLink, sUrl) {
-	$('#' + this._aHtmlIds['photo_popup']).dolPopupImage(sUrl, $(oLink).parent());
+	var sView = this._getView(oLink);
+
+	$('#' + this._aHtmlIds['photo_popup_' + sView]).dolPopupImage(sUrl, $(oLink).parent());
 };
 
 BxTimelineView.prototype.commentItem = function(oLink, sSystem, iId) {
 	var $this = this;
-
-    var oData = this._getDefaultData();
-    oData['system'] = sSystem;    
+    var oData = this._getDefaultData(oLink);
+    oData['system'] = sSystem;
     oData['id'] = iId;
 
     var oComments = $(oLink).parents('.' + this.sClassItem + ':first').find('.' + this.sClassItemComments);
@@ -134,93 +205,180 @@ BxTimelineView.prototype.commentItem = function(oLink, sSystem, iId) {
     );
 };
 
-BxTimelineView.prototype._pinPost = function(oLink, iId, iWay) {
-    var $this = this;
-    var oView = $(this.sIdView);
+BxTimelineView.prototype.pinPost = function(oLink, iId, iWay) {
+	var $this = this;
     var oData = this._getDefaultData();
     oData['id'] = iId;
 
-    this.loadingInBlock(oView, true);
+    $(oLink).parents('.bx-popup-applied:first:visible').dolPopupHide({
+		onHide: function(oPopup) {
+			$(oPopup).remove();
+		}
+	});
+
+    if(this.bViewTimeline)
+    	this.loadingInItem($(this.sIdItemTimeline + iId), true);
+
+    if(this.bViewOutline)
+    	this.loadingInItem($(this.sIdItemOutline + iId), true);
 
     $.post(
         this._sActionsUrl + 'pin/',
         oData,
         function(oData) {
-        	$this.loadingInBlock(oView, false);
-
-        	if(oData && oData.msg != undefined)
-                alert(oData.msg);
-
-            if(oData && oData.code == 0) {
-            	$(oLink).parents('.bx-popup-applied:first:visible').dolPopupHide({
-            		onHide: function(oPopup) {
-            			$(oPopup).remove();
-            		}
-            	});
-
-            	$this.removeMasonry(($this.sIdItem + oData.id), function() {
-            		if(iWay == 0) {
-                		$this._oRequestParams.start = 0;
-    	                $this._getPosts(oView, 'pin');
-                	}
-            		else
-            			$this.prependMasonry($(oData.content).bxTime());
-            	});
-            }
+        	$this.processResult(oData);
         },
         'json'
     );
 };
 
-BxTimelineView.prototype._getPosts = function(oElement, sAction) {
-    var $this = this;
-    var oView = $(this.sIdView);
+BxTimelineView.prototype.onPinPost = function(oData) {
+	var $this = this;
 
-	switch(sAction) {
-		case 'page':
-			this.loadingInButton(oElement, true);
-			break;
+	//--- Pin on Timeline (if available)
+	if(this.bViewTimeline) {
+		var sItemTimeline = this.sIdItemTimeline + oData.id;
 
-		default:
-			this.loadingInBlock(oElement, true);
-			break;
+		this._oRequestParams['timeline'].start = 0;
+        this._getPosts(this.oViewTimeline, function(oData) {
+        	$(sItemTimeline).bx_anim('hide', $this._sAnimationEffect, $this._iAnimationSpeed, function() {
+    	        $(this).remove();
+
+    	        $this.processResult(oData);
+        	});
+        });
 	}
 
-    jQuery.get(
-        this._sActionsUrl + 'get_posts/',
-        this._getDefaultData(),
+	//--- Pin on Outline (if available)
+	if(this.bViewOutline) {
+		var sItemOutline = this.sIdItemOutline + oData.id;
+
+		this._oRequestParams['outline'].start = 0;
+        this._getPosts(this.oViewOutline, function(oData) {
+        	$this.removeMasonry(sItemOutline, function() {
+        		$this.processResult(oData);
+    		});
+        });
+	}
+};
+
+BxTimelineView.prototype.deletePost = function(oLink, iId) {
+    var $this = this;
+    var oData = this._getDefaultData();
+    oData['id'] = iId;
+
+    $(oLink).parents('.bx-popup-applied:first:visible').dolPopupHide();
+
+    if(this.bViewTimeline)
+    	this.loadingInItem($(this.sIdItemTimeline + iId), true);
+
+    if(this.bViewOutline)
+    	this.loadingInItem($(this.sIdItemOutline + iId), true);
+
+    $.post(
+        this._sActionsUrl + 'delete/',
+        oData,
         function(oData) {
-        	if(oData && oData.items != undefined) {
-        		var sItems = $.trim(oData.items);
+        	$this.processResult(oData);
+        },
+        'json'
+    );
+};
 
-	        	switch(sAction) { 
-	        		case 'page':
-	        			$this.loadingInButton(oElement, false);
-	        			$this.appendMasonry($(sItems).bxTime());
-			            break;
+BxTimelineView.prototype.onDeletePost = function(oData) {
+	var $this = this;
 
-	        		default:
-	        			$this.loadingInBlock(oElement, false);
+	//--- Delete from Timeline (if available)
+	if(this.bViewTimeline) {
+		$(this.sIdItemTimeline + oData.id).bx_anim('hide', this._sAnimationEffect, this._iAnimationSpeed, function() {
+	        $(this).remove();
+
+	        if($this.oViewTimeline.find('.' + $this.sClassItem).length == 0) {
+	        	$this.oViewTimeline.find('.' + $this.sClassDividerToday).hide();
+	        	$this.oViewTimeline.find('.' + $this.sSP + '-load-more').hide();
+	        	$this.oViewTimeline.find('.' + $this.sSP + '-empty').show();
+	        }
+	    });
+	}
 
-	        			oView.find('.' + $this.sClassItems).bx_anim('hide', $this._sAnimationEffect, $this._iAnimationSpeed, function() {
-			                $(this).html(sItems).show().bxTime();
+	//--- Delete from Outline (if available)
+	if(this.bViewOutline) {
+		$(this.sIdItemOutline + oData.id).bx_anim('hide', this._sAnimationEffect, this._iAnimationSpeed, function() {
+	        $(this).remove();
 
-			                $this.destroyMasonry();
-			                if($this.isMasonryEmpty())
-			                	return;
+	        if($this.oViewOutline.find('.' + $this.sClassItem).length == 0) {
+	        	$this.destroyMasonry();
 
-			                $this.initMasonry();
-			            });
-		            	break;
-	            }
-        	}
+	        	$this.oViewOutline.find('.' + $this.sSP + '-load-more').hide();
+	        	$this.oViewOutline.find('.' + $this.sSP + '-empty').show();
+	        } 
+	        else
+	        	$this.reloadMasonry();
+	    });
+	}
+};
 
-        	if(oData && oData.load_more != undefined)
-        		oView.find('.' + $this.sSP + '-load-more-holder').html($.trim(oData.load_more));
+BxTimelineView.prototype._getPosts = function(oElement, onComplete) {
+	var $this = this;
+	var oData = this._getDefaultData(oElement);
 
-        	if(oData && oData.back != undefined)
-        		oView.find('.' + $this.sSP + '-back-holder').html($.trim(oData.back));
+	jQuery.get(
+        this._sActionsUrl + 'get_posts/',
+        oData,
+        function(oData) {
+        	if(typeof onComplete === 'function')
+        		return onComplete(oData);
+
+        	$this.loadingInBlock(oElement, false);
+
+        	$this.processResult(oData);
         },
         'json'
     );
 };
+
+BxTimelineView.prototype._onGetPosts = function(oData) {
+	var $this = this;
+	var oView = $('#' + this._aHtmlIds['main_' + oData.view]);
+
+	var onComplete = function() {
+		if(oData && oData.load_more != undefined)
+			oView.find('.' + $this.sSP + '-load-more-holder').html($.trim(oData.load_more));
+
+		if(oData && oData.back != undefined)
+			oView.find('.' + $this.sSP + '-back-holder').html($.trim(oData.back));
+
+		if(oData && oData.empty != undefined)
+			oView.find('.' + $this.sSP + '-empty-holder').html($.trim(oData.empty));
+	};
+
+	if(oData && oData.items != undefined) {
+		var sItems = $.trim(oData.items);
+
+		switch(oData.view) {
+			case 'timeline':
+				oView.find('.' + this.sClassItems).bx_anim('hide', this._sAnimationEffect, this._iAnimationSpeed, function() {
+					$(this).html(sItems).show().bxTime();
+
+					onComplete();
+			    });
+				break;
+
+			case 'outline':
+				oView.find('.' + this.sClassItems).bx_anim('hide', this._sAnimationEffect, this._iAnimationSpeed, function() {
+			        $(this).html(sItems).show().bxTime();
+
+			        if($this.isMasonry())
+			        	$this.destroyMasonry();
+
+			        if(!$this.isMasonryEmpty())
+			        	$this.initMasonry();
+
+			        onComplete();
+			    });
+				break;
+		}
+	}
+
+	
+};

+ 6 - 9
modules/boonex/timeline/template/block_view.html

@@ -1,14 +1,11 @@
-<div id="__html_id__" class="__style_prefix__-view bx-def-bc-margin">
+<div id="__html_id__" class="__style_prefix__-view __style_prefix__-view-__view__ bx-def-bc-margin">
 	<div class="__style_prefix__-cnt">
-        <div class="__style_prefix__-back-holder">
-            __back__
+        <div class="__style_prefix__-back-holder">__back__</div>
+        <div class="__style_prefix__-empty-holder">__empty__</div>
+        <div class="__style_prefix__-items-wrapper">
+            <div class="__style_prefix__-items bx-def-margin-sec-leftright-neg">__content__</div>
         </div>
-		<div class="__style_prefix__-items bx-def-margin-sec-leftright-neg">
-			__content__
-		</div>
-		<div class="__style_prefix__-load-more-holder">
-			__load_more__
-		</div>
+		<div class="__style_prefix__-load-more-holder">__load_more__</div>
 	</div>
 	__view_image_popup__
     __js_content__

+ 232 - 0
modules/boonex/timeline/template/css/view-media-desktop.css

@@ -1,4 +1,5 @@
 @media (min-width: 1024px) {
+	/*--- View Block Style ---*/
 	.bx-tl-grid-sizer {
 		width: 33.3%;
 	}
@@ -11,4 +12,235 @@
 	.bx-layout-column-thin .bx-tl-grid-sizer {
 		width: 100%;
 	}
+
+	/*--- Timeline Item Style ---*/
+	div.bx-tl-view-timeline div.bx-tl-item-cnt {
+	    position: relative;
+	
+	    margin: 0px 0px 0px 56px;
+	    margin: 0px 0px 0px 3.5rem;
+	}
+	.bx-layout-column-fullwidth div.bx-tl-view-timeline div.bx-tl-items::before {
+        left: 50%;
+        margin-left: -2px;
+        margin-left: -0.125rem;
+	} 
+	.bx-layout-column-fullwidth div.bx-tl-view-timeline div.bx-tl-item div.bx-tl-item-type {
+        left: 50%;
+        margin-left: -20px;
+        margin-left: -1.25rem;
+	} 
+	.bx-layout-column-fullwidth div.bx-tl-view-timeline div.bx-tl-item div.bx-tl-item-cnt {
+        width: 45%;
+	}
+    .bx-layout-column-fullwidth div.bx-tl-view-timeline div.bx-tl-item:nth-child(2n + 1) div.bx-tl-item-cnt {
+        margin: 0px 56px 0px 0p;
+        margin: 0px 3.5rem 0px 0px;
+    }
+	.bx-layout-column-fullwidth div.bx-tl-view-timeline div.bx-tl-item:nth-child(2n) div.bx-tl-item-cnt {
+		float: right;
+
+        margin: 0px 0px 0px 56px;
+        margin: 0px 0px 0px 3.5rem;
+	}
+
+	/*--- Animation ---*/
+	.cssanimations div.bx-tl-view-timeline .bx-tl-item-type.is-hidden {
+	    visibility: hidden;
+	}
+	.cssanimations div.bx-tl-view-timeline .bx-tl-item-type.bounce-in {
+		visibility: visible;
+		-webkit-animation: cd-bounce-1 0.6s;
+		-moz-animation: cd-bounce-1 0.6s;
+		animation: cd-bounce-1 0.6s;
+	}
+	.cssanimations div.bx-tl-view-timeline .bx-tl-item-cnt.is-hidden {
+	    visibility: hidden;
+	}
+	.cssanimations div.bx-tl-view-timeline .bx-tl-item-cnt.bounce-in {
+		visibility: visible;
+		-webkit-animation: cd-bounce-2 0.6s;
+		-moz-animation: cd-bounce-2 0.6s;
+		animation: cd-bounce-2 0.6s;
+	}
+	/* inverse bounce effect on even content blocks */
+	.cssanimations .bx-layout-column-fullwidth div.bx-tl-view-timeline .bx-tl-item:nth-child(even) .bx-tl-item-cnt.bounce-in {
+		-webkit-animation: cd-bounce-2-inverse 0.6s;
+		-moz-animation: cd-bounce-2-inverse 0.6s;
+		animation: cd-bounce-2-inverse 0.6s;
+	}
+}
+
+/*--- Animation ---*/
+@-webkit-keyframes cd-bounce-1 {
+  0% {
+    opacity: 0;
+    -webkit-transform: scale(0.5);
+  }
+
+  60% {
+    opacity: 1;
+    -webkit-transform: scale(1.2);
+  }
+
+  100% {
+    -webkit-transform: scale(1);
+  }
+}
+@-moz-keyframes cd-bounce-1 {
+  0% {
+    opacity: 0;
+    -moz-transform: scale(0.5);
+  }
+
+  60% {
+    opacity: 1;
+    -moz-transform: scale(1.2);
+  }
+
+  100% {
+    -moz-transform: scale(1);
+  }
+}
+@keyframes cd-bounce-1 {
+  0% {
+    opacity: 0;
+    -webkit-transform: scale(0.5);
+    -moz-transform: scale(0.5);
+    -ms-transform: scale(0.5);
+    -o-transform: scale(0.5);
+    transform: scale(0.5);
+  }
+
+  60% {
+    opacity: 1;
+    -webkit-transform: scale(1.2);
+    -moz-transform: scale(1.2);
+    -ms-transform: scale(1.2);
+    -o-transform: scale(1.2);
+    transform: scale(1.2);
+  }
+
+  100% {
+    -webkit-transform: scale(1);
+    -moz-transform: scale(1);
+    -ms-transform: scale(1);
+    -o-transform: scale(1);
+    transform: scale(1);
+  }
+}
+
+@-webkit-keyframes cd-bounce-2 {
+  0% {
+    opacity: 0;
+    -webkit-transform: translateX(-100px);
+  }
+
+  60% {
+    opacity: 1;
+    -webkit-transform: translateX(20px);
+  }
+
+  100% {
+    -webkit-transform: translateX(0);
+  }
+}
+@-moz-keyframes cd-bounce-2 {
+  0% {
+    opacity: 0;
+    -moz-transform: translateX(-100px);
+  }
+
+  60% {
+    opacity: 1;
+    -moz-transform: translateX(20px);
+  }
+
+  100% {
+    -moz-transform: translateX(0);
+  }
+}
+@keyframes cd-bounce-2 {
+  0% {
+    opacity: 0;
+    -webkit-transform: translateX(-100px);
+    -moz-transform: translateX(-100px);
+    -ms-transform: translateX(-100px);
+    -o-transform: translateX(-100px);
+    transform: translateX(-100px);
+  }
+
+  60% {
+    opacity: 1;
+    -webkit-transform: translateX(20px);
+    -moz-transform: translateX(20px);
+    -ms-transform: translateX(20px);
+    -o-transform: translateX(20px);
+    transform: translateX(20px);
+  }
+
+  100% {
+    -webkit-transform: translateX(0);
+    -moz-transform: translateX(0);
+    -ms-transform: translateX(0);
+    -o-transform: translateX(0);
+    transform: translateX(0);
+  }
+}
+@-webkit-keyframes cd-bounce-2-inverse {
+  0% {
+    opacity: 0;
+    -webkit-transform: translateX(100px);
+  }
+
+  60% {
+    opacity: 1;
+    -webkit-transform: translateX(-20px);
+  }
+
+  100% {
+    -webkit-transform: translateX(0);
+  }
+}
+@-moz-keyframes cd-bounce-2-inverse {
+  0% {
+    opacity: 0;
+    -moz-transform: translateX(100px);
+  }
+
+  60% {
+    opacity: 1;
+    -moz-transform: translateX(-20px);
+  }
+
+  100% {
+    -moz-transform: translateX(0);
+  }
+}
+@keyframes cd-bounce-2-inverse {
+  0% {
+    opacity: 0;
+    -webkit-transform: translateX(100px);
+    -moz-transform: translateX(100px);
+    -ms-transform: translateX(100px);
+    -o-transform: translateX(100px);
+    transform: translateX(100px);
+  }
+
+  60% {
+    opacity: 1;
+    -webkit-transform: translateX(-20px);
+    -moz-transform: translateX(-20px);
+    -ms-transform: translateX(-20px);
+    -o-transform: translateX(-20px);
+    transform: translateX(-20px);
+  }
+
+  100% {
+    -webkit-transform: translateX(0);
+    -moz-transform: translateX(0);
+    -ms-transform: translateX(0);
+    -o-transform: translateX(0);
+    transform: translateX(0);
+  }
 }

+ 10 - 0
modules/boonex/timeline/template/css/view-media-tablet.css

@@ -1,4 +1,5 @@
 @media (min-width:720px) and (max-width:1024px) {
+	/*--- View Block Style ---*/
 	.bx-tl-grid-sizer { 
 		width: 50%;
 	}
@@ -6,4 +7,13 @@
 	.bx-layout-column-thin .bx-tl-grid-sizer {
 		width: 100%;
 	}
+
+    /*--- Timeline Item Style ---*/
+    div.bx-tl-view-timeline div.bx-tl-item-cnt {
+        position: relative;
+    
+        margin: 0px 0px 0px 56px;
+        margin: 0px 0px 0px 3.5rem;
+    }
+    
 }

+ 171 - 29
modules/boonex/timeline/template/css/view.css

@@ -14,13 +14,17 @@ div.bx-tl-view {
 .bx-tl-view-sizer div.bx-tl-item-ind {
 	padding: 0px;
 }
-
+div.bx-tl-items-wrapper {
+	position: relative;
+}
 
 /*--- Back Style ---*/
 
 
 /*--- Load More Style ---*/
-div.bx-tl-load-more {}
+div.bx-tl-view-timeline div.bx-tl-load-more {
+	padding-top: 0px;
+}
 
 div.bx-tl-jump-to {
 	position: relative;
@@ -30,64 +34,184 @@ div.bx-tl-jump-to {
 }
 
 
-/*--- Item Style ---*/
-div.bx-tl-item {
+/*--- Divider Styles ---*/
+div.bx-tl-divider {
+    position: relative;
+}
+
+div.bx-tl-divider-cnt {
+    position: relative;
+    box-sizing: border-box;
+
+    width: 100%;
+
+    border: 2px solid rgba(0, 0, 0, 0.1);
+    border-radius: 20px;
+    -moz-border-radius: 20px;
+    -webkit-border-radius: 20px;
+    background-color: rgba(0, 0, 0, 0.1);
+    
+    text-align: center;
+    text-transform: uppercase;
+    font-weight: bold;
+    color: #ffffff;
+}
+
+
+/*--- Timeline Item Style ---*/
+div.bx-tl-view-timeline div.bx-tl-items:before {
+    content: '';
+    position: absolute;
+    top: 0px;
+    left: 18px;
+    left: 1.125rem;
+    width: 4px;
+    height: 100%;
+
+    background: rgba(0, 0, 0, 0.1);
+}
+div.bx-tl-view-timeline div.bx-tl-items {
+	margin-left: 0px;
+	margin-right: 0px;
+}
+div.bx-tl-view-timeline div.bx-tl-item {
+    position: relative;
+}
+div.bx-tl-view-timeline div.bx-tl-item-type {
+	position: absolute;
+    top: 0px;
+    left: 0px;
+}
+div.bx-tl-view-timeline div.bx-tl-item-circle {
+	width: 40px;
+    width: 2.5rem;
+    height: 40px;
+    height: 2.5rem;
+
+	background-color: #ffffff;
+	background-clip: padding-box;
+	border-radius: 5rem;
+	box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.1);
+
+    text-align: center;
+    color: #999999;
+	
+	overflow: hidden;
+}
+div.bx-tl-view-timeline div.bx-tl-item-circle .sys-icon {
+	display: block;
+
+	margin-left: auto;
+	margin-right: auto;
+
+	width: 40px;
+    width: 2.5rem;
+    height: 40px;
+    height: 2.5rem;
+
+	text-align: center;
+
+	line-height: 38px;
+	line-height: 2.375rem;
+    font-size: 20px;
+	font-size: 1.25rem;
+}
+div.bx-tl-view-timeline div.bx-tl-item-cnt {
+    position: relative;
+}
+
+
+/*--- Outline Item Style ---*/
+div.bx-tl-view-outline div.bx-tl-item {
 	position: relative;
 }
-div.bx-tl-item-ind {
+div.bx-tl-view-outline div.bx-tl-item-ind {
 	position: relative;
 }
-div.bx-tl-item-cnt {
+div.bx-tl-view-outline div.bx-tl-item-cnt {
 	position: relative;
 	overflow: hidden;
 }
 
 /*+++ Item Owner +++*/
-div.bx-tl-item-owner {
+div.bx-tl-view-timeline div.bx-tl-item-owner, 
+div.bx-tl-view-outline div.bx-tl-item-owner {
 	position: relative;
 }
-div.bx-tl-owner-avatar {
+div.bx-tl-view-timeline div.bx-tl-owner-avatar, 
+div.bx-tl-view-outline div.bx-tl-owner-avatar {
 	position: absolute;
 	top: 0px;
 	left: 0px;
 }
-div.bx-tl-owner-info {
-	white-space: nowrap;
+div.bx-tl-view-timeline div.bx-tl-owner-info, 
+div.bx-tl-view-outline div.bx-tl-owner-info {
+    display: -webkit-flex;
+    display: flex;
+    -webkit-align-items: center;
+    align-items: center;
 }
-div.bx-tl-owner-name,
-div.bx-tl-item-info {
+div.bx-tl-view-timeline div.bx-tl-owner-name,
+div.bx-tl-view-timeline div.bx-tl-item-info, 
+div.bx-tl-view-outline div.bx-tl-owner-name,
+div.bx-tl-view-outline div.bx-tl-item-info {
 	text-overflow: ellipsis;
 	overflow: hidden;
 }
-div.bx-tl-item-info .bx-tl-date,
-div.bx-tl-item-info .bx-tl-pinned .sys-icon {
+div.bx-tl-view-timeline div.bx-tl-owner-name a.bx-tl-owner-name,
+div.bx-tl-view-outline div.bx-tl-owner-name a.bx-tl-owner-name,
+div.bx-tl-view-timeline div.bx-tl-owner-name a.bx-tl-timeline-owner-name,
+div.bx-tl-view-outline div.bx-tl-owner-name a.bx-tl-timeline-owner-name {
+	font-weight: 700;
+}
+
+div.bx-tl-view-timeline div.bx-tl-item-info .bx-tl-date,
+div.bx-tl-view-timeline div.bx-tl-item-info .bx-tl-pinned .sys-icon,
+div.bx-tl-view-outline div.bx-tl-item-info .bx-tl-date,
+div.bx-tl-view-outline div.bx-tl-item-info .bx-tl-pinned .sys-icon {
 	color: rgba(40, 60, 80, 0.5);
 }
-div.bx-tl-item-info .bx-tl-pinned .sys-icon {
+div.bx-tl-view-timeline div.bx-tl-item-info .bx-tl-pinned .sys-icon,
+div.bx-tl-view-outline div.bx-tl-item-info .bx-tl-pinned .sys-icon {
 	cursor: default;
 }
 
 /*+++ Item Text +++*/
-div.bx-tl-item-text div.bx-tl-title {
+div.bx-tl-view-outline div.bx-tl-item-text div.bx-tl-title {
 	font-weight: bold;
 }
-span.bx-tl-content-see-more a {
+div.bx-tl-view-outline span.bx-tl-content-see-more a {
 	font-weight: bold;
 }
 
 /*+++ Item Image +++*/
-div.bx-tl-item-images {
+div.bx-tl-view-timeline div.bx-tl-item-images,
+div.bx-tl-view-outline div.bx-tl-item-images {
 	position: relative;
 	white-space: nowrap;
 	overflow: hidden;
 }
-div.bx-tl-item-image {
+div.bx-tl-view-timeline div.bx-tl-item-images {
+	margin-left: 0px;
+	margin-right: 0px;
+}
+div.bx-tl-view-timeline div.bx-tl-item-image,
+div.bx-tl-view-outline div.bx-tl-item-image {
 	display: inline-block;
+}
+div.bx-tl-view-timeline div.bx-tl-item-image {
+	margin-right: 2px;
+	margin-right: 0.125rem;
+}
+div.bx-tl-view-outline div.bx-tl-item-image {
 	width: 100%;
-	text-align: center;
-	overflow: hidden;
+    text-align: center;
+    overflow: hidden;
 }
-div.bx-tl-item-image img {
+div.bx-tl-view-timeline div.bx-tl-item-image img {
+	height: 12.5rem;
+}
+div.bx-tl-view-outline div.bx-tl-item-image img {
 	max-width: 100%;
 	min-height: 12.5rem;
 	max-height: 18.4375rem;
@@ -96,10 +220,10 @@ div.bx-tl-item-image img {
 }
 
 /*+++ Item Link +++*/
-div.bx-tl-item-link {
+div.bx-tl-view-outline div.bx-tl-item-link {
 	text-align: center;
 }
-div.bx-tl-il-thumbnail img {
+div.bx-tl-view-outline div.bx-tl-il-thumbnail img {
 	width: 100%;
 	max-width: 100px;
 	height: 100%;
@@ -107,20 +231,20 @@ div.bx-tl-il-thumbnail img {
 }
 
 /*+++ Item Shared +++*/
-div.bx-tl-shared div.bx-tl-item-text {
+div.bx-tl-view-outline div.bx-tl-shared div.bx-tl-item-text {
 	padding-left: 5px;
 	padding-left: 0.3rem;
 
 	border-left: 1px solid #999999;
 	border-left: 0.07rem solid #999999;
 }
-div.bx-tl-shared div.bx-tl-title {
+div.bx-tl-view-outline div.bx-tl-shared div.bx-tl-title {
 	font-size: 1.0rem;
 }
-div.bx-tl-shared div.bx-tl-title a {
+div.bx-tl-view-outline div.bx-tl-shared div.bx-tl-title a {
 	color: #999999;
 }
-div.bx-tl-shared div.bx-tl-content {
+div.bx-tl-view-outline div.bx-tl-shared div.bx-tl-content {
 	font-size: 0.875rem;
 	color: #999999;
 }
@@ -134,4 +258,22 @@ div.bx-tl-empty div.bx-msg-box-container {
 
 
 /*--- Comments Styles ---*/
-div.bx-tl-comments {}
+div.bx-tl-item-comments-holder .bx-def-thumb-size {
+	width: 32px;
+	width: 2rem;
+	height: 32px;
+	height: 2rem;
+
+	line-height: 32px;
+	line-height: 2rem;
+}
+div.bx-tl-item-comments-holder .bx-def-thumb-size-left-indent {
+	margin-left: 3.25rem;
+}
+div.bx-tl-item-comments-holder .bx-def-thumb-size-min-height {
+    min-height: 2rem;
+}
+div.bx-tl-item-comments-holder .cmts.cmts-margin {
+	font-size: 12px;
+	font-size: 0.75rem;
+}

+ 3 - 0
modules/boonex/timeline/template/divider.html

@@ -0,0 +1,3 @@
+<div class="__style_prefix__-divider __style_prefix__-divider-__type__ bx-def-padding-bottom" <bx_if:show_hidden>style="display:none"</bx_if:show_hidden>>
+    <div class="__style_prefix__-divider-cnt bx-def-font-small">__content__</div>
+</div>

+ 0 - 43
modules/boonex/timeline/template/item.html

@@ -1,43 +0,0 @@
-<div id="__html_id__" class="__style_prefix__-item __class__">
-	<div class="__style_prefix__-item-ind bx-def-padding-sec">
-	    <div class="__style_prefix__-item-cnt bx-def-box bx-def-padding bx-def-round-corners __class_content__">
-	    	<div class="__style_prefix__-item-owner bx-def-margin-bottom"> 
-		       	<div class="__style_prefix__-owner-avatar bx-def-thumb bx-def-thumb-size">
-                    <a href="__item_owner_url__" class="__style_prefix__-owner-avatar" title="__item_owner_title__">
-						<bx_if:show_icon>
-							<img class="bx-def-thumb bx-def-thumb-size" src="__author_icon__" />
-						</bx_if:show_icon>
-						<bx_if:show_icon_empty>
-							<i class="sys-icon user"></i>
-						</bx_if:show_icon_empty>
-                    </a>
-				</div>
-				<div class="__style_prefix__-owner-info bx-def-thumb-size-min-height bx-def-thumb-size-left-indent">
-					<div class="__style_prefix__-owner-name bx-def-padding-thd-top">
-						<a href="__item_owner_url__" class="__style_prefix__-owner-name" title="__item_owner_title__">__item_owner_name__</a>
-			            <bx_if:show_timeline_owner>
-				        	<i class="sys-icon caret-right"></i>
-				        	<a href="__owner_url__" class="__style_prefix__-timeline-owner-name">__owner_username__</a>
-				        </bx_if:show_timeline_owner>
-					</div>
-					<div class="__style_prefix__-item-info bx-def-font-small">
-						<a class="__style_prefix__-date" href="__item_view_url__">__item_date__</a>
-						<bx_if:show_pinned>
-							<span class="__style_prefix__-pinned bx-def-margin-thd-left">
-								<i class="sys-icon thumb-tack bx-def-margin-thd-left" title="<bx_text_attribute:_bx_timeline_txt_pinned />"></i>
-							</span>
-						</bx_if:show_pinned>
-					</div>
-				</div>
-			</div>
-			__content__
-			<bx_if:show_location>
-				<div class="__style_prefix__-location bx-def-margin-top bx-def-font-grayed bx-clearfix">__location__</div>
-			</bx_if:show_location>
-			<bx_if:show_menu_item_actions>
-				<div class="__style_prefix__-activity bx-def-margin-top bx-clearfix">__menu_item_actions__</div>
-			</bx_if:show_menu_item_actions>
-			<div class="__style_prefix__-item-comments-holder">__comments__</div>
-		</div>
-	</div>
-</div>

+ 41 - 0
modules/boonex/timeline/template/item_outline.html

@@ -0,0 +1,41 @@
+<div id="__html_id__" class="__style_prefix__-item __class__">
+	<div class="__style_prefix__-item-ind bx-def-padding-sec">
+	    <div class="__style_prefix__-item-cnt bx-def-box bx-def-padding bx-def-round-corners __class_content__">
+	    	<div class="__style_prefix__-item-owner bx-def-margin-bottom"> 
+		       	<div class="__style_prefix__-owner-avatar bx-def-thumb bx-def-thumb-size">
+                    <a href="__item_owner_url__" class="__style_prefix__-owner-avatar" title="__item_owner_title__">
+						<bx_if:show_owner_icon>
+							<img class="bx-def-thumb bx-def-thumb-size" src="__owner_icon__" />
+						</bx_if:show_owner_icon>
+						<bx_if:show_owner_icon_empty>
+							<i class="sys-icon user"></i>
+						</bx_if:show_owner_icon_empty>
+                    </a>
+				</div>
+				<div class="__style_prefix__-owner-info bx-def-thumb-size-min-height bx-def-thumb-size-left-indent">
+				    <!-- NOTE: Spaces after and between elements in 'owner-name' DIV are needed for better line folding -->
+					<div class="__style_prefix__-owner-name bx-def-font-middle bx-def-font-light bx-def-font-grayed">
+						<a href="__item_owner_url__" class="__style_prefix__-owner-name" title="__item_owner_title__">__item_owner_name__</a> 
+			            <bx_if:show_timeline_owner>
+				        	<i class="sys-icon caret-right"></i> <a href="__owner_url__" class="__style_prefix__-timeline-owner-name">__owner_username__</a> 
+				        </bx_if:show_timeline_owner>
+				        <span class="bx-def-font-small"> __item_owner_action__ </span> <span class="bx-bullet-narrow"> </span><a class="__style_prefix__-date bx-base-text-unit-date bx-def-font-small" href="__item_view_url__"> __item_date__ </a> 
+                        <bx_if:show_pinned>
+                            <span class="__style_prefix__-pinned bx-def-margin-thd-left">
+                                <i class="sys-icon thumb-tack bx-def-margin-thd-left" title="<bx_text_attribute:_bx_timeline_txt_pinned />"></i>
+                            </span>
+                        </bx_if:show_pinned>
+					</div>
+				</div>
+			</div>
+			__content__
+			<bx_if:show_location>
+				<div class="__style_prefix__-item-location bx-def-margin-top bx-def-font-grayed bx-clearfix">__location__</div>
+			</bx_if:show_location>
+			<bx_if:show_menu_item_actions>
+				<div class="__style_prefix__-item-activity bx-def-margin-top bx-clearfix">__menu_item_actions__</div>
+			</bx_if:show_menu_item_actions>
+			<div class="__style_prefix__-item-comments-holder bx-def-font-middle">__comments__</div>
+		</div>
+	</div>
+</div>

+ 45 - 0
modules/boonex/timeline/template/item_timeline.html

@@ -0,0 +1,45 @@
+<div id="__html_id__" class="__style_prefix__-item __class__ bx-def-thumb-size-min-height bx-def-padding-bottom bx-clearfix">
+    <a name="timeline-event-__id__"></a>
+    <div class="__style_prefix__-item-type bx-def-media-phone-hide">
+	    <div class="__style_prefix__-item-circle">
+			<i class="sys-icon __item_icon__"></i>
+        </div>
+    </div>
+    <div class="__style_prefix__-item-cnt bx-def-box bx-def-padding-topbottom bx-def-round-corners __class_content__">
+        <div class="__style_prefix__-item-owner bx-def-margin-leftright"> 
+            <div class="__style_prefix__-owner-avatar bx-def-thumb bx-def-thumb-size">
+                <a href="__item_owner_url__" class="__style_prefix__-owner-avatar" title="__item_owner_title__">
+                    <bx_if:show_owner_icon>
+                        <img class="bx-def-thumb bx-def-thumb-size" src="__owner_icon__" />
+                    </bx_if:show_owner_icon>
+                    <bx_if:show_owner_icon_empty>
+                        <i class="sys-icon user"></i>
+                    </bx_if:show_owner_icon_empty>
+                </a>
+            </div>
+            <div class="__style_prefix__-owner-info bx-def-thumb-size-min-height bx-def-thumb-size-left-indent">
+                <!-- NOTE: Spaces after and between elements in 'owner-name' DIV are needed for better line folding -->
+                <div class="__style_prefix__-owner-name bx-def-font-middle bx-def-font-light bx-def-font-grayed">
+                    <a href="__item_owner_url__" class="__style_prefix__-owner-name" title="__item_owner_title__">__item_owner_name__</a> 
+                    <bx_if:show_timeline_owner>
+                        <i class="sys-icon caret-right"></i> <a href="__owner_url__" class="__style_prefix__-timeline-owner-name">__owner_username__</a> 
+                    </bx_if:show_timeline_owner>
+                    <span class="bx-def-font-small"> __item_owner_action__ </span> <span class="bx-bullet-narrow"> </span><a class="__style_prefix__-date bx-base-text-unit-date bx-def-font-small" href="__item_view_url__"> __item_date__ </a> 
+                    <bx_if:show_pinned>
+                        <span class="__style_prefix__-pinned bx-def-margin-thd-left">
+                            <i class="sys-icon thumb-tack bx-def-margin-thd-left" title="<bx_text_attribute:_bx_timeline_txt_pinned />"></i>
+                        </span>
+                    </bx_if:show_pinned>
+                </div>
+            </div>
+        </div>
+		<div class="__style_prefix__-item-content bx-def-margin-leftright bx-def-margin-top bx-clearfix">__content__</div>
+		<bx_if:show_location>
+		    <div class="__style_prefix__-item-location bx-def-margin-leftright bx-def-margin-top bx-def-font-grayed bx-clearfix">__location__</div>
+		</bx_if:show_location>
+		<bx_if:show_menu_item_actions>
+		    <div class="__style_prefix__-item-activity bx-def-margin-leftright bx-def-margin-top bx-clearfix">__menu_item_actions__</div>
+		</bx_if:show_menu_item_actions>
+		<div class="__style_prefix__-item-comments-holder bx-def-margin-leftright bx-def-font-middle">__comments__</div>
+    </div>
+</div>

+ 1406 - 0
plugins_public/modernizr.js

@@ -0,0 +1,1406 @@
+/*!
+ * Modernizr v2.8.3
+ * www.modernizr.com
+ *
+ * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton
+ * Available under the BSD and MIT licenses: www.modernizr.com/license/
+ */
+
+/*
+ * Modernizr tests which native CSS3 and HTML5 features are available in
+ * the current UA and makes the results available to you in two ways:
+ * as properties on a global Modernizr object, and as classes on the
+ * <html> element. This information allows you to progressively enhance
+ * your pages with a granular level of control over the experience.
+ *
+ * Modernizr has an optional (not included) conditional resource loader
+ * called Modernizr.load(), based on Yepnope.js (yepnopejs.com).
+ * To get a build that includes Modernizr.load(), as well as choosing
+ * which tests to include, go to www.modernizr.com/download/
+ *
+ * Authors        Faruk Ates, Paul Irish, Alex Sexton
+ * Contributors   Ryan Seddon, Ben Alman
+ */
+
+window.Modernizr = (function( window, document, undefined ) {
+
+    var version = '2.8.3',
+
+    Modernizr = {},
+
+    /*>>cssclasses*/
+    // option for enabling the HTML classes to be added
+    enableClasses = true,
+    /*>>cssclasses*/
+
+    docElement = document.documentElement,
+
+    /**
+     * Create our "modernizr" element that we do most feature tests on.
+     */
+    mod = 'modernizr',
+    modElem = document.createElement(mod),
+    mStyle = modElem.style,
+
+    /**
+     * Create the input element for various Web Forms feature tests.
+     */
+    inputElem /*>>inputelem*/ = document.createElement('input') /*>>inputelem*/ ,
+
+    /*>>smile*/
+    smile = ':)',
+    /*>>smile*/
+
+    toString = {}.toString,
+
+    // TODO :: make the prefixes more granular
+    /*>>prefixes*/
+    // List of property values to set for css tests. See ticket #21
+    prefixes = ' -webkit- -moz- -o- -ms- '.split(' '),
+    /*>>prefixes*/
+
+    /*>>domprefixes*/
+    // Following spec is to expose vendor-specific style properties as:
+    //   elem.style.WebkitBorderRadius
+    // and the following would be incorrect:
+    //   elem.style.webkitBorderRadius
+
+    // Webkit ghosts their properties in lowercase but Opera & Moz do not.
+    // Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+
+    //   erik.eae.net/archives/2008/03/10/21.48.10/
+
+    // More here: github.com/Modernizr/Modernizr/issues/issue/21
+    omPrefixes = 'Webkit Moz O ms',
+
+    cssomPrefixes = omPrefixes.split(' '),
+
+    domPrefixes = omPrefixes.toLowerCase().split(' '),
+    /*>>domprefixes*/
+
+    /*>>ns*/
+    ns = {'svg': 'http://www.w3.org/2000/svg'},
+    /*>>ns*/
+
+    tests = {},
+    inputs = {},
+    attrs = {},
+
+    classes = [],
+
+    slice = classes.slice,
+
+    featureName, // used in testing loop
+
+
+    /*>>teststyles*/
+    // Inject element with style element and some CSS rules
+    injectElementWithStyles = function( rule, callback, nodes, testnames ) {
+
+      var style, ret, node, docOverflow,
+          div = document.createElement('div'),
+          // After page load injecting a fake body doesn't work so check if body exists
+          body = document.body,
+          // IE6 and 7 won't return offsetWidth or offsetHeight unless it's in the body element, so we fake it.
+          fakeBody = body || document.createElement('body');
+
+      if ( parseInt(nodes, 10) ) {
+          // In order not to give false positives we create a node for each test
+          // This also allows the method to scale for unspecified uses
+          while ( nodes-- ) {
+              node = document.createElement('div');
+              node.id = testnames ? testnames[nodes] : mod + (nodes + 1);
+              div.appendChild(node);
+          }
+      }
+
+      // <style> elements in IE6-9 are considered 'NoScope' elements and therefore will be removed
+      // when injected with innerHTML. To get around this you need to prepend the 'NoScope' element
+      // with a 'scoped' element, in our case the soft-hyphen entity as it won't mess with our measurements.
+      // msdn.microsoft.com/en-us/library/ms533897%28VS.85%29.aspx
+      // Documents served as xml will throw if using &shy; so use xml friendly encoded version. See issue #277
+      style = ['&#173;','<style id="s', mod, '">', rule, '</style>'].join('');
+      div.id = mod;
+      // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.
+      // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270
+      (body ? div : fakeBody).innerHTML += style;
+      fakeBody.appendChild(div);
+      if ( !body ) {
+          //avoid crashing IE8, if background image is used
+          fakeBody.style.background = '';
+          //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible
+          fakeBody.style.overflow = 'hidden';
+          docOverflow = docElement.style.overflow;
+          docElement.style.overflow = 'hidden';
+          docElement.appendChild(fakeBody);
+      }
+
+      ret = callback(div, rule);
+      // If this is done after page load we don't want to remove the body so check if body exists
+      if ( !body ) {
+          fakeBody.parentNode.removeChild(fakeBody);
+          docElement.style.overflow = docOverflow;
+      } else {
+          div.parentNode.removeChild(div);
+      }
+
+      return !!ret;
+
+    },
+    /*>>teststyles*/
+
+    /*>>mq*/
+    // adapted from matchMedia polyfill
+    // by Scott Jehl and Paul Irish
+    // gist.github.com/786768
+    testMediaQuery = function( mq ) {
+
+      var matchMedia = window.matchMedia || window.msMatchMedia;
+      if ( matchMedia ) {
+        return matchMedia(mq) && matchMedia(mq).matches || false;
+      }
+
+      var bool;
+
+      injectElementWithStyles('@media ' + mq + ' { #' + mod + ' { position: absolute; } }', function( node ) {
+        bool = (window.getComputedStyle ?
+                  getComputedStyle(node, null) :
+                  node.currentStyle)['position'] == 'absolute';
+      });
+
+      return bool;
+
+     },
+     /*>>mq*/
+
+
+    /*>>hasevent*/
+    //
+    // isEventSupported determines if a given element supports the given event
+    // kangax.github.com/iseventsupported/
+    //
+    // The following results are known incorrects:
+    //   Modernizr.hasEvent("webkitTransitionEnd", elem) // false negative
+    //   Modernizr.hasEvent("textInput") // in Webkit. github.com/Modernizr/Modernizr/issues/333
+    //   ...
+    isEventSupported = (function() {
+
+      var TAGNAMES = {
+        'select': 'input', 'change': 'input',
+        'submit': 'form', 'reset': 'form',
+        'error': 'img', 'load': 'img', 'abort': 'img'
+      };
+
+      function isEventSupported( eventName, element ) {
+
+        element = element || document.createElement(TAGNAMES[eventName] || 'div');
+        eventName = 'on' + eventName;
+
+        // When using `setAttribute`, IE skips "unload", WebKit skips "unload" and "resize", whereas `in` "catches" those
+        var isSupported = eventName in element;
+
+        if ( !isSupported ) {
+          // If it has no `setAttribute` (i.e. doesn't implement Node interface), try generic element
+          if ( !element.setAttribute ) {
+            element = document.createElement('div');
+          }
+          if ( element.setAttribute && element.removeAttribute ) {
+            element.setAttribute(eventName, '');
+            isSupported = is(element[eventName], 'function');
+
+            // If property was created, "remove it" (by setting value to `undefined`)
+            if ( !is(element[eventName], 'undefined') ) {
+              element[eventName] = undefined;
+            }
+            element.removeAttribute(eventName);
+          }
+        }
+
+        element = null;
+        return isSupported;
+      }
+      return isEventSupported;
+    })(),
+    /*>>hasevent*/
+
+    // TODO :: Add flag for hasownprop ? didn't last time
+
+    // hasOwnProperty shim by kangax needed for Safari 2.0 support
+    _hasOwnProperty = ({}).hasOwnProperty, hasOwnProp;
+
+    if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) {
+      hasOwnProp = function (object, property) {
+        return _hasOwnProperty.call(object, property);
+      };
+    }
+    else {
+      hasOwnProp = function (object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */
+        return ((property in object) && is(object.constructor.prototype[property], 'undefined'));
+      };
+    }
+
+    // Adapted from ES5-shim https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js
+    // es5.github.com/#x15.3.4.5
+
+    if (!Function.prototype.bind) {
+      Function.prototype.bind = function bind(that) {
+
+        var target = this;
+
+        if (typeof target != "function") {
+            throw new TypeError();
+        }
+
+        var args = slice.call(arguments, 1),
+            bound = function () {
+
+            if (this instanceof bound) {
+
+              var F = function(){};
+              F.prototype = target.prototype;
+              var self = new F();
+
+              var result = target.apply(
+                  self,
+                  args.concat(slice.call(arguments))
+              );
+              if (Object(result) === result) {
+                  return result;
+              }
+              return self;
+
+            } else {
+
+              return target.apply(
+                  that,
+                  args.concat(slice.call(arguments))
+              );
+
+            }
+
+        };
+
+        return bound;
+      };
+    }
+
+    /**
+     * setCss applies given styles to the Modernizr DOM node.
+     */
+    function setCss( str ) {
+        mStyle.cssText = str;
+    }
+
+    /**
+     * setCssAll extrapolates all vendor-specific css strings.
+     */
+    function setCssAll( str1, str2 ) {
+        return setCss(prefixes.join(str1 + ';') + ( str2 || '' ));
+    }
+
+    /**
+     * is returns a boolean for if typeof obj is exactly type.
+     */
+    function is( obj, type ) {
+        return typeof obj === type;
+    }
+
+    /**
+     * contains returns a boolean for if substr is found within str.
+     */
+    function contains( str, substr ) {
+        return !!~('' + str).indexOf(substr);
+    }
+
+    /*>>testprop*/
+
+    // testProps is a generic CSS / DOM property test.
+
+    // In testing support for a given CSS property, it's legit to test:
+    //    `elem.style[styleName] !== undefined`
+    // If the property is supported it will return an empty string,
+    // if unsupported it will return undefined.
+
+    // We'll take advantage of this quick test and skip setting a style
+    // on our modernizr element, but instead just testing undefined vs
+    // empty string.
+
+    // Because the testing of the CSS property names (with "-", as
+    // opposed to the camelCase DOM properties) is non-portable and
+    // non-standard but works in WebKit and IE (but not Gecko or Opera),
+    // we explicitly reject properties with dashes so that authors
+    // developing in WebKit or IE first don't end up with
+    // browser-specific content by accident.
+
+    function testProps( props, prefixed ) {
+        for ( var i in props ) {
+            var prop = props[i];
+            if ( !contains(prop, "-") && mStyle[prop] !== undefined ) {
+                return prefixed == 'pfx' ? prop : true;
+            }
+        }
+        return false;
+    }
+    /*>>testprop*/
+
+    // TODO :: add testDOMProps
+    /**
+     * testDOMProps is a generic DOM property test; if a browser supports
+     *   a certain property, it won't return undefined for it.
+     */
+    function testDOMProps( props, obj, elem ) {
+        for ( var i in props ) {
+            var item = obj[props[i]];
+            if ( item !== undefined) {
+
+                // return the property name as a string
+                if (elem === false) return props[i];
+
+                // let's bind a function
+                if (is(item, 'function')){
+                  // default to autobind unless override
+                  return item.bind(elem || obj);
+                }
+
+                // return the unbound function or obj or value
+                return item;
+            }
+        }
+        return false;
+    }
+
+    /*>>testallprops*/
+    /**
+     * testPropsAll tests a list of DOM properties we want to check against.
+     *   We specify literally ALL possible (known and/or likely) properties on
+     *   the element including the non-vendor prefixed one, for forward-
+     *   compatibility.
+     */
+    function testPropsAll( prop, prefixed, elem ) {
+
+        var ucProp  = prop.charAt(0).toUpperCase() + prop.slice(1),
+            props   = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');
+
+        // did they call .prefixed('boxSizing') or are we just testing a prop?
+        if(is(prefixed, "string") || is(prefixed, "undefined")) {
+          return testProps(props, prefixed);
+
+        // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])
+        } else {
+          props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');
+          return testDOMProps(props, prefixed, elem);
+        }
+    }
+    /*>>testallprops*/
+
+
+    /**
+     * Tests
+     * -----
+     */
+
+    // The *new* flexbox
+    // dev.w3.org/csswg/css3-flexbox
+
+    tests['flexbox'] = function() {
+      return testPropsAll('flexWrap');
+    };
+
+    // The *old* flexbox
+    // www.w3.org/TR/2009/WD-css3-flexbox-20090723/
+
+    tests['flexboxlegacy'] = function() {
+        return testPropsAll('boxDirection');
+    };
+
+    // On the S60 and BB Storm, getContext exists, but always returns undefined
+    // so we actually have to call getContext() to verify
+    // github.com/Modernizr/Modernizr/issues/issue/97/
+
+    tests['canvas'] = function() {
+        var elem = document.createElement('canvas');
+        return !!(elem.getContext && elem.getContext('2d'));
+    };
+
+    tests['canvastext'] = function() {
+        return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function'));
+    };
+
+    // webk.it/70117 is tracking a legit WebGL feature detect proposal
+
+    // We do a soft detect which may false positive in order to avoid
+    // an expensive context creation: bugzil.la/732441
+
+    tests['webgl'] = function() {
+        return !!window.WebGLRenderingContext;
+    };
+
+    /*
+     * The Modernizr.touch test only indicates if the browser supports
+     *    touch events, which does not necessarily reflect a touchscreen
+     *    device, as evidenced by tablets running Windows 7 or, alas,
+     *    the Palm Pre / WebOS (touch) phones.
+     *
+     * Additionally, Chrome (desktop) used to lie about its support on this,
+     *    but that has since been rectified: crbug.com/36415
+     *
+     * We also test for Firefox 4 Multitouch Support.
+     *
+     * For more info, see: modernizr.github.com/Modernizr/touch.html
+     */
+
+    tests['touch'] = function() {
+        var bool;
+
+        if(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
+          bool = true;
+        } else {
+          injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}'].join(''), function( node ) {
+            bool = node.offsetTop === 9;
+          });
+        }
+
+        return bool;
+    };
+
+
+    // geolocation is often considered a trivial feature detect...
+    // Turns out, it's quite tricky to get right:
+    //
+    // Using !!navigator.geolocation does two things we don't want. It:
+    //   1. Leaks memory in IE9: github.com/Modernizr/Modernizr/issues/513
+    //   2. Disables page caching in WebKit: webk.it/43956
+    //
+    // Meanwhile, in Firefox < 8, an about:config setting could expose
+    // a false positive that would throw an exception: bugzil.la/688158
+
+    tests['geolocation'] = function() {
+        return 'geolocation' in navigator;
+    };
+
+
+    tests['postmessage'] = function() {
+      return !!window.postMessage;
+    };
+
+
+    // Chrome incognito mode used to throw an exception when using openDatabase
+    // It doesn't anymore.
+    tests['websqldatabase'] = function() {
+      return !!window.openDatabase;
+    };
+
+    // Vendors had inconsistent prefixing with the experimental Indexed DB:
+    // - Webkit's implementation is accessible through webkitIndexedDB
+    // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB
+    // For speed, we don't test the legacy (and beta-only) indexedDB
+    tests['indexedDB'] = function() {
+      return !!testPropsAll("indexedDB", window);
+    };
+
+    // documentMode logic from YUI to filter out IE8 Compat Mode
+    //   which false positives.
+    tests['hashchange'] = function() {
+      return isEventSupported('hashchange', window) && (document.documentMode === undefined || document.documentMode > 7);
+    };
+
+    // Per 1.6:
+    // This used to be Modernizr.historymanagement but the longer
+    // name has been deprecated in favor of a shorter and property-matching one.
+    // The old API is still available in 1.6, but as of 2.0 will throw a warning,
+    // and in the first release thereafter disappear entirely.
+    tests['history'] = function() {
+      return !!(window.history && history.pushState);
+    };
+
+    tests['draganddrop'] = function() {
+        var div = document.createElement('div');
+        return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div);
+    };
+
+    // FF3.6 was EOL'ed on 4/24/12, but the ESR version of FF10
+    // will be supported until FF19 (2/12/13), at which time, ESR becomes FF17.
+    // FF10 still uses prefixes, so check for it until then.
+    // for more ESR info, see: mozilla.org/en-US/firefox/organizations/faq/
+    tests['websockets'] = function() {
+        return 'WebSocket' in window || 'MozWebSocket' in window;
+    };
+
+
+    // css-tricks.com/rgba-browser-support/
+    tests['rgba'] = function() {
+        // Set an rgba() color and check the returned value
+
+        setCss('background-color:rgba(150,255,150,.5)');
+
+        return contains(mStyle.backgroundColor, 'rgba');
+    };
+
+    tests['hsla'] = function() {
+        // Same as rgba(), in fact, browsers re-map hsla() to rgba() internally,
+        //   except IE9 who retains it as hsla
+
+        setCss('background-color:hsla(120,40%,100%,.5)');
+
+        return contains(mStyle.backgroundColor, 'rgba') || contains(mStyle.backgroundColor, 'hsla');
+    };
+
+    tests['multiplebgs'] = function() {
+        // Setting multiple images AND a color on the background shorthand property
+        //  and then querying the style.background property value for the number of
+        //  occurrences of "url(" is a reliable method for detecting ACTUAL support for this!
+
+        setCss('background:url(https://),url(https://),red url(https://)');
+
+        // If the UA supports multiple backgrounds, there should be three occurrences
+        //   of the string "url(" in the return value for elemStyle.background
+
+        return (/(url\s*\(.*?){3}/).test(mStyle.background);
+    };
+
+
+
+    // this will false positive in Opera Mini
+    //   github.com/Modernizr/Modernizr/issues/396
+
+    tests['backgroundsize'] = function() {
+        return testPropsAll('backgroundSize');
+    };
+
+    tests['borderimage'] = function() {
+        return testPropsAll('borderImage');
+    };
+
+
+    // Super comprehensive table about all the unique implementations of
+    // border-radius: muddledramblings.com/table-of-css3-border-radius-compliance
+
+    tests['borderradius'] = function() {
+        return testPropsAll('borderRadius');
+    };
+
+    // WebOS unfortunately false positives on this test.
+    tests['boxshadow'] = function() {
+        return testPropsAll('boxShadow');
+    };
+
+    // FF3.0 will false positive on this test
+    tests['textshadow'] = function() {
+        return document.createElement('div').style.textShadow === '';
+    };
+
+
+    tests['opacity'] = function() {
+        // Browsers that actually have CSS Opacity implemented have done so
+        //  according to spec, which means their return values are within the
+        //  range of [0.0,1.0] - including the leading zero.
+
+        setCssAll('opacity:.55');
+
+        // The non-literal . in this regex is intentional:
+        //   German Chrome returns this value as 0,55
+        // github.com/Modernizr/Modernizr/issues/#issue/59/comment/516632
+        return (/^0.55$/).test(mStyle.opacity);
+    };
+
+
+    // Note, Android < 4 will pass this test, but can only animate
+    //   a single property at a time
+    //   goo.gl/v3V4Gp
+    tests['cssanimations'] = function() {
+        return testPropsAll('animationName');
+    };
+
+
+    tests['csscolumns'] = function() {
+        return testPropsAll('columnCount');
+    };
+
+
+    tests['cssgradients'] = function() {
+        /**
+         * For CSS Gradients syntax, please see:
+         * webkit.org/blog/175/introducing-css-gradients/
+         * developer.mozilla.org/en/CSS/-moz-linear-gradient
+         * developer.mozilla.org/en/CSS/-moz-radial-gradient
+         * dev.w3.org/csswg/css3-images/#gradients-
+         */
+
+        var str1 = 'background-image:',
+            str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));',
+            str3 = 'linear-gradient(left top,#9f9, white);';
+
+        setCss(
+             // legacy webkit syntax (FIXME: remove when syntax not in use anymore)
+              (str1 + '-webkit- '.split(' ').join(str2 + str1) +
+             // standard syntax             // trailing 'background-image:'
+              prefixes.join(str3 + str1)).slice(0, -str1.length)
+        );
+
+        return contains(mStyle.backgroundImage, 'gradient');
+    };
+
+
+    tests['cssreflections'] = function() {
+        return testPropsAll('boxReflect');
+    };
+
+
+    tests['csstransforms'] = function() {
+        return !!testPropsAll('transform');
+    };
+
+
+    tests['csstransforms3d'] = function() {
+
+        var ret = !!testPropsAll('perspective');
+
+        // Webkit's 3D transforms are passed off to the browser's own graphics renderer.
+        //   It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in
+        //   some conditions. As a result, Webkit typically recognizes the syntax but
+        //   will sometimes throw a false positive, thus we must do a more thorough check:
+        if ( ret && 'webkitPerspective' in docElement.style ) {
+
+          // Webkit allows this media query to succeed only if the feature is enabled.
+          // `@media (transform-3d),(-webkit-transform-3d){ ... }`
+          injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}', function( node, rule ) {
+            ret = node.offsetLeft === 9 && node.offsetHeight === 3;
+          });
+        }
+        return ret;
+    };
+
+
+    tests['csstransitions'] = function() {
+        return testPropsAll('transition');
+    };
+
+
+    /*>>fontface*/
+    // @font-face detection routine by Diego Perini
+    // javascript.nwbox.com/CSSSupport/
+
+    // false positives:
+    //   WebOS github.com/Modernizr/Modernizr/issues/342
+    //   WP7   github.com/Modernizr/Modernizr/issues/538
+    tests['fontface'] = function() {
+        var bool;
+
+        injectElementWithStyles('@font-face {font-family:"font";src:url("https://")}', function( node, rule ) {
+          var style = document.getElementById('smodernizr'),
+              sheet = style.sheet || style.styleSheet,
+              cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : '';
+
+          bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0;
+        });
+
+        return bool;
+    };
+    /*>>fontface*/
+
+    // CSS generated content detection
+    tests['generatedcontent'] = function() {
+        var bool;
+
+        injectElementWithStyles(['#',mod,'{font:0/0 a}#',mod,':after{content:"',smile,'";visibility:hidden;font:3px/1 a}'].join(''), function( node ) {
+          bool = node.offsetHeight >= 3;
+        });
+
+        return bool;
+    };
+
+
+
+    // These tests evaluate support of the video/audio elements, as well as
+    // testing what types of content they support.
+    //
+    // We're using the Boolean constructor here, so that we can extend the value
+    // e.g.  Modernizr.video     // true
+    //       Modernizr.video.ogg // 'probably'
+    //
+    // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845
+    //                     thx to NielsLeenheer and zcorpan
+
+    // Note: in some older browsers, "no" was a return value instead of empty string.
+    //   It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2
+    //   It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5
+
+    tests['video'] = function() {
+        var elem = document.createElement('video'),
+            bool = false;
+
+        // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224
+        try {
+            if ( bool = !!elem.canPlayType ) {
+                bool      = new Boolean(bool);
+                bool.ogg  = elem.canPlayType('video/ogg; codecs="theora"')      .replace(/^no$/,'');
+
+                // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546
+                bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"') .replace(/^no$/,'');
+
+                bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,'');
+            }
+
+        } catch(e) { }
+
+        return bool;
+    };
+
+    tests['audio'] = function() {
+        var elem = document.createElement('audio'),
+            bool = false;
+
+        try {
+            if ( bool = !!elem.canPlayType ) {
+                bool      = new Boolean(bool);
+                bool.ogg  = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,'');
+                bool.mp3  = elem.canPlayType('audio/mpeg;')               .replace(/^no$/,'');
+
+                // Mimetypes accepted:
+                //   developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements
+                //   bit.ly/iphoneoscodecs
+                bool.wav  = elem.canPlayType('audio/wav; codecs="1"')     .replace(/^no$/,'');
+                bool.m4a  = ( elem.canPlayType('audio/x-m4a;')            ||
+                              elem.canPlayType('audio/aac;'))             .replace(/^no$/,'');
+            }
+        } catch(e) { }
+
+        return bool;
+    };
+
+
+    // In FF4, if disabled, window.localStorage should === null.
+
+    // Normally, we could not test that directly and need to do a
+    //   `('localStorage' in window) && ` test first because otherwise Firefox will
+    //   throw bugzil.la/365772 if cookies are disabled
+
+    // Also in iOS5 Private Browsing mode, attempting to use localStorage.setItem
+    // will throw the exception:
+    //   QUOTA_EXCEEDED_ERRROR DOM Exception 22.
+    // Peculiarly, getItem and removeItem calls do not throw.
+
+    // Because we are forced to try/catch this, we'll go aggressive.
+
+    // Just FWIW: IE8 Compat mode supports these features completely:
+    //   www.quirksmode.org/dom/html5.html
+    // But IE8 doesn't support either with local files
+
+    tests['localstorage'] = function() {
+        try {
+            localStorage.setItem(mod, mod);
+            localStorage.removeItem(mod);
+            return true;
+        } catch(e) {
+            return false;
+        }
+    };
+
+    tests['sessionstorage'] = function() {
+        try {
+            sessionStorage.setItem(mod, mod);
+            sessionStorage.removeItem(mod);
+            return true;
+        } catch(e) {
+            return false;
+        }
+    };
+
+
+    tests['webworkers'] = function() {
+        return !!window.Worker;
+    };
+
+
+    tests['applicationcache'] = function() {
+        return !!window.applicationCache;
+    };
+
+
+    // Thanks to Erik Dahlstrom
+    tests['svg'] = function() {
+        return !!document.createElementNS && !!document.createElementNS(ns.svg, 'svg').createSVGRect;
+    };
+
+    // specifically for SVG inline in HTML, not within XHTML
+    // test page: paulirish.com/demo/inline-svg
+    tests['inlinesvg'] = function() {
+      var div = document.createElement('div');
+      div.innerHTML = '<svg/>';
+      return (div.firstChild && div.firstChild.namespaceURI) == ns.svg;
+    };
+
+    // SVG SMIL animation
+    tests['smil'] = function() {
+        return !!document.createElementNS && /SVGAnimate/.test(toString.call(document.createElementNS(ns.svg, 'animate')));
+    };
+
+    // This test is only for clip paths in SVG proper, not clip paths on HTML content
+    // demo: srufaculty.sru.edu/david.dailey/svg/newstuff/clipPath4.svg
+
+    // However read the comments to dig into applying SVG clippaths to HTML content here:
+    //   github.com/Modernizr/Modernizr/issues/213#issuecomment-1149491
+    tests['svgclippaths'] = function() {
+        return !!document.createElementNS && /SVGClipPath/.test(toString.call(document.createElementNS(ns.svg, 'clipPath')));
+    };
+
+    /*>>webforms*/
+    // input features and input types go directly onto the ret object, bypassing the tests loop.
+    // Hold this guy to execute in a moment.
+    function webforms() {
+        /*>>input*/
+        // Run through HTML5's new input attributes to see if the UA understands any.
+        // We're using f which is the <input> element created early on
+        // Mike Taylr has created a comprehensive resource for testing these attributes
+        //   when applied to all input types:
+        //   miketaylr.com/code/input-type-attr.html
+        // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
+
+        // Only input placeholder is tested while textarea's placeholder is not.
+        // Currently Safari 4 and Opera 11 have support only for the input placeholder
+        // Both tests are available in feature-detects/forms-placeholder.js
+        Modernizr['input'] = (function( props ) {
+            for ( var i = 0, len = props.length; i < len; i++ ) {
+                attrs[ props[i] ] = !!(props[i] in inputElem);
+            }
+            if (attrs.list){
+              // safari false positive's on datalist: webk.it/74252
+              // see also github.com/Modernizr/Modernizr/issues/146
+              attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);
+            }
+            return attrs;
+        })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));
+        /*>>input*/
+
+        /*>>inputtypes*/
+        // Run through HTML5's new input types to see if the UA understands any.
+        //   This is put behind the tests runloop because it doesn't return a
+        //   true/false like all the other tests; instead, it returns an object
+        //   containing each input type with its corresponding true/false value
+
+        // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/
+        Modernizr['inputtypes'] = (function(props) {
+
+            for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {
+
+                inputElem.setAttribute('type', inputElemType = props[i]);
+                bool = inputElem.type !== 'text';
+
+                // We first check to see if the type we give it sticks..
+                // If the type does, we feed it a textual value, which shouldn't be valid.
+                // If the value doesn't stick, we know there's input sanitization which infers a custom UI
+                if ( bool ) {
+
+                    inputElem.value         = smile;
+                    inputElem.style.cssText = 'position:absolute;visibility:hidden;';
+
+                    if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {
+
+                      docElement.appendChild(inputElem);
+                      defaultView = document.defaultView;
+
+                      // Safari 2-4 allows the smiley as a value, despite making a slider
+                      bool =  defaultView.getComputedStyle &&
+                              defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&
+                              // Mobile android web browser has false positive, so must
+                              // check the height to see if the widget is actually there.
+                              (inputElem.offsetHeight !== 0);
+
+                      docElement.removeChild(inputElem);
+
+                    } else if ( /^(search|tel)$/.test(inputElemType) ){
+                      // Spec doesn't define any special parsing or detectable UI
+                      //   behaviors so we pass these through as true
+
+                      // Interestingly, opera fails the earlier test, so it doesn't
+                      //  even make it here.
+
+                    } else if ( /^(url|email)$/.test(inputElemType) ) {
+                      // Real url and email support comes with prebaked validation.
+                      bool = inputElem.checkValidity && inputElem.checkValidity() === false;
+
+                    } else {
+                      // If the upgraded input compontent rejects the :) text, we got a winner
+                      bool = inputElem.value != smile;
+                    }
+                }
+
+                inputs[ props[i] ] = !!bool;
+            }
+            return inputs;
+        })('search tel url email datetime date month week time datetime-local number range color'.split(' '));
+        /*>>inputtypes*/
+    }
+    /*>>webforms*/
+
+
+    // End of test definitions
+    // -----------------------
+
+
+
+    // Run through all tests and detect their support in the current UA.
+    // todo: hypothetically we could be doing an array of tests and use a basic loop here.
+    for ( var feature in tests ) {
+        if ( hasOwnProp(tests, feature) ) {
+            // run the test, throw the return value into the Modernizr,
+            //   then based on that boolean, define an appropriate className
+            //   and push it into an array of classes we'll join later.
+            featureName  = feature.toLowerCase();
+            Modernizr[featureName] = tests[feature]();
+
+            classes.push((Modernizr[featureName] ? '' : 'no-') + featureName);
+        }
+    }
+
+    /*>>webforms*/
+    // input tests need to run.
+    Modernizr.input || webforms();
+    /*>>webforms*/
+
+
+    /**
+     * addTest allows the user to define their own feature tests
+     * the result will be added onto the Modernizr object,
+     * as well as an appropriate className set on the html element
+     *
+     * @param feature - String naming the feature
+     * @param test - Function returning true if feature is supported, false if not
+     */
+     Modernizr.addTest = function ( feature, test ) {
+       if ( typeof feature == 'object' ) {
+         for ( var key in feature ) {
+           if ( hasOwnProp( feature, key ) ) {
+             Modernizr.addTest( key, feature[ key ] );
+           }
+         }
+       } else {
+
+         feature = feature.toLowerCase();
+
+         if ( Modernizr[feature] !== undefined ) {
+           // we're going to quit if you're trying to overwrite an existing test
+           // if we were to allow it, we'd do this:
+           //   var re = new RegExp("\\b(no-)?" + feature + "\\b");
+           //   docElement.className = docElement.className.replace( re, '' );
+           // but, no rly, stuff 'em.
+           return Modernizr;
+         }
+
+         test = typeof test == 'function' ? test() : test;
+
+         if (typeof enableClasses !== "undefined" && enableClasses) {
+           docElement.className += ' ' + (test ? '' : 'no-') + feature;
+         }
+         Modernizr[feature] = test;
+
+       }
+
+       return Modernizr; // allow chaining.
+     };
+
+
+    // Reset modElem.cssText to nothing to reduce memory footprint.
+    setCss('');
+    modElem = inputElem = null;
+
+    /*>>shiv*/
+    /**
+     * @preserve HTML5 Shiv prev3.7.1 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
+     */
+    ;(function(window, document) {
+        /*jshint evil:true */
+        /** version */
+        var version = '3.7.0';
+
+        /** Preset options */
+        var options = window.html5 || {};
+
+        /** Used to skip problem elements */
+        var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
+
+        /** Not all elements can be cloned in IE **/
+        var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
+
+        /** Detect whether the browser supports default html5 styles */
+        var supportsHtml5Styles;
+
+        /** Name of the expando, to work with multiple documents or to re-shiv one document */
+        var expando = '_html5shiv';
+
+        /** The id for the the documents expando */
+        var expanID = 0;
+
+        /** Cached data for each document */
+        var expandoData = {};
+
+        /** Detect whether the browser supports unknown elements */
+        var supportsUnknownElements;
+
+        (function() {
+          try {
+            var a = document.createElement('a');
+            a.innerHTML = '<xyz></xyz>';
+            //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
+            supportsHtml5Styles = ('hidden' in a);
+
+            supportsUnknownElements = a.childNodes.length == 1 || (function() {
+              // assign a false positive if unable to shiv
+              (document.createElement)('a');
+              var frag = document.createDocumentFragment();
+              return (
+                typeof frag.cloneNode == 'undefined' ||
+                typeof frag.createDocumentFragment == 'undefined' ||
+                typeof frag.createElement == 'undefined'
+              );
+            }());
+          } catch(e) {
+            // assign a false positive if detection fails => unable to shiv
+            supportsHtml5Styles = true;
+            supportsUnknownElements = true;
+          }
+
+        }());
+
+        /*--------------------------------------------------------------------------*/
+
+        /**
+         * Creates a style sheet with the given CSS text and adds it to the document.
+         * @private
+         * @param {Document} ownerDocument The document.
+         * @param {String} cssText The CSS text.
+         * @returns {StyleSheet} The style element.
+         */
+        function addStyleSheet(ownerDocument, cssText) {
+          var p = ownerDocument.createElement('p'),
+          parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
+
+          p.innerHTML = 'x<style>' + cssText + '</style>';
+          return parent.insertBefore(p.lastChild, parent.firstChild);
+        }
+
+        /**
+         * Returns the value of `html5.elements` as an array.
+         * @private
+         * @returns {Array} An array of shived element node names.
+         */
+        function getElements() {
+          var elements = html5.elements;
+          return typeof elements == 'string' ? elements.split(' ') : elements;
+        }
+
+        /**
+         * Returns the data associated to the given document
+         * @private
+         * @param {Document} ownerDocument The document.
+         * @returns {Object} An object of data.
+         */
+        function getExpandoData(ownerDocument) {
+          var data = expandoData[ownerDocument[expando]];
+          if (!data) {
+            data = {};
+            expanID++;
+            ownerDocument[expando] = expanID;
+            expandoData[expanID] = data;
+          }
+          return data;
+        }
+
+        /**
+         * returns a shived element for the given nodeName and document
+         * @memberOf html5
+         * @param {String} nodeName name of the element
+         * @param {Document} ownerDocument The context document.
+         * @returns {Object} The shived element.
+         */
+        function createElement(nodeName, ownerDocument, data){
+          if (!ownerDocument) {
+            ownerDocument = document;
+          }
+          if(supportsUnknownElements){
+            return ownerDocument.createElement(nodeName);
+          }
+          if (!data) {
+            data = getExpandoData(ownerDocument);
+          }
+          var node;
+
+          if (data.cache[nodeName]) {
+            node = data.cache[nodeName].cloneNode();
+          } else if (saveClones.test(nodeName)) {
+            node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
+          } else {
+            node = data.createElem(nodeName);
+          }
+
+          // Avoid adding some elements to fragments in IE < 9 because
+          // * Attributes like `name` or `type` cannot be set/changed once an element
+          //   is inserted into a document/fragment
+          // * Link elements with `src` attributes that are inaccessible, as with
+          //   a 403 response, will cause the tab/window to crash
+          // * Script elements appended to fragments will execute when their `src`
+          //   or `text` property is set
+          return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
+        }
+
+        /**
+         * returns a shived DocumentFragment for the given document
+         * @memberOf html5
+         * @param {Document} ownerDocument The context document.
+         * @returns {Object} The shived DocumentFragment.
+         */
+        function createDocumentFragment(ownerDocument, data){
+          if (!ownerDocument) {
+            ownerDocument = document;
+          }
+          if(supportsUnknownElements){
+            return ownerDocument.createDocumentFragment();
+          }
+          data = data || getExpandoData(ownerDocument);
+          var clone = data.frag.cloneNode(),
+          i = 0,
+          elems = getElements(),
+          l = elems.length;
+          for(;i<l;i++){
+            clone.createElement(elems[i]);
+          }
+          return clone;
+        }
+
+        /**
+         * Shivs the `createElement` and `createDocumentFragment` methods of the document.
+         * @private
+         * @param {Document|DocumentFragment} ownerDocument The document.
+         * @param {Object} data of the document.
+         */
+        function shivMethods(ownerDocument, data) {
+          if (!data.cache) {
+            data.cache = {};
+            data.createElem = ownerDocument.createElement;
+            data.createFrag = ownerDocument.createDocumentFragment;
+            data.frag = data.createFrag();
+          }
+
+
+          ownerDocument.createElement = function(nodeName) {
+            //abort shiv
+            if (!html5.shivMethods) {
+              return data.createElem(nodeName);
+            }
+            return createElement(nodeName, ownerDocument, data);
+          };
+
+          ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
+                                                          'var n=f.cloneNode(),c=n.createElement;' +
+                                                          'h.shivMethods&&(' +
+                                                          // unroll the `createElement` calls
+                                                          getElements().join().replace(/[\w\-]+/g, function(nodeName) {
+            data.createElem(nodeName);
+            data.frag.createElement(nodeName);
+            return 'c("' + nodeName + '")';
+          }) +
+            ');return n}'
+                                                         )(html5, data.frag);
+        }
+
+        /*--------------------------------------------------------------------------*/
+
+        /**
+         * Shivs the given document.
+         * @memberOf html5
+         * @param {Document} ownerDocument The document to shiv.
+         * @returns {Document} The shived document.
+         */
+        function shivDocument(ownerDocument) {
+          if (!ownerDocument) {
+            ownerDocument = document;
+          }
+          var data = getExpandoData(ownerDocument);
+
+          if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
+            data.hasCSS = !!addStyleSheet(ownerDocument,
+                                          // corrects block display not defined in IE6/7/8/9
+                                          'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
+                                            // adds styling not present in IE6/7/8/9
+                                            'mark{background:#FF0;color:#000}' +
+                                            // hides non-rendered elements
+                                            'template{display:none}'
+                                         );
+          }
+          if (!supportsUnknownElements) {
+            shivMethods(ownerDocument, data);
+          }
+          return ownerDocument;
+        }
+
+        /*--------------------------------------------------------------------------*/
+
+        /**
+         * The `html5` object is exposed so that more elements can be shived and
+         * existing shiving can be detected on iframes.
+         * @type Object
+         * @example
+         *
+         * // options can be changed before the script is included
+         * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
+         */
+        var html5 = {
+
+          /**
+           * An array or space separated string of node names of the elements to shiv.
+           * @memberOf html5
+           * @type Array|String
+           */
+          'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video',
+
+          /**
+           * current version of html5shiv
+           */
+          'version': version,
+
+          /**
+           * A flag to indicate that the HTML5 style sheet should be inserted.
+           * @memberOf html5
+           * @type Boolean
+           */
+          'shivCSS': (options.shivCSS !== false),
+
+          /**
+           * Is equal to true if a browser supports creating unknown/HTML5 elements
+           * @memberOf html5
+           * @type boolean
+           */
+          'supportsUnknownElements': supportsUnknownElements,
+
+          /**
+           * A flag to indicate that the document's `createElement` and `createDocumentFragment`
+           * methods should be overwritten.
+           * @memberOf html5
+           * @type Boolean
+           */
+          'shivMethods': (options.shivMethods !== false),
+
+          /**
+           * A string to describe the type of `html5` object ("default" or "default print").
+           * @memberOf html5
+           * @type String
+           */
+          'type': 'default',
+
+          // shivs the document according to the specified `html5` object options
+          'shivDocument': shivDocument,
+
+          //creates a shived element
+          createElement: createElement,
+
+          //creates a shived documentFragment
+          createDocumentFragment: createDocumentFragment
+        };
+
+        /*--------------------------------------------------------------------------*/
+
+        // expose html5
+        window.html5 = html5;
+
+        // shiv the document
+        shivDocument(document);
+
+    }(this, document));
+    /*>>shiv*/
+
+    // Assign private properties to the return object with prefix
+    Modernizr._version      = version;
+
+    // expose these for the plugin API. Look in the source for how to join() them against your input
+    /*>>prefixes*/
+    Modernizr._prefixes     = prefixes;
+    /*>>prefixes*/
+    /*>>domprefixes*/
+    Modernizr._domPrefixes  = domPrefixes;
+    Modernizr._cssomPrefixes  = cssomPrefixes;
+    /*>>domprefixes*/
+
+    /*>>mq*/
+    // Modernizr.mq tests a given media query, live against the current state of the window
+    // A few important notes:
+    //   * If a browser does not support media queries at all (eg. oldIE) the mq() will always return false
+    //   * A max-width or orientation query will be evaluated against the current state, which may change later.
+    //   * You must specify values. Eg. If you are testing support for the min-width media query use:
+    //       Modernizr.mq('(min-width:0)')
+    // usage:
+    // Modernizr.mq('only screen and (max-width:768)')
+    Modernizr.mq            = testMediaQuery;
+    /*>>mq*/
+
+    /*>>hasevent*/
+    // Modernizr.hasEvent() detects support for a given event, with an optional element to test on
+    // Modernizr.hasEvent('gesturestart', elem)
+    Modernizr.hasEvent      = isEventSupported;
+    /*>>hasevent*/
+
+    /*>>testprop*/
+    // Modernizr.testProp() investigates whether a given style property is recognized
+    // Note that the property names must be provided in the camelCase variant.
+    // Modernizr.testProp('pointerEvents')
+    Modernizr.testProp      = function(prop){
+        return testProps([prop]);
+    };
+    /*>>testprop*/
+
+    /*>>testallprops*/
+    // Modernizr.testAllProps() investigates whether a given style property,
+    //   or any of its vendor-prefixed variants, is recognized
+    // Note that the property names must be provided in the camelCase variant.
+    // Modernizr.testAllProps('boxSizing')
+    Modernizr.testAllProps  = testPropsAll;
+    /*>>testallprops*/
+
+
+    /*>>teststyles*/
+    // Modernizr.testStyles() allows you to add custom styles to the document and test an element afterwards
+    // Modernizr.testStyles('#modernizr { position:absolute }', function(elem, rule){ ... })
+    Modernizr.testStyles    = injectElementWithStyles;
+    /*>>teststyles*/
+
+
+    /*>>prefixed*/
+    // Modernizr.prefixed() returns the prefixed or nonprefixed property name variant of your input
+    // Modernizr.prefixed('boxSizing') // 'MozBoxSizing'
+
+    // Properties must be passed as dom-style camelcase, rather than `box-sizing` hypentated style.
+    // Return values will also be the camelCase variant, if you need to translate that to hypenated style use:
+    //
+    //     str.replace(/([A-Z])/g, function(str,m1){ return '-' + m1.toLowerCase(); }).replace(/^ms-/,'-ms-');
+
+    // If you're trying to ascertain which transition end event to bind to, you might do something like...
+    //
+    //     var transEndEventNames = {
+    //       'WebkitTransition' : 'webkitTransitionEnd',
+    //       'MozTransition'    : 'transitionend',
+    //       'OTransition'      : 'oTransitionEnd',
+    //       'msTransition'     : 'MSTransitionEnd',
+    //       'transition'       : 'transitionend'
+    //     },
+    //     transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ];
+
+    Modernizr.prefixed      = function(prop, obj, elem){
+      if(!obj) {
+        return testPropsAll(prop, 'pfx');
+      } else {
+        // Testing DOM property e.g. Modernizr.prefixed('requestAnimationFrame', window) // 'mozRequestAnimationFrame'
+        return testPropsAll(prop, obj, elem);
+      }
+    };
+    /*>>prefixed*/
+
+
+    /*>>cssclasses*/
+    // Remove "no-js" class from <html> element, if it exists:
+    docElement.className = docElement.className.replace(/(^|\s)no-js(\s|$)/, '$1$2') +
+
+                            // Add the new classes to the <html> element.
+                            (enableClasses ? ' js ' + classes.join(' ') : '');
+    /*>>cssclasses*/
+
+    return Modernizr;
+
+})(this, this.document);

+ 33 - 19
studio/classes/BxDolStudioForm.php

@@ -44,9 +44,10 @@ class BxDolStudioForm extends BxBaseFormView
         $this->processTranslationsKey($sAction);
 
         $mixedResult = parent::update($val, $aValsToAdd, $aTrackTextFieldsChanges);
-        if($mixedResult !== false)
-            $this->processTranslations($sAction);
+        if($mixedResult === false) 
+            return $mixedResult;
 
+        $mixedResult += (int)$this->processTranslations($sAction);
         return $mixedResult;
     }
 
@@ -105,36 +106,49 @@ class BxDolStudioForm extends BxBaseFormView
         $oLanguage = BxDolStudioLanguagesUtils::getInstance();
         $aLanguages = $oLanguage->getLanguagesInfo();
 
-        foreach($this->aInputs as $sName => $aInput)
-            if(in_array($aInput['type'], array('text_translatable', 'textarea_translatable'))) {
-                $sKey = $this->getCleanValue($sName);
-                foreach($aLanguages as $aLanguage) {
-                    $sString = BxDolForm::getSubmittedValue($sName . '-' . $aLanguage['name'], $this->aFormAttrs['method']);
-                    if($sString !== false)
-                        $oLanguage->{$aType2Method[$sType]}($sKey, $sString, $aLanguage['id']);
-                }
+        $bResult = false;
+        foreach($this->aInputs as $sName => $aInput) {
+            if(!in_array($aInput['type'], array('text_translatable', 'textarea_translatable')))
+                continue; 
+
+            $sKey = $this->getCleanValue($sName);
+            foreach($aLanguages as $aLanguage) {
+                $sString = BxDolForm::getSubmittedValue($sName . '-' . $aLanguage['name'], $this->aFormAttrs['method']);
+                if($sString === false)
+                    continue;
+
+                if($oLanguage->{$aType2Method[$sType]}($sKey, $sString, $aLanguage['id']))
+                    $bResult = true;
             }
+        }
+
+        return $bResult;
     }
 
     protected function processTranslationsKey($sType = 'insert')
     {
         $sLanguage = BxDolStudioLanguagesUtils::getInstance()->getCurrentLangName(false);
 
-        foreach($this->aInputs as $sName => $aInput)
-            if(in_array($aInput['type'], array('text_translatable', 'textarea_translatable'))) {
-                $sKey = $this->getTranslationsKey($sType, $sName, $this->getCleanValue($sName));
-                BxDolForm::setSubmittedValue($sName, $sKey, $this->aFormAttrs['method']);
-            }
+        foreach($this->aInputs as $sName => $aInput) {
+            if(!in_array($aInput['type'], array('text_translatable', 'textarea_translatable'))) 
+                continue;
+
+            $sKey = $this->getTranslationsKey($sType, $sName, $this->getCleanValue($sName));
+            BxDolForm::setSubmittedValue($sName, $sKey, $this->aFormAttrs['method']);
+        }
     }
 
     protected function processTranslationsValue ()
     {
         $aLanguages = BxDolStudioLanguagesUtils::getInstance()->getLanguages();
 
-        foreach($this->aInputs as $sName => $aInput)
-            if(in_array($aInput['type'], array('text_translatable', 'textarea_translatable')))
-                foreach($aLanguages as $sLangName => $sLangTitle)
-                    $this->aInputs[$sName]['values'][$sLangName] = BxDolForm::getSubmittedValue($sName . '-' . $sLangName, $this->aFormAttrs['method']);
+        foreach($this->aInputs as $sName => $aInput) {
+            if(!in_array($aInput['type'], array('text_translatable', 'textarea_translatable')))
+                continue;
+
+            foreach($aLanguages as $sLangName => $sLangTitle)
+                $this->aInputs[$sName]['values'][$sLangName] = BxDolForm::getSubmittedValue($sName . '-' . $sLangName, $this->aFormAttrs['method']);
+        }
     }
 
     protected function getTranslationsKey($sType, $sName, $sValue)

+ 8 - 2
studio/classes/BxDolStudioLanguagesUtils.php

@@ -365,6 +365,7 @@ class BxDolStudioLanguagesUtils extends BxDolLanguages implements iBxDolSingleto
         $aLanguages = array();
         $iLanguages = $this->oDb->getLanguagesBy(($iLangId == 0 ? array('type' => 'all') : array('type' => 'all_by_id', 'value' => $iLangId)), $aLanguages);
 
+        $bResult = false;
         foreach($aLanguages as $aLanguage) {
             $sString = '';
             if(is_string($mixedString))
@@ -372,11 +373,16 @@ class BxDolStudioLanguagesUtils extends BxDolLanguages implements iBxDolSingleto
             else if(is_array($mixedString))
                 $sString = $mixedString[$aLanguage['id']];
 
-            if($this->oDb->updateString($iKeyId, $aLanguage['id'], $sString) && $bRecompile)
+            if(!$this->oDb->updateString($iKeyId, $aLanguage['id'], $sString))
+                continue;
+
+            if($bRecompile)
                 $this->compileLanguage($aLanguage['id']);
+
+            $bResult = true;
         }
 
-        return true;
+        return $bResult;
     }
 
     function deleteLanguageString($sKey, $iLangId = 0, $bRecompile = true)

+ 11 - 0
template/css/common.css

@@ -75,6 +75,17 @@ blockquote {
     overflow:hidden;
 }
 
+.bx-bullet:before {
+    content: "\00A0\00b7\00A0";
+
+    color: #999999;
+}
+.bx-bullet-narrow:before {
+    content: "\00b7";
+
+    color: #999999;
+}
+
 .sys-icon-a {
     width:1.5rem;
     height:1.5rem;