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

#26 - design improvements and some fixes

Alex Trofimov 13 лет назад
Родитель
Сommit
ffb8244c91

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

@@ -140,9 +140,11 @@ class BxNotesModule extends BxDolModule {
         }
 
         //TODO: Rebuild using menus engine when it will be ready for such elements like Vote, Share, etc.
+        $sVotes = '';
         bx_import('BxDolVote');
         $oVotes = BxDolVote::getObjectInstance(BxNotesConfig::$OBJECT_VOTES, $aContentInfo[BxNotesConfig::$FIELD_ID]);
-        $sVotes = $oVotes->getElementBlock(array('show_do_vote_as_button' => true)); 
+        if ($oVotes)
+            $sVotes = $oVotes->getElementBlock(array('show_do_vote_as_button' => true)); 
 
         $sShare = '';
         if(BxDolRequest::serviceExists('bx_timeline', 'get_share_element_block'))
@@ -250,7 +252,7 @@ class BxNotesModule extends BxDolModule {
         $oVotes = BxDolVote::getObjectInstance(BxNotesConfig::$OBJECT_VOTES, $aEvent['object_id']);
 
         $aVotes = array(); 
-		if($oVotes->isEnabled())
+		if ($oVotes && $oVotes->isEnabled())
 			$aVotes = array(
 				'system' => BxNotesConfig::$OBJECT_VOTES,
 				'object_id' => $aContentInfo[BxNotesConfig::$FIELD_ID],

+ 1 - 1
modules/boonex/notes/classes/BxNotesTemplate.php

@@ -61,7 +61,7 @@ class BxNotesTemplate extends BxDolModuleTemplate {
             $sLinkMore = '';
             if (mb_strlen($sSummary) > $iLimitChars) {
                 $sSummary = mb_substr($sSummary, 0, $iLimitChars);
-                $sLinkMore = ' <a title="' . htmlspecialchars_adv(_t('_bx_notes_txt_read_more')) . '" href="' . $sUrl . '">&hellip;</a>';
+                $sLinkMore = ' <a title="' . bx_html_attribute(_t('_bx_notes_txt_read_more', $aData['title'])) . '" href="' . $sUrl . '"><i class="sys-icon ellipsis-horizontal"></i></a>';
             }
             $sSummary = htmlspecialchars_adv($sSummary) . $sLinkMore;
         }

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

@@ -105,7 +105,7 @@
 	<string name="_bx_notes_txt_error_note_delete"><![CDATA[Note delete failed]]></string>
 	<string name="_bx_notes_txt_error_note_is_not_defined"><![CDATA[Note isn't defined]]></string>
     <string name="_bx_notes_txt_status_pending"><![CDATA[This note is pending approval, please wait until it is activated.]]></string>
-    <string name="_bx_notes_txt_read_more"><![CDATA[Read More]]></string>
+    <string name="_bx_notes_txt_read_more"><![CDATA[Continue reading "{0}"]]></string>
     <string name="_bx_notes_txt_sample_single"><![CDATA[note]]></string>
 
 </resources>

+ 6 - 8
modules/boonex/notes/template/css/main.css

@@ -1,16 +1,14 @@
 
-/* search results */
+/* unit */
 
-.bx-notes-wrapper .bx-def-hr:first-child {
-    display:none;
+.bx-notes-unit h2 {
+    margin:0;
 }
 
-.bx-notes-wrapper .bx-def-hr:first-child + .bx-notes-unit h2 {
-    margin-top:0;
+.bx-notes-unit .sys-icon {
+    vertical-align:middle;
 }
 
-/* unit */
-
 .bx-notes-unit-thumb {
     float:right;
 }
@@ -21,4 +19,4 @@
 .bx-notes-entity-share .bx-social-sharing {
 	position: relative;
 	float: left;
-}
+}

+ 2 - 4
modules/boonex/notes/template/unit.html

@@ -1,15 +1,13 @@
 
-<hr class="bx-def-hr" />
-
 <div class="bx-notes-unit bx-def-margin-bottom">
     <h2><a href="__content_url__">__title__</a></h2>
-    <div class="bx-notes-unit-summary">
+    <div class="bx-notes-unit-summary bx-def-margin-sec-top bx-def-margin-sec-bottom">
         <bx_if:thumb>
             <img class="bx-notes-unit-thumb bx-def-round-corners bx-def-margin-sec-left" alt="__title__" src="__thumb_url__" />
         </bx_if:thumb>
         __summary__
     </div>
     <div class="bx-clear"></div>
-    <div class="bx-notes-unit-info bx-def-margin-sec-top"><a href="__author_url__">__author__</a> <span class="bx-notes-unit-info-div bx-def-font-grayed">&#183;</span> <span class="bx-def-font-grayed">__entry_posting_date__</span></div>
+    <div class="bx-notes-unit-info"><a href="__author_url__">__author__</a> <span class="bx-notes-unit-info-div bx-def-font-grayed">&#183;</span> <span class="bx-def-font-grayed">__entry_posting_date__</span></div>
 </div>
 

+ 0 - 2
modules/boonex/notes/template/unit_private.html

@@ -1,6 +1,4 @@
 
-<hr class="bx-def-hr" />
-
 <div class="bx-notes-unit bx-def-margin-bottom">
     <h2><bx_text:_sys_private /></h2>
     <div class="bx-notes-unit-summary">

+ 1 - 1
template/css/_vars.less

@@ -29,7 +29,7 @@
 @bx-font-size-middle: 14px;
 @bx-font-size-large: 18px;
 @bx-font-size-h1: 24px;
-@bx-font-size-h2: 18px;
+@bx-font-size-h2: 20px;
 @bx-font-size-h3: 16px;
 
 @bx-font-color-default: #333;