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

#1 - 1. PX and REM
2. Remove unnecessary code.

AntonLV 13 лет назад
Родитель
Сommit
cc8216e5f3

+ 0 - 33
inc/js/classes/BxDolCmts.js

@@ -350,39 +350,6 @@ BxDolCmts.prototype.toggleManagePopup = function(oLink, iCmtId) {
 	});
 };
 
-BxDolCmts.prototype.togglePlusedByPopup = function(oLink, iCmtId) {
-	var $this = this;
-    var oData = this._getDefaultActions();
-    oData['action'] = 'GetPlusedBy';
-    oData['CmtId'] = iCmtId;
-
-    var oPopup = $(".bx-popup-applied:visible");
-    if(oPopup.length) {
-    	oPopup.dolPopupHide();
-    	return;
-    }
-
-	this._loadingInContent(oLink, true);
-
-	jQuery.post (
-		this._sActionsUrl,
-        oData,
-        function (s) {
-			$this._loadingInContent(oLink, false);
-
-			var oPopup = $(s).hide(); 
-
-	    	$('#' + oPopup.attr('id')).remove();
-	        oPopup.prependTo('body').dolPopup({
-	        	pointer:{
-	    			el:$(oLink)
-	    		}
-	        });
-        }
-	);
-};
-
-
 BxDolCmts.prototype._getCmt = function (e, iCmtId)
 {
     var $this = this;

+ 1 - 1
template/comment.html

@@ -27,7 +27,7 @@
 						__text__<bx_if:show_more><span class="__style_prefix__-body-see-more">... <a class="bx-def-font-small" href="javascript:void(0)" onclick="__js_object__.showMore(this);"><bx_text:_see_more /></a></span><span style="display:none;"> __text_more__</span></bx_if:show_more>
 					</div>
 					<bx_if:show_attached>
-						<div class="__style_prefix__-attached bx-clearfix">
+						<div class="__style_prefix__-attached bx-def-margin-thd-leftright-neg bx-clearfix">
 							<bx_repeat:attached>
 								<div class="__style_prefix__-attached-preview bx-def-round-corners bx-def-margin-thd">
 									<a href="javascript:void(0)" onclick="__js_object__.showImage(this, __id__); return false;" title="<bx_text_attribute:_cmt_view_attached_image />">

+ 0 - 6
template/comment_actions.html

@@ -3,12 +3,6 @@
 		<a class="__style_prefix__-ago" href="__view_link__" rel="nofollow">__ago__</a>
 	</div>
 	__menu_actions__
-	<!--
-	//TODO: Move counters inside menu
-	<div class="__style_prefix__-points-wrp bx-def-margin-left" <bx_if:hide_rate_count>style="display:none;"</bx_if:hide_rate_count>>
-		<a class="__style_prefix__-points" href="javascript:void(0)" onclick="__js_object__.togglePlusedByPopup(this, __id__); return false;" title="<bx_text_attribute:_Plused_by_popup />">__points__</a>
-	</div>
-	 -->
 </div>
 <bx_if:show_menu_manage>
 	<div class="__style_prefix__-comment-manage-link bx-def-font-large">

+ 1 - 1
template/comment_hidden.html

@@ -1,3 +1,3 @@
-<li id="cmt__id__-hidden" class="cmt-replacement">
+<li id="cmt__id__-hidden" class="cmt-replacement bx-def-margin-sec-bottom bx-def-font-small">
 	__title__ <bx_if:show_replies>__replies__. </bx_if:show_replies><a href="javascript:void(0)" onclick="javascript:__js_object__.showReplacement(__id__)"><bx_text:_show_replacement /></a>.
 </li>

+ 0 - 9
template/comment_plused_by.html

@@ -1,9 +0,0 @@
-<div class="__style_prefix__-pb-list bx-def-padding-sec">
-	<div class="__style_prefix__-pb-list-cnt">
-		<div class="__style_prefix__-pb-items">
-			<bx_repeat:list>
-				<div class="__style_prefix__-pb-item bx-def-padding-sec">__user_unit__</div>
-			</bx_repeat:list>
-		</div>
-	</div>
-</div>

+ 19 - 34
template/css/cmts.css

@@ -28,15 +28,15 @@
        display: none;
     }
     li.cmt-replacement {
-       height: 30px;
-       margin-bottom: 10px;
-       position: relative;
-       background-color: #ededed;
-       overflow: hidden;
-       text-indent: 10px;
-       line-height: 30px;
-       font-size: 11px;
-       color: #333333;
+    	position: relative;
+		height: 30px;
+		height: 1.875rem;
+		background-color: #ededed;
+		text-indent: 10px;
+    	text-indent: 0.5rem;
+		line-height: 30px;
+    	line-height: 1.875rem;
+    	overflow: hidden;
     }
     div.cmt-cnt {
 		position: relative;
@@ -56,13 +56,6 @@
     li.cmt-more-root div.cmt-more-cont {
     	position: relative;
     }
-    li.cmt-more-root div.cmt-more-line {
-    	position: absolute;
-    	top: 50%;
-    	width: 100%;
-		border-width: 4px;
-    	borded-bottom: none;
-    }
     li.cmt-more-root .bx-btn {
     	position: relative;
 		float: none;
@@ -78,6 +71,7 @@
     	text-align: center;
     }
     div.cmt-avatar .sys-icon {
+    	font-size: 60px;
 		font-size: 3.75rem;
     }
     div.cmt-info {
@@ -112,9 +106,11 @@
     }
 	div.cmt-cont .bullet {
 		padding: 0px 5px;
+		padding: 0px 0.3rem;
     }
     div.cmt-cont .cmt-post-reply .bx-form-element-wrapper {
 		margin-top: 10px;
+    	margin-top: 0.5rem;
     }
 	div.cmt-cont .cmt-post-reply .bx-form-element-wrapper:first-child {
 		margin-top: 0px;
@@ -122,18 +118,15 @@
     span.cmt-body-see-more a {
 		font-weight: bold;
     }
-    
-    div.cmt-attached {
-		margin-left: -5px;
-    	margin-right: -5px;
-    }
     div.cmt-attached-preview {
 		overflow:hidden;
     }
     div.cmt-attached-preview,
     div.cmt-attached-preview img {
     	width: 100px;
+    	width: 6.25rem;
     	height: 100px;
+    	height: 6.25rem;
     }
     div.cmt-attached-preview {
     	position: relative;
@@ -147,7 +140,9 @@
 	img.cmt-attached-image {
 		position: relative;
 		max-width: 600px;
+		max-width: 37.5rem;
 		max-height: 600px;
+		max-height: 37.5rem;
 		cursor: pointer;
 	}
 	
@@ -177,19 +172,6 @@
 		white-space: nowrap;
     }
 
-    /*--- Comment Plused By ---*/
-    div.cmt-pb-list {}
-    div.cmt-pb-list-cnt {
-    	max-height: 200px;
-    	min-width: 195px;
-		overflow: auto;
-    }
-    div.cmt-pb-list div.bx-persons-unit {
-		float: none;
-    	margin-right: 0px;
-    	margin-bottom: 0px;
-    }
-
     /*--- Add Comment/Reply Styles ---*/
     div.cmt-reply {
 		position: relative;
@@ -201,6 +183,7 @@
     /*--- Add Comment/Reply Form Styles ---*/
     form.cmt-post-reply .bx-form-input-textarea {
 		height: 64px;
+    	height: 4rem;
     }
     form.cmt-post-reply .bx-form-input-submit {
     	text-transform: uppercase;
@@ -225,7 +208,9 @@
     div.cmts-uploader-file-preview,
     div.cmts-uploader-file-preview img {
 		width: 100px;
+    	width: 6.25rem;
     	height: 100px;
+    	height: 6.25rem;
     }
     div.cmts-uploader-file-preview img {
 		background-position: center center;

+ 3 - 0
template/css/default.less

@@ -282,6 +282,9 @@
 .bx-def-margin-thd-leftright {
 	.bx-dm-margin-leftright(0.3rem);
 }
+.bx-def-margin-thd-leftright-neg {
+	.bx-dm-margin-leftright-neg(0.3rem);
+}
 .bx-def-margin-thd-topbottom {
 	.bx-dm-margin-topbottom(0.3rem);
 }

+ 3 - 1
template/css/vote.css

@@ -2,7 +2,9 @@
 div.bx-vote-by-list {}
 div.bx-vote-by-list-cnt {
 	max-height: 200px;
-	min-width: 225px;
+	max-height: 12.5rem;
+	min-width: 220px;
+	min-width: 13.75rem;
 	overflow: auto;
 }
 div.bx-vote-by-list div.bx-persons-unit {

+ 0 - 24
template/scripts/BxBaseCmts.php

@@ -294,30 +294,6 @@ class BxBaseCmts extends BxDolCmts {
         return $this->_getFormEdit($aCmt);
     }
 
-    function getPlusedBy($iCmtId)
-    {
-    	$oTemplate = BxDolTemplate::getInstance();
-
-    	$aTmplUsers = array();
-
-    	$aUserIds = $this->_oQuery->getRatedBy($this->_aSystem['system_id'], $iCmtId);
-    	foreach($aUserIds as $iUserId) {
-    		list($sUserName, $sUserUrl, $sUserIcon, $sUserUnit) = $this->_getAuthorInfo($iUserId);
-			$aTmplUsers[] = array(
-				'style_prefix' => $this->_sStylePrefix,
-				'user_unit' => $sUserUnit
-			);
-    	}
-
-    	$sContent = $oTemplate->parseHtmlByName('comment_plused_by.html', array(
-    		'style_prefix' => $this->_sStylePrefix,
-    		'bx_repeat:list' => $aTmplUsers
-    	));
-
-    	bx_import('BxTemplStudioFunctions');
-        return BxTemplStudioFunctions::getInstance()->transBox($this->_sSystem . '-plused-by', $sContent, true);
-    }
-
     function getImage($iImgId)
     {
     	if(!$this->isAttachImageEnabled())