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

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

AntonLV 8 лет назад
Родитель
Сommit
3bd36d693a

+ 12 - 0
inc/js/jquery.dolPopup.js

@@ -306,6 +306,9 @@
             if (!o)
                 return false;
 
+            if ($el.data('bx-popup-timer'))
+                clearInterval($el.data('bx-popup-timer'));
+                    
             $(window).off('resize.popupWindow');
             $(window).off('resize.popupPointer');
             $(window).off('resize.popupFog');
@@ -727,6 +730,15 @@
 
             	oPosition($el);
 
+                // reposition popup when its height is changed
+                $el.data('bx-popup-height', $el.height());
+                $el.data('bx-popup-timer', setInterval(function () {
+                    if ($el.height() > $el.data('bx-popup-height')) {
+                        oPosition($el);
+                        $el.data('bx-popup-height', $el.height());
+                    }
+                }, 500));
+
                 // attach window resize event
                 $(window).on('resize.popupWindow', function() {
                 	oPosition($el);

+ 5 - 1
modules/boonex/photos/classes/BxPhotosTemplate.php

@@ -25,7 +25,8 @@ class BxPhotosTemplate extends BxBaseModTextTemplate
 
     public function entryText ($aData, $sTemplateName = 'entry-text.html')
     {
-        return $this->entryPhoto($aData);
+        $aTmplVars = BxBaseModGeneralTemplate::getTmplVarsText($aData);
+        return $this->parseHtmlByName($sTemplateName, $aTmplVars);
     }
 
     public function entryPhoto ($aContentInfo, $bAsArray = false)
@@ -164,6 +165,9 @@ class BxPhotosTemplate extends BxBaseModTextTemplate
             unset($aParams['context']);
         }
 
+        if (empty($aData['title']))
+            $aData['title'] = _t('_bx_photos_txt_no_title');
+
         $aResult = parent::getUnit($aData, $aParams);
         $aResult['bx_if:thumb']['content']['content_onclick'] = !empty($sMode) ? $this->_oConfig->getJsObject('main') . ".viewEntry(" . $aData[$CNF['FIELD_ID']] . ", '" . $sMode . "', " . bx_html_attribute(json_encode($aParams)) . "); return false;" : "";
 

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

@@ -224,4 +224,5 @@
     <string name="_bx_photos_txt_n_views"><![CDATA[{0} views]]></string>
     <string name="_bx_photos_txt_previous"><![CDATA[Previous]]></string>
     <string name="_bx_photos_txt_next"><![CDATA[Next]]></string>
+    <string name="_bx_photos_txt_no_title"><![CDATA[No title]]></string>
 </resources>

+ 1 - 1
modules/boonex/photos/install/sql/enable.sql

@@ -45,7 +45,7 @@ INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `lay
 ('bx_photos_view_entry', '_bx_photos_page_title_sys_view_entry', '_bx_photos_page_title_view_entry', 'bx_photos', 12, 2147483647, 1, 'view-photo', '', '', '', '', 0, 1, 0, 'BxPhotosPageEntry', 'modules/boonex/photos/classes/BxPhotosPageEntry.php');
 
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
-('bx_photos_view_entry', 1, 'bx_photos', '', '_bx_photos_page_block_title_entry_photo', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_photos";s:6:"method";s:18:"entity_photo_block";}', 0, 0, 0, 0),
+('bx_photos_view_entry', 1, 'bx_photos', '', '_bx_photos_page_block_title_entry_photo', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_photos";s:6:"method";s:18:"entity_photo_block";}', 0, 0, 1, 0),
 ('bx_photos_view_entry', 2, 'bx_photos', '', '_bx_photos_page_block_title_entry_text', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_photos";s:6:"method";s:17:"entity_text_block";}', 0, 0, 1, 1),
 ('bx_photos_view_entry', 2, 'bx_photos', '', '_bx_photos_page_block_title_entry_author', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_photos";s:6:"method";s:13:"entity_author";}', 0, 0, 1, 3),
 ('bx_photos_view_entry', 2, 'bx_photos', '', '_bx_photos_page_block_title_entry_rating', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_photos";s:6:"method";s:13:"entity_rating";}', 0, 0, 0, 0),

+ 6 - 1
modules/boonex/photos/template/entry-photo.html

@@ -1 +1,6 @@
-<bx_include_base:entry-text.html />
+<div class="bx-photos-entity-photo bx-def-font-align-center">
+    <img class="bx-def-border-radius-block" src="__entry_photo__" title="__entry_title_attr__" />
+</div>
+<div class="bx-base-text-entity-content bx-def-constraint-list bx-def-constraint-pre bx-def-constraint-object bx-def-constraint-iframe bx-def-constraint-img bx-def-margin-top">
+    <h1>__entry_title__</h1>
+</div>

+ 1 - 7
modules/boonex/photos/template/entry-text.html

@@ -1,7 +1 @@
-<div class="bx-photos-entity-photo bx-def-font-align-center">
-    <img class="bx-def-border-radius-block" src="__entry_photo__" title="__entry_title_attr__" />
-</div>
-<div class="bx-base-text-entity-content bx-def-constraint-list bx-def-constraint-pre bx-def-constraint-object bx-def-constraint-iframe bx-def-constraint-img bx-def-margin-top">
-    <h1>__entry_title__</h1>
-    __entry_text__
-</div>
+__entry_text__

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

@@ -226,4 +226,5 @@
     <string name="_bx_photos_txt_n_views"><![CDATA[{0} просмотров]]></string>
     <string name="_bx_photos_txt_previous"><![CDATA[Предыдущее фото]]></string>
     <string name="_bx_photos_txt_next"><![CDATA[Следующее фото]]></string>
+    <string name="_bx_photos_txt_no_title"><![CDATA[Без заголовка]]></string>
 </resources>

+ 5 - 2
studio/template/page_2.html

@@ -1,5 +1,5 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
+<!DOCTYPE html>
+<html lang="__lang__">
 <head>
     <bx_injection:injection_head_begin />
     
@@ -12,6 +12,9 @@
 
     <bx_include_js_system />
     <bx_include_js />
+
+    <bx_include_auto:_header_js.html />
+
     __extra_js__
 
     __dol_images__

+ 2 - 2
template/page_2.html

@@ -1,5 +1,5 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
+<!DOCTYPE html>
+<html lang="__lang__">
 	<head>
         <bx_injection:injection_head_begin />