Преглед изворни кода

#73 - Get rid of 'product_url' and 'update_url' params.

AntonLV пре 12 година
родитељ
комит
d3934635b0
30 измењених фајлова са 30 додато и 133 уклоњено
  1. 0 2
      inc/classes/BxDolModuleQuery.php
  2. 2 4
      install/sql/system.sql
  3. 0 2
      modules/boonex/antispam/install/config.php
  4. 0 2
      modules/boonex/contact/install/config.php
  5. 0 2
      modules/boonex/convos/install/config.php
  6. 0 2
      modules/boonex/developer/install/config.php
  7. 0 1
      modules/boonex/english/data/langs/system.xml
  8. 0 2
      modules/boonex/english/install/config.php
  9. 0 2
      modules/boonex/notes/install/config.php
  10. 0 2
      modules/boonex/notifications/install/config.php
  11. 0 2
      modules/boonex/organizations/install/config.php
  12. 0 2
      modules/boonex/persons/install/config.php
  13. 0 2
      modules/boonex/profiler/install/config.php
  14. 1 2
      modules/boonex/russian/data/langs/system.xml
  15. 0 2
      modules/boonex/russian/install/config.php
  16. 0 2
      modules/boonex/sites/install/config.php
  17. 0 2
      modules/boonex/smtpmailer/install/config.php
  18. 0 2
      modules/boonex/timeline/install/config.php
  19. 0 2
      modules/boonex/uni/install/config.php
  20. 1 3
      studio/classes/BxDolStudioInstallerQuery.php
  21. 1 15
      studio/classes/BxDolStudioInstallerUtils.php
  22. 5 4
      studio/classes/BxDolStudioStore.php
  23. 3 2
      studio/js/store.js
  24. 0 55
      studio/template/modules_list.html
  25. 8 6
      studio/template/scripts/BxBaseStudioStore.php
  26. 2 2
      studio/template/str_product_v1.html
  27. 2 2
      studio/template/str_product_v2.html
  28. 1 1
      studio/template/str_product_view.html
  29. 2 2
      studio/template/str_update_v1.html
  30. 2 2
      studio/template/str_update_v2.html

+ 0 - 2
inc/classes/BxDolModuleQuery.php

@@ -132,8 +132,6 @@ class BxDolModuleQuery extends BxDolDb implements iBxDolSingleton
                 `title`,
                 `vendor`,
                 `version`,
-                `product_url`,
-                `update_url`,
                 `help_url`,
                 `path`,
                 `uri`,

+ 2 - 4
install/sql/system.sql

@@ -737,8 +737,6 @@ CREATE TABLE `sys_modules` (
   `title` varchar(255) NOT NULL default '',
   `vendor` varchar(64) NOT NULL default '',
   `version` varchar(32) NOT NULL default '',
-  `product_url` varchar(128) NOT NULL default '',
-  `update_url` varchar(128) NOT NULL default '',
   `help_url` varchar(128) NOT NULL default '',
   `path` varchar(255) NOT NULL default '',  
   `uri` varchar(32) NOT NULL default '',
@@ -758,8 +756,8 @@ CREATE TABLE `sys_modules` (
   UNIQUE KEY `db_prefix` (`db_prefix`)
 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
 
-INSERT INTO `sys_modules` (`type`, `name`, `title`, `vendor`, `version`, `product_url`, `update_url`, `path`, `uri`, `class_prefix`, `db_prefix`, `lang_category`, `dependencies`, `date`, `enabled`) VALUES
-('module', 'system', 'System', 'BoonEx', '8', '', '', '', 'system', 'Bx', 'sys_', 'System', '', 0, 1);
+INSERT INTO `sys_modules` (`type`, `name`, `title`, `vendor`, `version`, `path`, `uri`, `class_prefix`, `db_prefix`, `lang_category`, `dependencies`, `date`, `enabled`) VALUES
+('module', 'system', 'System', 'BoonEx', '8', '', 'system', 'Bx', 'sys_', 'System', '', 0, 1);
 
 
 CREATE TABLE `sys_modules_file_tracks` (

+ 0 - 2
modules/boonex/antispam/install/config.php

@@ -19,8 +19,6 @@ $aConfig = array(
     'note' => 'Antispam tools',
     'version' => '8.0.0',
     'vendor' => 'BoonEx',
-	'product_url' => 'http://www.boonex.com/products/{uri}',
-    'update_url' => 'http://www.boonex.com/products/{uri}',
 	'help_url' => 'http://feed.boonex.com/?section={module_name}',
 
     'compatible_with' => array(

+ 0 - 2
modules/boonex/contact/install/config.php

@@ -19,8 +19,6 @@ $aConfig = array(
     'note' => 'Contact module.',
     'version' => '8.0.0',
     'vendor' => 'BoonEx',
-	'product_url' => 'http://www.boonex.com/products/{uri}',
-    'update_url' => 'http://www.boonex.com/products/{uri}',
 	'help_url' => 'http://feed.boonex.com/?section={module_name}',
     
 

+ 0 - 2
modules/boonex/convos/install/config.php

@@ -20,8 +20,6 @@ $aConfig = array(
     'note' => 'Conversations module.',
     'version' => '8.0.0',
     'vendor' => 'BoonEx',
-	'product_url' => 'http://www.boonex.com/products/{uri}',
-    'update_url' => 'http://www.boonex.com/products/{uri}',
 	'help_url' => 'http://feed.boonex.com/?section={module_name}',
 
     'compatible_with' => array(

+ 0 - 2
modules/boonex/developer/install/config.php

@@ -19,8 +19,6 @@ $aConfig = array(
     'note' => 'Developer tools...',
     'version' => '8.0.0',
     'vendor' => 'BoonEx',
-	'product_url' => 'http://www.boonex.com/products/{uri}',
-    'update_url' => 'http://www.boonex.com/products/{uri}',
 	'help_url' => 'http://feed.boonex.com/?section={module_name}',
 
     'compatible_with' => array(

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

@@ -1227,7 +1227,6 @@
 	<string name="_adm_txt_modules_install_language"><![CDATA[Install language:]]></string>
 	<string name="_adm_txt_modules_login"><![CDATA[Login]]></string>
 	<string name="_adm_txt_modules_market"><![CDATA[BoonEx Market]]></string>
-	<string name="_adm_txt_modules_market_link"><![CDATA[Market Link]]></string>
 	<string name="_adm_txt_modules_move_sources"><![CDATA[Move source files:]]></string>
 	<string name="_adm_txt_modules_operation_update"><![CDATA[Installation of update <b>{0}</b> from {1} up to {2}]]></string>
 	<string name="_adm_txt_modules_package_module"><![CDATA[Module]]></string>

+ 0 - 2
modules/boonex/english/install/config.php

@@ -19,8 +19,6 @@ $aConfig = array(
     'note' => 'Language file',
     'version' => '8.0.0',
     'vendor' => 'Boonex',
-	'product_url' => 'http://www.boonex.com/products/{uri}',
-    'update_url' => 'http://www.boonex.com/products/{uri}',
 	'help_url' => 'http://feed.boonex.com/?section={module_name}',
 
     'compatible_with' => array(

+ 0 - 2
modules/boonex/notes/install/config.php

@@ -20,8 +20,6 @@ $aConfig = array(
     'note' => 'Basic blogging module.',
     'version' => '8.0.0',
     'vendor' => 'BoonEx',
-	'product_url' => 'http://www.boonex.com/products/{uri}',
-    'update_url' => 'http://www.boonex.com/products/{uri}',
 	'help_url' => 'http://feed.boonex.com/?section={module_name}',
 
     'compatible_with' => array(

+ 0 - 2
modules/boonex/notifications/install/config.php

@@ -19,8 +19,6 @@ $aConfig = array(
     'note' => 'Notifications module.',
     'version' => '8.0.0',
     'vendor' => 'BoonEx',
-	'product_url' => 'http://www.boonex.com/products/{uri}',
-    'update_url' => 'http://www.boonex.com/products/{uri}',
 	'help_url' => 'http://feed.boonex.com/?section={module_name}',
 
     'compatible_with' => array(

+ 0 - 2
modules/boonex/organizations/install/config.php

@@ -20,8 +20,6 @@ $aConfig = array(
     'note' => 'Basic organization profiles functionality.',
     'version' => '8.0.0',
     'vendor' => 'BoonEx',
-	'product_url' => 'http://www.boonex.com/products/{uri}',
-    'update_url' => 'http://www.boonex.com/products/{uri}',
 	'help_url' => 'http://feed.boonex.com/?section={module_name}',
 
     'compatible_with' => array(

+ 0 - 2
modules/boonex/persons/install/config.php

@@ -20,8 +20,6 @@ $aConfig = array(
     'note' => 'Basic person profiles functionality.',
     'version' => '8.0.0',
     'vendor' => 'BoonEx',
-	'product_url' => 'http://www.boonex.com/products/{uri}',
-    'update_url' => 'http://www.boonex.com/products/{uri}',
 	'help_url' => 'http://feed.boonex.com/?section={module_name}',
 
     'compatible_with' => array(

+ 0 - 2
modules/boonex/profiler/install/config.php

@@ -19,8 +19,6 @@ $aConfig = array(
     'note' => 'Measure different site timings.',
     'version' => '8.0.0',
     'vendor' => 'Boonex',
-	'product_url' => 'http://www.boonex.com/products/{uri}',
-    'update_url' => 'http://www.boonex.com/products/{uri}',
 	'help_url' => 'http://feed.boonex.com/?section={module_name}',
 
     'compatible_with' => array(

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

@@ -2443,8 +2443,7 @@ Without doing that you won't be submitted to our database.</p>
 	<string name="_adm_txt_modules_title_update"><![CDATA[<span class="modules-item-title">{0}</span> ({1} - {2})]]></string>
 	<string name="_adm_txt_modules_upload"><![CDATA[Add New Module]]></string>
 	<string name="_adm_txt_modules_market"><![CDATA[BoonEx Market]]></string>
-	<string name="_adm_txt_modules_updates"><![CDATA[Available Updates]]></string>
-	<string name="_adm_txt_modules_market_link"><![CDATA[Market Link]]></string>   
+	<string name="_adm_txt_modules_updates"><![CDATA[Available Updates]]></string>   
 	<string name="_adm_txt_modules_install"><![CDATA[Install]]></string>
 	<string name="_adm_txt_modules_delete"><![CDATA[Delete]]></string>
 	<string name="_adm_txt_modules_enable"><![CDATA[Enable]]></string>

+ 0 - 2
modules/boonex/russian/install/config.php

@@ -19,8 +19,6 @@ $aConfig = array(
     'note' => 'Language file',
     'version' => '8.0.0',
     'vendor' => 'Boonex',
-	'product_url' => 'http://www.boonex.com/products/{uri}',
-    'update_url' => 'http://www.boonex.com/products/{uri}',
 	'help_url' => 'http://feed.boonex.com/?section={module_name}',
 
     'compatible_with' => array(

+ 0 - 2
modules/boonex/sites/install/config.php

@@ -20,8 +20,6 @@ $aConfig = array(
     'note' => 'Sites module.',
     'version' => '8.0.0',
     'vendor' => 'Boonex',
-	'product_url' => 'http://www.boonex.com/products/{uri}',
-    'update_url' => 'http://www.boonex.com/products/{uri}',
 	'help_url' => 'http://feed.boonex.com/?section={module_name}',
 
     'compatible_with' => array(

+ 0 - 2
modules/boonex/smtpmailer/install/config.php

@@ -19,8 +19,6 @@ $aConfig = array(
     'note' => 'Use remote SMTP server for sending mails.',
     'version' => '8.0.0',
     'vendor' => 'BoonEx',
-	'product_url' => 'http://www.boonex.com/products/{uri}',
-    'update_url' => 'http://www.boonex.com/products/{uri}',
 	'help_url' => 'http://feed.boonex.com/?section={module_name}',
 
     'compatible_with' => array(

+ 0 - 2
modules/boonex/timeline/install/config.php

@@ -19,8 +19,6 @@ $aConfig = array(
     'note' => 'Timeline module.',
     'version' => '8.0.0',
     'vendor' => 'BoonEx',
-	'product_url' => 'http://www.boonex.com/products/{uri}',
-    'update_url' => 'http://www.boonex.com/products/{uri}',
 	'help_url' => 'http://feed.boonex.com/?section={module_name}',
 
     'compatible_with' => array(

+ 0 - 2
modules/boonex/uni/install/config.php

@@ -19,8 +19,6 @@ $aConfig = array(
     'note' => 'Design template',
     'version' => '8.0.0',
     'vendor' => 'Boonex',
-	'product_url' => 'http://www.boonex.com/products/{uri}',
-    'update_url' => 'http://www.boonex.com/products/{uri}',
 	'help_url' => 'http://feed.boonex.com/?section={module_name}',
 
     'compatible_with' => array(

+ 1 - 3
studio/classes/BxDolStudioInstallerQuery.php

@@ -43,15 +43,13 @@ class BxDolStudioInstallerQuery extends BxDolModuleQuery
 
     function insertModule(&$aConfig)
     {
-        $sProductUrl = isset($aConfig['product_url']) ? $aConfig['product_url'] : '';
-        $sUpdateUrl = isset($aConfig['update_url']) ? $aConfig['update_url'] : '';
         $sHelpUrl = isset($aConfig['help_url']) ? $aConfig['help_url'] : '';
 
         $sDependencies = '';
         if(isset($aConfig['dependencies']) && is_array($aConfig['dependencies']))
             $sDependencies = implode(',', $aConfig['dependencies']);
 
-        $sQuery = $this->prepare("INSERT IGNORE INTO `sys_modules`(`type`, `name`, `title`, `vendor`, `version`, `product_url`, `update_url`, `help_url`, `path`, `uri`, `class_prefix`, `db_prefix`, `lang_category`, `dependencies`, `date`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, UNIX_TIMESTAMP())", $aConfig['type'], $aConfig['name'], $aConfig['title'], $aConfig['vendor'], $aConfig['version'], $sProductUrl, $sUpdateUrl, $sHelpUrl, $aConfig['home_dir'], $aConfig['home_uri'], $aConfig['class_prefix'], $aConfig['db_prefix'], $aConfig['language_category'], $sDependencies);
+        $sQuery = $this->prepare("INSERT IGNORE INTO `sys_modules`(`type`, `name`, `title`, `vendor`, `version`, `help_url`, `path`, `uri`, `class_prefix`, `db_prefix`, `lang_category`, `dependencies`, `date`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, UNIX_TIMESTAMP())", $aConfig['type'], $aConfig['name'], $aConfig['title'], $aConfig['vendor'], $aConfig['version'], $sHelpUrl, $aConfig['home_dir'], $aConfig['home_uri'], $aConfig['class_prefix'], $aConfig['db_prefix'], $aConfig['language_category'], $sDependencies);
         $iResult = (int)$this->query($sQuery);
 
         return $iResult > 0 ? (int)$this->lastId() : 0;

+ 1 - 15
studio/classes/BxDolStudioInstallerUtils.php

@@ -288,18 +288,6 @@ class BxDolStudioInstallerUtils extends BxDolInstallerUtils implements iBxDolSin
         $bInstalled = !empty($aInstalledPathes) && in_array($sModulePath, $aInstalledPathes);
         $bEnabled = $bInstalled && !empty($aInstalledInfo) && (int)$aInstalledInfo[$sModulePath]['enabled'] == 1;
 
-        $sLinkMarket = '';
-        if(isset($aConfig['product_url'])) {
-            $aTmplVars = array(
-                'vendor' => $aConfig['vendor'],
-                'version' => $aConfig['version'],
-                'uri' => $aConfig['home_uri'],
-                'title' => $aConfig['title']
-            );
-
-            $sLinkMarket = BxDolStudioTemplate::getInstance()->parseHtmlByContent(bx_html_attribute($aConfig['product_url']), $aTmplVars, array('{', '}'));
-        }
-
         return array(
         	'type' => $aConfig['type'],
             'name' => isset($aConfig['name']) ? $aConfig['name'] : $aConfig['home_uri'],
@@ -309,7 +297,6 @@ class BxDolStudioInstallerUtils extends BxDolInstallerUtils implements iBxDolSin
             'uri' => $aConfig['home_uri'],
             'dir' => $aConfig['home_dir'],
             'note' => isset($aConfig['note']) ? bx_process_output($aConfig['note']) : '',
-            'link_market' => $sLinkMarket,
             'installed' => $bInstalled,
             'enabled' => $bInstalled && $bEnabled
         );
@@ -333,8 +320,7 @@ class BxDolStudioInstallerUtils extends BxDolInstallerUtils implements iBxDolSin
             'dir' => $aConfig['home_dir'],
         	'module_type' => $aModule['type'],
             'module_name' => $aModule['name'],
-            'module_dir' => $aModule['dir'],
-            'module_link_market' => $aModule['link_market'],
+            'module_dir' => $aModule['dir']
         );
     }
 

+ 5 - 4
studio/classes/BxDolStudioStore.php

@@ -66,8 +66,9 @@ class BxDolStudioStore extends BxTemplStudioPage
                     break;
 
                 case 'get-product':
-                    $iId = (int)bx_get('str_id');
-                    $aResult = $this->getProduct($iId);
+                    $sModuleName = bx_process_input(bx_get('str_id'));
+                    $bDownloaded = (int)bx_get('str_downloaded');
+                    $aResult = $this->getProduct($sModuleName, $bDownloaded);
                     break;
 
                 case 'get-update':
@@ -294,12 +295,12 @@ class BxDolStudioStore extends BxTemplStudioPage
         );
     }
 
-    protected function loadProduct($iId)
+    protected function loadProduct($sModuleName)
     {
         bx_import('BxDolStudioJson');
         $oJson = BxDolStudioJson::getInstance();
 
-        return $oJson->load(BX_DOL_UNITY_URL_MARKET . 'json_get_product_by_id', array('value' => $iId, 'client' => $this->iClient));
+        return $oJson->load(BX_DOL_UNITY_URL_MARKET . 'json_get_product_by_name', array('value' => $sModuleName, 'client' => $this->iClient));
     }
 
     /*

+ 3 - 2
studio/js/store.js

@@ -178,7 +178,7 @@ BxDolStudioStore.prototype.getFiles = function(iId, sType, oButton) {
 	);
 };
 
-BxDolStudioStore.prototype.info = function(iId, oLink) {
+BxDolStudioStore.prototype.info = function(sModuleName, iDownloaded, oLink) {
 	var oDate = new Date();
 	var $this = this;
 	bx_loading(this.sIdPageContent, true);
@@ -187,7 +187,8 @@ BxDolStudioStore.prototype.info = function(iId, oLink) {
 		this.sActionsUrl,
 		{
 			str_action: 'get-product',
-			str_id: iId,
+			str_id: sModuleName,
+			str_downloaded: iDownloaded,
 			_t:oDate.getTime()
 		},
 		function(oData) {

+ 0 - 55
studio/template/modules_list.html

@@ -1,55 +0,0 @@
-<bx_repeat:items>
-	<div class="bx-std-list-item bx-std-module __class__">
-	    <div class="bx-std-li-brd">
-            <div class="bx-std-li-ctls">
-                <bx_if:not-installed>
-                    <div class="bx-std-li-ctl1 bx-std-li-install">
-	                   <a href="javascript:void(0)" onclick="javascript:__js_object__.install('__path__')">
-	                       <bx_text:_adm_txt_modules_market_install />
-	                   </a>
-                    </div>
-                </bx_if:not-installed>
-                <bx_if:installed-on>
-                    <div class="bx-std-li-ctl1 bx-std-li-enabled">
-                        <a href="javascript:void(0)" onclick="javascript:__js_object__.disable('__path__')">
-                            <img src="<bx_image_url:bx-std-spacer.gif />" alt="<bx_text:_adm_txt_modules_market_disable />"  title="<bx_text:_adm_txt_modules_market_disable />" />
-                        </a>
-                    </div>
-                </bx_if:installed-on>
-                <bx_if:installed-off>
-                    <div class="bx-std-li-ctl1 bx-std-li-disabled">
-                        <a href="javascript:void(0)" onclick="javascript:__js_object__.enable('__path__')">
-                            <img src="<bx_image_url:bx-std-spacer.gif />" alt="<bx_text:_adm_txt_modules_market_enable />"  title="<bx_text:_adm_txt_modules_market_enable />" />
-                        </a>
-                    </div>
-                </bx_if:installed-off>
-                <div class="bx-std-li-div"></div>
-	            <div class="bx-std-li-ctl2">
-                    <bx_if:uninstall>
-						<a href="javascript:void(0)" onclick="javascript:__js_object__.uninstall('__path__')">
-						    <img src="<bx_image_url:bx-std-spacer.gif />" alt="<bx_text:_adm_txt_modules_market_uninstall />"  title="<bx_text:_adm_txt_modules_market_uninstall />" />
-						</a>
-					</bx_if:uninstall>
-					<bx_if:delete>
-                        <a href="javascript:void(0)" onclick="javascript:__js_object__.delete('__path__')" alt="<bx_text:_adm_txt_modules_market_uninstall />">
-                            <img src="<bx_image_url:bx-std-spacer.gif />" alt="<bx_text:_adm_txt_modules_market_delete />"  title="<bx_text:_adm_txt_modules_market_delete />" />
-                        </a>
-					</bx_if:delete>
-	            </div>
-	            <div class="bx-std-li-div"></div>
-            </div>
-	        <div class="bx-std-li-cnt">
-	            <div class="bx-std-li-title">
-                    <bx_if:link>
-                        <a class="bx-def-color-ft-gray-l2" href="__link__">__title__</a>
-                    </bx_if:link>
-                    <bx_if:text>
-                        <span class="bx-def-color-ft-gray-l2" href="__link__">__title__</span>
-                    </bx_if:text>
-	            </div>
-	            <div class="bx-std-li-description bx-def-color-ft-gray-l3">__note__ <a href="__link_market__" target="_blank"><bx_text:_adm_txt_modules_market_link /></a></div>
-	            <div class="bx-std-cb"></div>
-	        </div>
-	    </div>
-	</div>
-</bx_repeat:items>

+ 8 - 6
studio/template/scripts/BxBaseStudioStore.php

@@ -333,7 +333,7 @@ class BxBaseStudioStore extends BxDolStudioStore
 
             $sModules .= $oTemplate->parseHtmlByName('str_product_v1.html', array(
                 'js_object' => $sJsObject,
-                'url' => $aModule['link_market'],
+             	'name' => $aModule['name'],
                 'bx_if:icon' => array (
 	                'condition' => $bIcon,
 	                'content' => array('icon' => $sIcon),
@@ -364,7 +364,7 @@ class BxBaseStudioStore extends BxDolStudioStore
 
             $sUpdates .= $oTemplate->parseHtmlByName('str_update_v1.html', array(
                 'js_object' => $sJsObject,
-                'url' => $aUpdate['module_link_market'],
+            	'name' => $aUpdate['module_name'],
                 'bx_if:icon' => array (
 	                'condition' => $bIcon,
 	                'content' => array('icon' => $sIcon),
@@ -421,13 +421,13 @@ class BxBaseStudioStore extends BxDolStudioStore
         ));
     }
 
-    protected function getProduct($iId)
+    protected function getProduct($sModuleName, $bDownloaded = false)
     {
         $sJsObject = $this->getPageJsObject();
         $oTemplate = BxDolStudioTemplate::getInstance();
 
-        $aProduct = $this->loadProduct($iId);
-        if(!is_array($aProduct))
+        $aProduct = $this->loadProduct($sModuleName);
+        if(empty($aProduct) || !is_array($aProduct))
             return array('code' => 1, 'message' => (!empty($aProduct) ? $aProduct : _t('_adm_str_err_no_product_info')));
 
         $bFree = (int)$aProduct['is_free'] == 1;
@@ -487,7 +487,7 @@ class BxBaseStudioStore extends BxDolStudioStore
                 )
             ),
             'bx_if:show_download' => array(
-                'condition' => ($bFree || $bPurchased) && $bDownloadable,
+                'condition' => ($bFree || $bPurchased) && $bDownloadable && !$bDownloaded,
                 'content' => array(
                     'js_object' => $sJsObject,
                     'file_id' => $aProduct['file_id'],
@@ -568,6 +568,7 @@ class BxBaseStudioStore extends BxDolStudioStore
             $sResult .= $oTemplate->parseHtmlByName('str_product_v2.html', array(
                 'js_object' => $sJsObject,
                 'id' => $aItem['id'],
+            	'name' => $aItem['name'],
                 'url' => $aItem['url'],
                 'bx_if:icon' => array (
 	                'condition' => $bIcon,
@@ -641,6 +642,7 @@ class BxBaseStudioStore extends BxDolStudioStore
             $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,

+ 2 - 2
studio/template/str_product_v1.html

@@ -1,6 +1,6 @@
 <div class="bx-std-product bx-def-widget-size-max-height bx-def-margin-bottom">
     <div class="bx-stdp-icon bx-def-widget-size bx-def-round-corners-widget">
-        <a href="__url__">
+        <a href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', 1, this)">
 			<bx_if:icon>
 				<img class="bx-def-widget-size" src="<bx_icon_url:wi-empty.png />" />
 				<i class="sys-icon __icon__"></i>
@@ -10,7 +10,7 @@
     </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="__url__">__title__</a>
+            <a href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', 1, 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">

+ 2 - 2
studio/template/str_product_v2.html

@@ -1,6 +1,6 @@
 <div class="bx-std-product bx-def-widget-size-max-height bx-def-margin-bottom" id="bx-std-product-__id__">
     <div class="bx-stdp-icon bx-def-widget-size bx-def-round-corners-widget">
-        <a href="javascript:void(0)" onclick="javascript:__js_object__.info(__id__, this)">
+        <a href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', 0, this)">
             <bx_if:icon>
 				<img class="bx-def-widget-size" src="<bx_icon_url:wi-empty.png />" />
 				<i class="sys-icon __icon__"></i>
@@ -10,7 +10,7 @@
     </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(__id__, this)">__title__</a>
+            <a href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', 0, this)">__title__</a>
         </div>
         <bx_if:show_vendor_price>
         	<div class="bx-std-pc-vendor bx-def-margin-thd-top bx-def-font-small">__vendor__ &bull; <span class="bx-std-pc-price">__price__ __discount__</span></div>

+ 1 - 1
studio/template/str_product_view.html

@@ -22,7 +22,7 @@
 	<div class="bx-std-pv-line">
 		<span class="bx-std-pv-cpt bx-def-font-grayed">
 			<bx_text:_adm_str_txt_pv_title />:
-		</span> <a href="__url__">__title__</a>
+		</span> <a href="__url__" target="_blank">__title__</a>
 	</div>
 	<div class="bx-std-pv-line">
 		<span class="bx-std-pv-cpt bx-def-font-grayed">

+ 2 - 2
studio/template/str_update_v1.html

@@ -1,6 +1,6 @@
 <div class="bx-std-product bx-stdp-update bx-def-widget-size-max-height bx-def-margin-bottom">
     <div class="bx-stdp-icon bx-def-widget-size bx-def-round-corners-widget">
-        <a  href="__url__">
+        <a href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', 1, this)">
             <bx_if:icon>
 				<img class="bx-def-widget-size" src="<bx_icon_url:wi-empty.png />" />
 				<i class="sys-icon __icon__"></i>
@@ -10,7 +10,7 @@
     </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="__url__">__title__</a>
+            <a href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', 1, 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">

+ 2 - 2
studio/template/str_update_v2.html

@@ -1,6 +1,6 @@
 <div class="bx-std-product bx-stdp-update bx-def-widget-size-max-height bx-def-margin-bottom" id="bx-std-product-__id__">
     <div class="bx-stdp-icon bx-def-widget-size bx-def-round-corners-widget">
-        <a href="javascript:void(0)" onclick="javascript:__js_object__.info(__id__, this)">
+        <a href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', 1, this)">
             <bx_if:icon>
 				<img class="bx-def-widget-size" src="<bx_icon_url:wi-empty.png />" />
 				<i class="sys-icon __icon__"></i>
@@ -10,7 +10,7 @@
     </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(__id__, this)">__title__</a>
+            <a href="javascript:void(0)" onclick="javascript:__js_object__.info('__name__', 1, 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">