Bläddra i källkod

UNA Market like on Boonex site: Store.

AntonLV 10 år sedan
förälder
incheckning
8c208d8a98

+ 39 - 21
studio/template/scripts/BxBaseStudioStore.php

@@ -326,8 +326,8 @@ class BxBaseStudioStore extends BxDolStudioStore
 
         //--- Prepare modules.
         foreach($aProducts['modules'] as $aModule) {
-        	$sIcon = BxDolStudioUtils::getModuleIcon($aModule, 'store');
-        	$bIcon = strpos($sIcon, '.') === false;
+        	$sImage = BxDolStudioUtils::getModuleIcon($aModule, 'store');
+        	$bImage = strpos($sImage, '.') !== false;
 
         	$bInstalled = $aModule['installed'];
         	$bQueued = !$bInstalled && $this->oDb->isQueued('action', $aModule['dir']);
@@ -336,13 +336,19 @@ class BxBaseStudioStore extends BxDolStudioStore
             $sModules .= $oTemplate->parseHtmlByName('str_product_v1.html', array(
                 'js_object' => $sJsObject,
              	'name' => $aModule['name'],
-                'bx_if:icon' => array (
-	                'condition' => $bIcon,
-	                'content' => array('icon' => $sIcon),
+                'bx_if:no_image' => array (
+	                'condition' => !$bImage,
+	                'content' => array(
+	                	'note' => $aModule['note'],
+	                	'strecher' => mb_strlen($aModule['note']) > 240 ? '' : str_repeat('      ', round((240 - mb_strlen($aModule['note'])) / 6))
+            		),
 	            ),
                 'bx_if:image' => array (
-	                'condition' => !$bIcon,
-	                'content' => array('icon_url' => $sIcon),
+	                'condition' => $bImage,
+	                'content' => array(
+	                	'image_url' => $sImage,
+	            		'strecher' => str_repeat('      ', 40)
+	            	),
 	            ),
                 'title' => $aModule['title'],
                 'vendor' => $aModule['vendor'],
@@ -365,19 +371,25 @@ class BxBaseStudioStore extends BxDolStudioStore
 
         //--- Prepare updates.
         foreach($aProducts['updates'] as $aUpdate) {
-        	$sIcon = BxDolStudioUtils::getModuleIcon(array('type' => $aUpdate['module_type'], 'name' => $aUpdate['module_name'], 'dir' => $aUpdate['module_dir']), 'store');
-        	$bIcon = strpos($sIcon, '.') === false;
+        	$sImage = BxDolStudioUtils::getModuleIcon(array('type' => $aUpdate['module_type'], 'name' => $aUpdate['module_name'], 'dir' => $aUpdate['module_dir']), 'store');
+        	$bImage = strpos($sImage, '.') !== false;
 
             $sUpdates .= $oTemplate->parseHtmlByName('str_update_v1.html', array(
                 'js_object' => $sJsObject,
             	'name' => $aUpdate['module_name'],
-                'bx_if:icon' => array (
-	                'condition' => $bIcon,
-	                'content' => array('icon' => $sIcon),
+                'bx_if:no_image' => array (
+	                'condition' => !$bImage,
+	                'content' => array(
+	                	'note' => $aUpdate['title'],
+	                	'strecher' => mb_strlen($aUpdate['title']) > 240 ? '' : str_repeat('      ', round((240 - mb_strlen($aUpdate['title'])) / 6))
+            		),
 	            ),
                 'bx_if:image' => array (
-	                'condition' => !$bIcon,
-	                'content' => array('icon_url' => $sIcon),
+	                'condition' => $bImage,
+	                'content' => array(
+	                	'image_url' => $sImage,
+	            		'strecher' => str_repeat('      ', 40)
+	            	),
 	            ),
                 'title' => $aUpdate['title'],
                 'vendor' => $aUpdate['vendor'],
@@ -713,21 +725,27 @@ class BxBaseStudioStore extends BxDolStudioStore
         foreach($mixedItems as $aItem) {
             $bDownloadable = (int)$aItem['is_file'] == 1;
 
-            $sIcon = !empty($aItem['thumbnail']['big']) ? $aItem['thumbnail']['big'] : BxDolStudioUtils::getIconDefault(BX_DOL_MODULE_TYPE_MODULE);
-			$bIcon = strpos($sIcon, '.') === false;
+            $sImage = !empty($aItem['thumbnail']['big']) ? $aItem['thumbnail']['big'] : BxDolStudioUtils::getIconDefault(BX_DOL_MODULE_TYPE_MODULE);
+			$bImage = strpos($sImage, '.') !== false;
 
             $sResult .= $oTemplate->parseHtmlByName('str_update_v2.html', array(
                 'js_object' => $sJsObject,
                 'id' => $aItem['id'],
             	'name' => $aItem['name'],
                 'url' => $aItem['url'],
-            	'bx_if:icon' => array (
-	                'condition' => $bIcon,
-	                'content' => array('icon' => $sIcon),
+            	'bx_if:no_image' => array (
+	                'condition' => !$bImage,
+	                'content' => array(
+	                	'note' => $aItem['description_plain'],
+	                	'strecher' => mb_strlen($aItem['description_plain']) > 240 ? '' : str_repeat('      ', round((240 - mb_strlen($aItem['description_plain'])) / 6))
+            		),
 	            ),
                 'bx_if:image' => array (
-	                'condition' => !$bIcon,
-	                'content' => array('icon_url' => $sIcon),
+	                'condition' => $bImage,
+	                'content' => array(
+						'image_url' => $sImage,
+						'strecher' => str_repeat('      ', 40)
+	            	),
 	            ),
                 'title' => $aItem['title'],
                 'vendor' => $aItem['author_name'],

+ 35 - 33
studio/template/str_product_v1.html

@@ -1,38 +1,40 @@
-<div class="bx-std-product">
-	<div class="bx-std-product-cnt bx-def-widget-size-max-height bx-def-margin-sec">
-	    <div class="bx-stdp-icon bx-def-widget-size bx-def-round-corners-widget">
-	        <a href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', this)">
-				<bx_if:icon>
-					<img class="bx-def-widget-size" src="<bx_icon_url:wi-empty.png />" />
-					<i class="sys-icon __icon__"></i>
-				</bx_if:icon>
-				<bx_if:image><img class="bx-def-widget-size" src="__icon_url__" /></bx_if:image>
-	        </a>
-	    </div>
-	    <div class="bx-stdp-content bx-def-widget-size-min-height bx-def-widget-size-left-indent">
-	        <div class="bx-std-pc-title bx-def-margin-sec-top bx-def-font-large">
-	            <a href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', this)">__title__</a>
+<div class="bx-std-product bx-std-product-gallery bx-def-gal-unit-size" id="bx-std-product-__name__">
+	<div class="bx-std-product-cnt bx-std-product-gallery-cnt bx-def-margin-sec bx-def-border bx-def-round-corners bx-def-box bx-def-color-bg-box">
+        <a href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', this)">
+			<bx_if:no_image>
+				<div class="bx-def-gal-img-column">
+		            <div class="bx-std-product-no-thumb bx-def-gal-div-size bx-def-box bx-def-font-middle bx-def-font-grayed bx-def-padding bx-def-box-sizing">
+		                __note__
+		                <div class="bx-std-product-strecher">__strecher__</div>
+		            </div>
+		        </div>
+			</bx_if:no_image>
+			<bx_if:image>
+				<div class="bx-std-product-thumb bx-def-gal-div-size bx-def-font-middle" style="background-image:url(__image_url__)">
+	                <div class="bx-std-product-strecher">__strecher__</div>
+	            </div>
+			</bx_if:image>
+        </a>
+	    <div class="bx-std-product-content bx-def-padding-thd">
+	        <div class="bx-std-product-title bx-def-font-align-center">
+	            <a class="bx-def-margin-sec-topbottom bx-def-font-color" href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', this)">__title__</a>
 	        </div>
-	        <div class="bx-std-pc-vendor bx-def-margin-thd-top bx-def-font-small">__vendor__ &bull; <span class="bx-std-pc-version">__version__</span></div>
-	        <div class="bx-std-pc-action bx-def-margin-thd-top">
-	        	<div class="bx-std-pc-buttons bx-std-pcb-install bx-def-margin-thd-leftright-neg bx-clearfix" <bx_if:hide_install>style="display:none"</bx_if:hide_install>>
-	        		<button class="bx-btn bx-btn-small bx-def-margin-thd-leftright" type="button" onclick="javascript:__js_object__.install('__dir__', this)">
-	        			<bx_text:_adm_btn_install_submit />
-	        		</button>
-	        		<button class="bx-btn bx-btn-small bx-def-margin-thd-leftright" type="button" onclick="javascript:__js_object__.remove('__dir__', this)">
-	        			<bx_text:_adm_btn_delete_submit />
-	        		</button>
+	        <div class="bx-std-product-info bx-def-margin-thd-top">
+	        	<div class="bx-std-pi-cell bx-std-pic-left">
+	        		<span class="bx-def-font-small">__vendor__ &bull; <span class="bx-std-pc-version">__version__</span></span>
 	        	</div>
-	        	<div class="bx-std-pc-buttons bx-std-pcb-queued bx-def-margin-thd-leftright-neg bx-clearfix" <bx_if:hide_queued>style="display:none"</bx_if:hide_queued>>
-	            	<button class="bx-btn bx-btn-small bx-def-margin-thd-leftright bx-btn-disabled" type="button">
-	            		<bx_text:_adm_btn_queued_submit />
-	            	</button>
-	            </div>
-	            <div class="bx-std-pc-buttons bx-std-pcb-installed bx-def-margin-thd-leftright-neg bx-clearfix" <bx_if:hide_installed>style="display:none"</bx_if:hide_installed>>
-	            	<button class="bx-btn bx-btn-small bx-def-margin-thd-leftright bx-btn-disabled" type="button">
-	            		<bx_text:_adm_btn_installed_submit />
-	            	</button>
-	            </div>
+	        	<div class="bx-std-pi-cell bx-std-pic-right">
+		        	<div class="bx-std-pc-buttons bx-std-pcb-install bx-def-margin-thd-leftright-neg bx-clearfix" <bx_if:hide_install>style="display:none"</bx_if:hide_install>>
+		        		<a class="bx-btn bx-btn-small bx-def-margin-thd-leftright" onclick="javascript:__js_object__.install('__dir__', this)"><bx_text:_adm_btn_install_submit /></a>
+		        		<a class="bx-btn bx-btn-small bx-def-margin-thd-leftright" onclick="javascript:__js_object__.remove('__dir__', this)"><bx_text:_adm_btn_delete_submit /></a>
+		        	</div>
+		        	<div class="bx-std-pc-buttons bx-std-pcb-queued bx-def-margin-thd-leftright-neg bx-clearfix" <bx_if:hide_queued>style="display:none"</bx_if:hide_queued>>
+		            	<a class="bx-btn bx-btn-small bx-def-margin-thd-leftright bx-btn-disabled"><bx_text:_adm_btn_queued_submit /></a>
+		            </div>
+		            <div class="bx-std-pc-buttons bx-std-pcb-installed bx-def-margin-thd-leftright-neg bx-clearfix" <bx_if:hide_installed>style="display:none"</bx_if:hide_installed>>
+		            	<a class="bx-btn bx-btn-small bx-def-margin-thd-leftright bx-btn-disabled"><bx_text:_adm_btn_installed_submit /></a>
+		            </div>
+				</div>
 	        </div>
 	    </div>
 	</div>

+ 5 - 15
studio/template/str_product_v2.html

@@ -31,33 +31,23 @@
 	        	</div>
 		        <div class="bx-std-pi-cell bx-std-pic-right">
 		        	<bx_if:show_download>
-		            	<button class="bx-btn bx-btn-small bx-std-pc-download" type="button" onclick="javascript:__js_object__.getFile(__file_id__, this)">
-		            		<bx_text:_adm_btn_download_submit />
-		            	</button>
+		            	<a class="bx-btn bx-btn-small bx-std-pc-download" onclick="javascript:__js_object__.getFile(__file_id__, this)"><bx_text:_adm_btn_download_submit /></a>
 		            </bx_if:show_download>
 		            <bx_if:show_download_disabled>
-		            	<button class="bx-btn bx-btn-small bx-btn-disabled bx-std-pc-download" type="button" disabled="disabled">
-		            		<bx_text:_adm_btn_download_submit />
-		            	</button>
+		            	<a class="bx-btn bx-btn-small bx-btn-disabled bx-std-pc-download"><bx_text:_adm_btn_download_submit /></a>
 		            </bx_if:show_download_disabled>
 		            <bx_if:show_queued_disabled>
-		            	<button class="bx-btn bx-btn-small bx-btn-disabled bx-std-pc-queued" type="button" disabled="disabled">
-		            		<bx_text:_adm_btn_queued_submit />
-		            	</button>
+		            	<a class="bx-btn bx-btn-small bx-btn-disabled bx-std-pc-queued"><bx_text:_adm_btn_queued_submit /></a>
 		            </bx_if:show_queued_disabled>
 		            <bx_if:show_delete>
-		            	<button class="bx-btn bx-btn-small bx-std-pc-delete" type="button" onclick="javascript:__js_object__.deleteFromCart(__vendor_id__, __id__, this)">
-		            		<bx_text:_adm_btn_delete_submit />
-		            	</button>
+		            	<a class="bx-btn bx-btn-small bx-std-pc-delete" onclick="javascript:__js_object__.deleteFromCart(__vendor_id__, __id__, this)"><bx_text:_adm_btn_delete_submit /></a>
 		            </bx_if:show_delete>
 		            <div class="bx-std-pic-price">
 			        	<bx_if:show_purchase_single>
 							<a class="bx-std-pic-price bx-btn bx-btn-small" onclick="javascript:__js_object__.addToCart(__vendor_id__, __id__, this)">__price_single__</a>
 			            </bx_if:show_purchase_single>
 			            <bx_if:show_checkout_single>
-			           		<a class="bx-std-pic-price bx-btn bx-btn-small bx-std-pc-checkout" onclick="javascript:__js_object__.checkoutCart(__vendor_id__, this)" <bx_if:show_as_hidden>style="display:none;"</bx_if:show_as_hidden>>
-			            		<bx_text:_adm_btn_checkout_submit />
-			            	</a>
+			           		<a class="bx-std-pic-price bx-btn bx-btn-small bx-std-pc-checkout" onclick="javascript:__js_object__.checkoutCart(__vendor_id__, this)" <bx_if:show_as_hidden>style="display:none;"</bx_if:show_as_hidden>><bx_text:_adm_btn_checkout_submit /></a>
 			            </bx_if:show_checkout_single>
 			            <bx_if:show_purchase_recurring>
 			            	<span class="bx-std-pic-price-or bx-def-font-grayed"><bx_text:_adm_str_txt_or /></span>

+ 28 - 20
studio/template/str_update_v1.html

@@ -1,24 +1,32 @@
-<div class="bx-std-product bx-stdp-update">
-	<div class="bx-std-product-cnt bx-def-widget-size-max-height bx-def-margin-sec">
-	    <div class="bx-stdp-icon bx-def-widget-size bx-def-round-corners-widget">
-	        <a href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', this)">
-	            <bx_if:icon>
-					<img class="bx-def-widget-size" src="<bx_icon_url:wi-empty.png />" />
-					<i class="sys-icon __icon__"></i>
-				</bx_if:icon>
-				<bx_if:image><img class="bx-def-widget-size" src="__icon_url__" /></bx_if:image>
-	        </a>
-	    </div>
-	    <div class="bx-stdp-content bx-def-widget-size-min-height bx-def-widget-size-left-indent bx-def-margin-right">
-	        <div class="bx-std-pc-title bx-def-margin-sec-top bx-def-font-large">
-	            <a href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', this)">__title__</a>
-	        </div>
-	        <div class="bx-std-pc-vendor bx-def-margin-thd-top bx-def-font-small">__vendor__ &bull; <span class="bx-std-pc-versions">__versions__</span></div>
-	        <div class="bx-std-pc-action bx-def-margin-thd-top bx-clearfix">
-	        	<button class="bx-btn bx-btn-small" type="button" onclick="javascript:__js_object__.update('__dir__', this)">
-	        		<bx_text:_adm_btn_install_submit />
-	        	</button>
+<div class="bx-std-product bx-stdp-update bx-std-product-gallery bx-def-gal-unit-size" id="bx-std-update-__name__">
+	<div class="bx-std-product-cnt bx-std-product-gallery-cnt bx-def-margin-sec bx-def-border bx-def-round-corners bx-def-box bx-def-color-bg-box">
+        <a href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', this)">
+            <bx_if:no_image>
+				<div class="bx-def-gal-img-column">
+		            <div class="bx-std-product-no-thumb bx-def-gal-div-size bx-def-box bx-def-font-middle bx-def-font-grayed bx-def-padding bx-def-box-sizing">
+		                __note__
+		                <div class="bx-std-product-strecher">__strecher__</div>
+		            </div>
+		        </div>
+			</bx_if:no_image>
+			<bx_if:image>
+				<div class="bx-std-product-thumb bx-def-gal-div-size bx-def-font-middle" style="background-image:url(__image_url__)">
+	                <div class="bx-std-product-strecher">__strecher__</div>
+	            </div>
+			</bx_if:image>
+        </a>
+	    <div class="bx-std-product-content bx-def-padding-thd">
+	        <div class="bx-std-product-title bx-def-font-align-center">
+	            <a class="bx-def-margin-sec-topbottom bx-def-font-color" href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', this)">__title__</a>
 	        </div>
+	        <div class="bx-std-product-info bx-def-margin-thd-top">
+	        	<div class="bx-std-pi-cell bx-std-pic-left">
+	        		<span class="bx-def-font-small">__vendor__ &bull; <span class="bx-std-pc-versions">__versions__</span></span>
+	        	</div>
+		        <div class="bx-std-pi-cell bx-std-pic-right">
+		        	<a class="bx-btn bx-btn-small" onclick="javascript:__js_object__.update('__dir__', this)"><bx_text:_adm_btn_install_submit /></a>
+		        </div>
+			</div>
 	    </div>
 	</div>
 </div>

+ 30 - 20
studio/template/str_update_v2.html

@@ -1,24 +1,34 @@
-<div class="bx-std-product bx-stdp-update" id="bx-std-product-__id__">
-	<div class="bx-std-product-cnt bx-def-widget-size-max-height bx-def-margin-sec">
-	    <div class="bx-stdp-icon bx-def-widget-size bx-def-round-corners-widget">
-	        <a href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', this)">
-	            <bx_if:icon>
-					<img class="bx-def-widget-size" src="<bx_icon_url:wi-empty.png />" />
-					<i class="sys-icon __icon__"></i>
-				</bx_if:icon>
-				<bx_if:image><img class="bx-def-widget-size" src="__icon_url__" /></bx_if:image>
-	        </a>
-	    </div>
-	    <div class="bx-stdp-content bx-def-widget-size-min-height bx-def-widget-size-left-indent bx-def-margin-right">
-	        <div class="bx-std-pc-title bx-def-margin-sec-top bx-def-font-large">
-	            <a href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', this)">__title__</a>
-	        </div>
-	        <div class="bx-std-pc-vendor bx-def-margin-thd-top bx-def-font-small">__vendor__ &bull; <span class="bx-std-pc-versions">__versions__</span></div>
-	        <div class="bx-std-pc-action bx-def-margin-thd-top bx-clearfix">
-	        	<bx_if:show_download>
-	            	<button class="bx-btn bx-btn-small bx-std-pc-download" type="button" onclick="javascript:__on_click__">__caption__</button>
-	            </bx_if:show_download>
+<div class="bx-std-product bx-stdp-update bx-std-product-gallery bx-def-gal-unit-size" id="bx-std-update-__name__">
+	<div class="bx-std-product-cnt bx-std-product-gallery-cnt bx-def-margin-sec bx-def-border bx-def-round-corners bx-def-box bx-def-color-bg-box">
+        <a href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', this)">
+            <bx_if:no_image>
+				<div class="bx-def-gal-img-column">
+		            <div class="bx-std-product-no-thumb bx-def-gal-div-size bx-def-box bx-def-font-middle bx-def-font-grayed bx-def-padding bx-def-box-sizing">
+		                __note__
+		                <div class="bx-std-product-strecher">__strecher__</div>
+		            </div>
+		        </div>
+			</bx_if:no_image>
+			<bx_if:image>
+				<div class="bx-std-product-thumb bx-def-gal-div-size bx-def-font-middle" style="background-image:url(__image_url__)">
+	                <div class="bx-std-product-strecher">__strecher__</div>
+	            </div>
+			</bx_if:image>
+        </a>
+	    <div class="bx-std-product-content bx-def-padding-thd">
+	        <div class="bx-std-product-title bx-def-font-align-center">
+	            <a class="bx-def-margin-sec-topbottom bx-def-font-color" href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', this)">__title__</a>
 	        </div>
+	        <div class="bx-std-product-info bx-def-margin-thd-top">
+	        	<div class="bx-std-pi-cell bx-std-pic-left">
+	        		<span class="bx-def-font-small">__vendor__ &bull; <span class="bx-std-pc-versions">__versions__</span></span>
+	        	</div>
+		        <div class="bx-std-pi-cell bx-std-pic-right">
+		        	<bx_if:show_download>
+		            	<a class="bx-btn bx-btn-small bx-std-pc-download" onclick="javascript:__on_click__">__caption__</a>
+		            </bx_if:show_download>
+		        </div>
+			</div>
 	    </div>
     </div>
 </div>