You can subscribe to this list here.
| 2011 |
Jan
|
Feb
|
Mar
(4) |
Apr
(57) |
May
(31) |
Jun
(21) |
Jul
(11) |
Aug
(23) |
Sep
(22) |
Oct
(36) |
Nov
(62) |
Dec
(85) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2012 |
Jan
(24) |
Feb
(24) |
Mar
(65) |
Apr
(232) |
May
(118) |
Jun
(22) |
Jul
(54) |
Aug
(57) |
Sep
(14) |
Oct
(27) |
Nov
(16) |
Dec
(19) |
| 2013 |
Jan
(16) |
Feb
(12) |
Mar
(3) |
Apr
(17) |
May
(2) |
Jun
(30) |
Jul
(33) |
Aug
(19) |
Sep
(35) |
Oct
(58) |
Nov
(27) |
Dec
(64) |
| 2014 |
Jan
(102) |
Feb
(80) |
Mar
(15) |
Apr
(4) |
May
(3) |
Jun
(3) |
Jul
(5) |
Aug
(11) |
Sep
(15) |
Oct
|
Nov
(3) |
Dec
(5) |
| 2015 |
Jan
(5) |
Feb
(4) |
Mar
(2) |
Apr
(11) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
(10) |
Dec
|
| 2016 |
Jan
(3) |
Feb
(2) |
Mar
(18) |
Apr
(13) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
|
From: <os...@us...> - 2013-10-25 12:51:16
|
Revision: 4904
http://sourceforge.net/p/oscss/svn/4904
Author: oscim
Date: 2013-10-25 12:51:13 +0000 (Fri, 25 Oct 2013)
Log Message:
-----------
Fix
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/pages/products.php
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2013-10-24 07:35:24 UTC (rev 4903)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2013-10-25 12:51:13 UTC (rev 4904)
@@ -99,8 +99,12 @@
self::$action=(isset($_REQUEST['action'])? $_REQUEST['action'] : 'listing' );
self::$cPath=(isset($_GET['cPath'])? (int)$_GET['cPath'] : 0);
self::$Vtype=(isset($_GET['Vtype'])? (int)$_GET['Vtype'] : '');
- self::$Id=(isset($_REQUEST['pID'])? (int)$_REQUEST['pID'] : 0 );
+ if( isset($_REQUEST['cID']) )
+ self::$Id=(isset($_REQUEST['cID'])? (int)$_REQUEST['cID'] : 0 );
+ else
+ self::$Id=(isset($_REQUEST['pID'])? (int)$_REQUEST['pID'] : 0 ); // obsolete
+
$DB=Database::getInstance();
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-24 07:35:28
|
Revision: 4903
http://sourceforge.net/p/oscss/svn/4903
Author: oscim
Date: 2013-10-24 07:35:24 +0000 (Thu, 24 Oct 2013)
Log Message:
-----------
Upgrade reviews
Modified Paths:
--------------
trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/customers/reviews/display_edit.noedit.gab
trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/account/reviews.txt
trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/reviews.txt
trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/account/reviews.php
trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/pages/reviews.php
trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/products/reviews.php
trunk/extensions/REVIEWS_stable/catalog/common/classes/common_reviews.php
trunk/extensions/REVIEWS_stable/install.xml
Added Paths:
-----------
trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/products/
trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/products/reviews/
trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/products/reviews/display_edit.noedit.gab
trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/reviews/filter.clause.gab
trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/products/reviews.txt
Removed Paths:
-------------
trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/products/reviews.php
Modified: trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/customers/reviews/display_edit.noedit.gab
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/customers/reviews/display_edit.noedit.gab 2013-10-23 13:06:13 UTC (rev 4902)
+++ trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/customers/reviews/display_edit.noedit.gab 2013-10-24 07:35:24 UTC (rev 4903)
@@ -15,15 +15,19 @@
<table class="dataTableBase Sort">
<thead>
<tr>
- <th><?php echo __('@reviews table heading rating') ?></th>
- <th><?php echo __('@reviews table heading date') ?></th>
- <th><?php echo __('@reviews table heading text') ?></th>
+ <th><?php echo __('@reviews table heading id') ?></th>
+ <th><?php echo __('@reviews table heading data') ?></th>
+ <th><?php echo __('@reviews table heading rating') ?></th>
+ <th><?php echo __('@reviews table heading date') ?></th>
+ <th><?php echo __('@reviews table heading text') ?></th>
</tr>
</thead>
<tbody>
- <?php foreach(reviews::$cInfo as $row): $row = new objectInfo($row);?>
+ <?php foreach(reviews::$cInfo as $row): $row = new objectInfo($row); ?>
<tr>
- <td class="tleft"><?php echo $row->reviews_rating ?></td>
+ <td class="tcenter"><a class="link" href="<?php echo tep_href_link(FILENAME_REVIEWS, 'cID='.$row->reviews_id) ?>" ><?php echo $row->reviews_id ?></a></td>
+ <td class="tcenter"><a class="link" href="<?php echo tep_href_link(constant('FILENAME_'.strtoupper($row->datatype).'S'), 'action=noedit&cID='.$row->data_id) ?>" ><?php echo $row->datatype ?></a></td>
+ <td class="tcenter"><?php echo $row->reviews_rating ?></td>
<td class="tcenter"><?php echo tep_date_short($row->date_added) ?></td>
<td class="tleft"><?php echo $row->reviews_text ?></td>
</tr>
Added: trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/products/reviews/display_edit.noedit.gab
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/products/reviews/display_edit.noedit.gab (rev 0)
+++ trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/products/reviews/display_edit.noedit.gab 2013-10-24 07:35:24 UTC (rev 4903)
@@ -0,0 +1,36 @@
+<?php
+/**
+ @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 01/11/11, 20:00
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+
+<div class="main-customers history noedit">
+
+ <table class="dataTableBase Sort">
+ <thead>
+ <tr>
+ <th><?php echo __('@reviews table heading id') ?></th>
+ <th><?php echo __('@reviews table heading rating') ?></th>
+ <th><?php echo __('@reviews table heading date') ?></th>
+ <th><?php echo __('@reviews table heading text') ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach(reviews::$cInfo as $row): $row = new objectInfo($row); ?>
+ <tr>
+ <td class="tcenter"><a class="link" href="<?php echo tep_href_link(FILENAME_REVIEWS, 'cID='.$row->reviews_id) ?>" ><?php echo $row->reviews_id ?></a></td>
+ <td class="tcenter"><?php echo $row->reviews_rating ?></td>
+ <td class="tcenter"><?php echo tep_date_short($row->date_added) ?></td>
+ <td class="tleft"><?php echo $row->comment ?></td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+
+</div>
\ No newline at end of file
Added: trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/reviews/filter.clause.gab
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/reviews/filter.clause.gab (rev 0)
+++ trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/reviews/filter.clause.gab 2013-10-24 07:35:24 UTC (rev 4903)
@@ -0,0 +1,12 @@
+<?php
+/**
+ @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 22/04/2012 ,22:50:08
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+
Modified: trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/account/reviews.txt
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/account/reviews.txt 2013-10-23 13:06:13 UTC (rev 4902)
+++ trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/account/reviews.txt 2013-10-24 07:35:24 UTC (rev 4903)
@@ -1,20 +1,18 @@
<?php
-/*
- $Id: page.ckeckup_sys.php,v 1.3 27.08.2009 22:13:40 oscim osCSSTeam Exp $
-// kate: replace-trailing-space-save true; space-indent on; indent-width 2; mixedindent off; indent-mode cstyle; word-wrap-marker-color #41C2A4
-+-----------------------------------------------------------------------+
-| osCSS Open Source E-commerce |
-+-----------------------------------------------------------------------+
- ENCODE UTF-8
- */
-$lang['MODULE_ACA_REVIEWS_TEXT_TITLE'] = 'Autoriser Les commentaires' ;
-$lang['MODULE_ACA_REVIEWS_TEXT_DESCRIPTION'] = 'Permet à chaque client de commenter les produits ' ;
+/**
+ @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.2
+ @date 23/10/2013 ,13:36:56
+ @author genrated by GenerCode
+ @encode UTF-8
+*/
-$lang['MODULE_ACA_D_V_M_TITLE'] = 'Commentaire(s) membre(s)' ;
-$lang['MODULE_ACA_D_V_M_LINK'] = 'Voir' ;
-$lang['TEXT_PRODUCTS_COMMENT'] = 'nombre(s) de commentaire(s) :' ;
-$lang['MODULE_ACA_D_V_M_DELETE_CONFIRM'] = ' Supprimer les commentaire(s) liée' ;
+$lang['@reviews tab history'] = 'Commentaire(s)' ;
+$lang['@reviews table heading id'] = 'Id' ;
+$lang['@reviews table heading data'] = 'Données' ;
$lang['@reviews table heading rating'] = 'Vote' ;
$lang['@reviews table heading date'] = 'Date' ;
$lang['@reviews table heading text'] = 'Commentaire' ;
Modified: trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/reviews.txt
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/reviews.txt 2013-10-23 13:06:13 UTC (rev 4902)
+++ trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/reviews.txt 2013-10-24 07:35:24 UTC (rev 4903)
@@ -3,31 +3,30 @@
@licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 10/04/2012 ,13:36:56
+ @version 2.1.2
+ @date 23/10/2013 ,13:36:56
@author genrated by GenerCode
@encode UTF-8
- @class rapport
*/
$lang['heading title reviews'] = "Commentaires";
/* listing */
- $lang['@reviews table heading id'] = "Id";
- $lang['@reviews table heading text'] = "text";
- $lang['@reviews table heading customers name'] = "Membre";
- $lang['@reviews table heading rating'] = "vote";
- $lang['@reviews table heading read'] = "Vu";
- $lang['@reviews table heading pseudo'] = "Pseudo";
- $lang['@reviews table heading email'] = "email";
- $lang['@reviews table heading parent'] = "parent";
- $lang['@reviews table heading date_added'] = "Ajouté";
- $lang['@reviews table heading last modified'] = "Modifié";
- $lang['@reviews table heading status'] = "Etat";
- $lang['@reviews table heading action'] = "Action";
- $lang['@reviews table heading language'] = "Langue";
- $lang['@reviews table heading datatype'] = "Donnée";
- $lang['@reviews table heading data_id'] = "Donnée id";
+ $lang['@reviews table heading id'] = "Id";
+ $lang['@reviews table heading text'] = "text";
+ $lang['@reviews table heading customers name'] = "Membre";
+ $lang['@reviews table heading rating'] = "vote";
+ $lang['@reviews table heading read'] = "Vu";
+ $lang['@reviews table heading pseudo'] = "Pseudo";
+ $lang['@reviews table heading email'] = "email";
+ $lang['@reviews table heading parent'] = "parent";
+ $lang['@reviews table heading date_added'] = "Ajouté";
+ $lang['@reviews table heading last modified'] = "Modifié";
+ $lang['@reviews table heading status'] = "Etat";
+ $lang['@reviews table heading action'] = "Action";
+ $lang['@reviews table heading language'] = "Langue";
+ $lang['@reviews table heading datatype'] = "Donnée";
+ $lang['@reviews table heading data_id'] = "Donnée id";
Deleted: trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/products/reviews.php
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/products/reviews.php 2013-10-23 13:06:13 UTC (rev 4902)
+++ trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/products/reviews.php 2013-10-24 07:35:24 UTC (rev 4903)
@@ -1,24 +0,0 @@
-<?php
-/*
- $Id: page.ckeckup_sys.php,v 1.3 27.08.2009 22:13:40 oscim osCSSTeam Exp $
-// kate: replace-trailing-space-save true; space-indent on; indent-width 2; mixedindent off; indent-mode cstyle; word-wrap-marker-color #41C2A4
-+-----------------------------------------------------------------------+
-| osCSS Open Source E-commerce |
-+-----------------------------------------------------------------------+
- ENCODE UTF-8
- */
-define('MODULE_ACA_REVIEWS_TEXT_TITLE', 'Autoriser Les commentaires');
-define('MODULE_ACA_REVIEWS_TEXT_DESCRIPTION', 'Permet à chaque client de commenter les produits ');
-
-define('MODULE_ACA_REVIEWS_TEXT_MAX_DISPLAY_REVIEWS_TITLE', '[listing] max des commentaire');
-define('MODULE_ACA_REVIEWS_TEXT_MAX_DISPLAY_DESCRIPTION', 'Le nombre de commentaire par page au maxi ');
-define('MODULE_ACA_REVIEWS_TEXT_MIN_DISPLAY_REVIEWS_TITLE', '[listing] min des commentaire');
-define('MODULE_ACA_REVIEWS_TEXT_MIN_DISPLAY_DESCRIPTION', 'Le nombre de commentaire par page au min ');
-define('MODULE_ACA_REVIEWS_TEXT_REVIEW_TEXT_MIN_LENGTH_TITLE', 'min de caratéres dans un commentaire');
-define('MODULE_ACA_REVIEWS_TEXT_REVIEW_TEXT_MIN_LENGTH_DESCRIPTION', 'Le nombre de caratéres par commentaire au min ');
-
-define('MODULE_ACA_D_V_M_TITLE', 'Commentaire(s) membre(s)');
-define('MODULE_ACA_D_V_M_LINK', 'Voir');
-define('TEXT_PRODUCTS_AVERAGE_RATING', 'Ratio moyen :');
-define('MODULE_ACA_D_V_M_DELETE_CONFIRM', ' Supprimer les commentaire(s) liée');
-?>
\ No newline at end of file
Added: trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/products/reviews.txt
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/products/reviews.txt (rev 0)
+++ trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/products/reviews.txt 2013-10-24 07:35:24 UTC (rev 4903)
@@ -0,0 +1,21 @@
+<?php
+/**
+ @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.2
+ @date 23/10/2013 ,13:36:56
+ @author genrated by GenerCode
+ @encode UTF-8
+*/
+$lang['@reviews module title'] = 'Commentaire(s)' ;
+$lang['@reviews module description'] = 'Autoriser Les commentaires' ;
+
+$lang['@reviews tab history'] = 'Commentaire(s)' ;
+$lang['@reviews table heading id'] = 'Id' ;
+$lang['@reviews table heading data'] = 'Données' ;
+$lang['@reviews table heading rating'] = 'Vote' ;
+$lang['@reviews table heading date'] = 'Date' ;
+$lang['@reviews table heading text'] = 'Commentaire' ;
+
+?>
\ No newline at end of file
Modified: trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/account/reviews.php
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/account/reviews.php 2013-10-23 13:06:13 UTC (rev 4902)
+++ trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/account/reviews.php 2013-10-24 07:35:24 UTC (rev 4903)
@@ -1,23 +1,16 @@
<?php
-/*
- $Id: page.ckeckup_sys.php,v 1.3 27.08.2009 22:13:40 oscim osCSSTeam Exp $
-// kate: replace-trailing-space-save true; space-indent on; indent-width 2; mixedindent off; indent-mode cstyle; word-wrap-marker-color #41C2A4
-+-----------------------------------------------------------------------+
-| osCSS Open Source E-commerce |
-+-----------------------------------------------------------------------+
- ENCODE UTF-8
- */
-
-// error_reporting(E_ALL);
/**
- @package oscss-major
- @author oscim <mail a...@os... /><web http://www.oscim.fr />
+ @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.2
+ @date 18/09/13, 23:47
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class reviews
+ @package reviews
+*/
- Class de gestion de reviews d'un produits.
-
- Prend en charge La gestion et modération des comemntaire clients, et de la note associé.
- Moduel jumeaux avec public/reviews.php
-*/
class reviews
implements InterfaceModule{
@@ -74,75 +67,19 @@
$this->common->load_db_values_for_cID($cID);
-// $this->reviews_rating=$this->common->reviews_rating ;
-// $this->reviews=$this->common->reviews;
-
return $this->common->reviews;
}
- /**
- Suppression des db liée au products_id
- @param
- @a int PID le product_ID
- @a int $_POST['report_invesst_prod'] : value on ; pour autoriser suppression des elements
- */
-// function delete_product ($pID){
-// if (!isset($_POST['report_invesst_prod']) || $_POST['report_invesst_prod'] !='on') return false;
-// if (!isset($this->reviews) || !is_array($this->reviews))$this->load_db_values($pID);
-//
-// foreach ($this->reviews as $reviews) {
-// tep_db_query("delete from " . TABLE_REVIEWS . " where reviews_id = '" . (int)$reviews['reviews_id'] . "'");
-// tep_db_query("delete from " . TABLE_CONTENT_DESCRIPTION . " where reviews_id = '" . (int)$content_id['reviews_id'] . "'");
-// }
-//
-// }
- /**
- Traitement affichage reduit colonne de droite
- @param
- @a array contents
- @a int PID le product_ID
- */
-// public function display_right_column($contents,$pID){
-// if (!isset($this->reviews) || !is_array($this->reviews))$this->load_db_values($pID);
-// $contents[] = array('text' => '<h4>'.MODULE_ACA_D_V_M_TITLE.' (<a href="'.tep_href_link(FILENAME_REVIEWS,'pID='.$pID.'&origin='.tep_href_link(FILENAME_PRODUCTS,tep_get_all_get_params()).'').'">'.MODULE_ACA_D_V_M_LINK.'</a>)</h4> ');
-// $contents[] = array( 'text' =>'<li style="padding-left:15px">'.TEXT_PRODUCTS_COMMENT .count($this->reviews).'</li>');
-// return $contents;
-// }
- /**
- Block confirmation de suppression
- Colonne droite
- */
-// public function display_right_delete_confirm ($contents, $products_id) {
-// $contents[] = array('text' => '<h4>'.MODULE_ACA_D_V_M_TITLE.'');
-// $contents[] = array( 'text' =>'<li class="block_input">'.tep_draw_checkbox_field('report_invesst_prod',"report_invesst_prod", 'on', true) .' '.MODULE_ACA_D_V_M_DELETE_CONFIRM.' </li>');
-// return $contents;
-// }
-
-//=====================================
-// Functions sepcific in modules
-//=====================================
-
public function display_edit(&$contents,$id) {
global $languages_id;
-
-// var_dump(__file__);
-// self::$cID =$id;
-//
-// $contents []= array(
-// 'title'=> __('extra fields'),
-// 'text'=> tep_get_include_contents(__CLASS__.'.form')
-// );
-
switch(self::$action){
case 'noedit':
self::$cInfo=$this->load_db_values($id);
-// var_dump(self::$cInfo);
-// exit;
$contents []= array(
'title'=> __('@reviews tab history'),
'text'=> tep_get_include_contents('customers/'.__CLASS__.'/'.__FUNCTION__.'.'.self::$action)
@@ -162,50 +99,6 @@
}
- /**
- Detail des investisseur d'un produits
- Apercu general
- @param
- @a object new box
- @a int le product_ID
- */
-// public function display_view_list($box,$pID){
-// $this->load_db_values ($pID);
-//
-// $customers_query_raw = "select * from " . TABLE_PRODUCTS_REVIEWS . " pn where pn.products_id = '" . $pID . "' order by date_added DESC";
-//
-// $customers_query = tep_db_query($customers_query_raw);
-// while ($customers = tep_db_fetch_array($customers_query))
-// $cust[$customers['customers_id']]=$customers;
-//
-//
-// $montant_tot=$csut=0;
-//
-// $row=0;
-// $box->add_pile($row,array('separator'=>array(0=>'',1=>'h3',2=>'span') ) );
-// $box->add_pile($row,array('text'=>'Client notifié de cet article' ) );
-// $row=1;
-// $box->add_pile($row,array('separator'=>array(0=>'thead',1=>'tr',2=>'th') ) );
-// $box->add_pile($row,array('text'=>'client n°' ) );
-// $box->add_pile($row,array('text'=>'client' ) );
-// $box->add_pile($row,array('text'=>'incsrit le ' ) );
-// $box->add_pile($row,array('text'=>'nbr de notification' ) );
-//
-// foreach($this->fans as $k) {
-// $row++;
-//
-// $box->add_pile($row,array('separator'=>array(0=>'tbody',1=>'tr',2=>'td'), 'class'=>'view parent dataTableRow ') );
-// $box->add_pile($row,array('text'=>''.$k['customers_id'] ) );
-// $box->add_pile($row,array('text'=>tep_customers_row_action($k['customers_id'], array('origin'=>tep_href_link(FILENAME_PRODUCTS,'pID='.$pID))) ) );
-// $box->add_pile($row,array('text'=>$cust[$k['customers_id']]['date_added'] ) );
-// $box->add_pile($row,array('text'=>$cust[$k['customers_id']]['count']) );
-// }
-//
-// return $box;
-// }
-
-
-
//=====================================
// Functions for modules administration
//=====================================
Modified: trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/pages/reviews.php
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/pages/reviews.php 2013-10-23 13:06:13 UTC (rev 4902)
+++ trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/pages/reviews.php 2013-10-24 07:35:24 UTC (rev 4903)
@@ -3,23 +3,23 @@
@licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 11/09/11, 10:45
+ @version 2.1.2
+ @date 18/09/13, 23:47
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class reviews
+ @package reviews
@brief This class manipulate devise (add/up/delete)
*/
-error_reporting(E_ALL);
class reviews
extends ModTwo /// new abstract class for nextgen module
implements
- InterfaceModule,
- ExtModConfig,
- InterfacedTJsonS,
- InterfacedInnerHtml
- {
+ InterfaceModule,
+ ExtModConfig,
+ InterfacedTJsonS,
+ InterfacedInnerHtml
+ {
const FILENAME =FILENAME_REVIEWS;
@@ -41,19 +41,19 @@
class constructor
*/
public function __construct() {
- self::GetConf();
+ self::GetConf();
}
/**
@brief Load , adjust and define var environement exe for module
- Is use in module and class abstract for init value config this module
+ Is use in module and class abstract for init value config this module
*/
public static function GetConf(){
global $languages_id;
self::$code=__CLASS__;
-// self::$datatype='content';
+
self::$action=(isset($_REQUEST['action'])? $_REQUEST['action'] : 'listing' );
self::$Id=(isset($_REQUEST['cID'])? (int)$_REQUEST['cID'] : 0 );
@@ -62,270 +62,270 @@
*/
if(!defined('JSONSTATMENT')){
- //! active datatable in ajax, precise les GET necessaire
- if(!defined('JSONSTATMENT'))define('JSONSTATMENT', 'ModTwo=true&mod=page&type='.self::$code .(isset($_GET['cID'])?'&cID='.$_GET['cID'] : '' ) );
- //! detail item in ajax
- if(!defined('AJAXSTATMENTDETAIL'))define('AJAXSTATMENTDETAIL', 'mod=page&type='.self::$code);
+ //! active datatable in ajax, precise les GET necessaire
+ if(!defined('JSONSTATMENT'))define('JSONSTATMENT', 'ModTwo=true&mod=page&type='.self::$code .(isset($_GET['cID'])?'&cID='.$_GET['cID'] : '' ) );
+ //! detail item in ajax
+ if(!defined('AJAXSTATMENTDETAIL'))define('AJAXSTATMENTDETAIL', 'mod=page&type='.self::$code);
- // instancie MLinkTo
- MLinkTo::getInstance(self::$datatype);
+ // instancie MLinkTo
+ MLinkTo::getInstance(self::$datatype);
- // Use factory class aca
- self::$modules=new AcaFactory(self::$datatype/*,'MODULE_CONTENT_INSTALLED_BO'*/);
- self::$modules->set_image_handler();
+ // Use factory class aca
+ self::$modules=new AcaFactory(self::$datatype/*,'MODULE_CONTENT_INSTALLED_BO'*/);
+ self::$modules->set_image_handler();
- self::$languages = tep_get_languages();
+ self::$languages = tep_get_languages();
- require_once(DIR_FS_CATALOG.DIR_WS_COMMON_CLASSES /*. 'classes/'*/ .'common_reviews.php' );
- $common=new common_reviews();
- }
+ require_once(DIR_FS_CATALOG.DIR_WS_COMMON_CLASSES /*. 'classes/'*/ .'common_reviews.php' );
+ $common=new common_reviews();
+ }
/**
@remarks define var execution sql in GetDBValue()
*/
self::$InitInfo['adjust']=array(
- 'languages_id'=>$languages_id,
- 'page'=>1,
- 'rowbyp'=>10,
- 'sOrder'=>'',
- 'sWhere'=>'',
- );
+ 'languages_id'=>$languages_id,
+ 'page'=>1,
+ 'rowbyp'=>10,
+ 'sOrder'=>'',
+ 'sWhere'=>'',
+ );
- MGabCont::SetCurrentName(__CLASS__);
+ MGabCont::SetCurrentName(__CLASS__);
// , products_id, date_added, last_modified, reviews_rating
- /**
- @remarks this define col theader title, and ajust html code
- Just for Edit listing
- */
- self::$allfields = array(
- 'c.reviews_id' => array(
- 'sort'=>true,
- 'alias'=>'id',
- 'text'=>__('@reviews table heading id'),
- 'width'=>'2%',
- 'class'=>'tcenter',
- 'default'=>true,
- ),
- );
+ /**
+ @remarks this define col theader title, and ajust html code
+ Just for Edit listing
+ */
+ self::$allfields = array(
+ 'c.reviews_id' => array(
+ 'sort'=>true,
+ 'alias'=>'id',
+ 'text'=>__('@reviews table heading id'),
+ 'width'=>'2%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
+ );
- self::$allfields['c.customers_name'] = array(
- 'sort'=>true,
- 'alias'=>'customers_name',
- 'text'=>__('@reviews table heading customers name'),
- 'width'=>'10%',
- 'class'=>'tcenter',
- 'edit'=>array(
- 'input_name'=>'customers_name',
- 'position_col'=>'left',
- 'position_grp'=>5
- ),
- );
- self::$allfields['c.pseudo'] = array(
- 'sort'=>true,
- 'alias'=>'pseudo',
- 'text'=>__('@reviews table heading pseudo'),
- 'width'=>'10%',
- 'class'=>'tcenter',
- 'edit'=>array(
- 'input_name'=>'customers_name',
- 'position_col'=>'left',
- 'position_grp'=>5
- ),
- );
- self::$allfields['c.email'] = array(
- 'sort'=>true,
- 'alias'=>'email',
- 'text'=>__('@reviews table heading email'),
- 'width'=>'10%',
- 'class'=>'tcenter',
- 'default'=>true,
- 'edit'=>array(
- 'input_name'=>'customers_name',
- 'position_col'=>'left',
- 'position_grp'=>5
- ),
- );
+ self::$allfields['c.customers_name'] = array(
+ 'sort'=>true,
+ 'alias'=>'customers_name',
+ 'text'=>__('@reviews table heading customers name'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'edit'=>array(
+ 'input_name'=>'customers_name',
+ 'position_col'=>'left',
+ 'position_grp'=>5
+ ),
+ );
+ self::$allfields['c.pseudo'] = array(
+ 'sort'=>true,
+ 'alias'=>'pseudo',
+ 'text'=>__('@reviews table heading pseudo'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'edit'=>array(
+ 'input_name'=>'customers_name',
+ 'position_col'=>'left',
+ 'position_grp'=>5
+ ),
+ );
+ self::$allfields['c.email'] = array(
+ 'sort'=>true,
+ 'alias'=>'email',
+ 'text'=>__('@reviews table heading email'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ 'edit'=>array(
+ 'input_name'=>'customers_name',
+ 'position_col'=>'left',
+ 'position_grp'=>5
+ ),
+ );
- self::$allfields['ct.datatype'] = array(
- 'sort'=>true,
- 'alias'=>'datatype',
- 'text'=>__('@reviews table heading datatype'),
- 'width'=>'10%',
- 'class'=>'tcenter',
- 'default'=>true,
- );
+ self::$allfields['ct.datatype'] = array(
+ 'sort'=>true,
+ 'alias'=>'datatype',
+ 'text'=>__('@reviews table heading datatype'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ );
- self::$allfields['ct.data_id'] = array(
- 'sort'=>true,
- 'alias'=>'data_id',
- 'text'=>__('@reviews table heading data_id'),
- 'width'=>'10%',
- 'class'=>'tcenter',
- 'default'=>true,
- );
+ self::$allfields['ct.data_id'] = array(
+ 'sort'=>true,
+ 'alias'=>'data_id',
+ 'text'=>__('@reviews table heading data_id'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ );
- self::$allfields['c.reviews_rating'] = array(
- 'sort'=>true,
- 'alias'=>'rating',
- 'text'=>__('@reviews table heading rating'),
- 'width'=>'10%',
- 'class'=>'tcenter',
- 'default'=>true,
- 'edit'=>array(
- 'input_type'=>'radio',
- 'input_size'=>'1',
- 'input_name'=>'reviews_status',
- 'values_list'=>array(
- array('id'=>0, 'text'=>__('@reviews text rating off') ),
- array('id'=>1, 'text'=>__('@reviews text rating 1') ),
- array('id'=>2, 'text'=>__('@reviews text rating 2') ),
- array('id'=>3, 'text'=>__('@reviews text rating 3') ),
- array('id'=>4, 'text'=>__('@reviews text rating 4') ),
- array('id'=>5, 'text'=>__('@reviews text rating 5') ),
- ),
- 'position_col'=>'left',
- 'position_grp'=>5
- ),
- );
-// self::$allfields['c.reviews_read'] = array(
-// 'sort'=>true,
-// 'alias'=>'read',
-// 'text'=>__('@reviews table heading read'),
-// 'width'=>'10%',
-// 'class'=>'tcenter',
-// );
+ self::$allfields['c.reviews_rating'] = array(
+ 'sort'=>true,
+ 'alias'=>'rating',
+ 'text'=>__('@reviews table heading rating'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ 'edit'=>array(
+ 'input_type'=>'radio',
+ 'input_size'=>'1',
+ 'input_name'=>'reviews_status',
+ 'values_list'=>array(
+ array('id'=>0, 'text'=>__('@reviews text rating off') ),
+ array('id'=>1, 'text'=>__('@reviews text rating 1') ),
+ array('id'=>2, 'text'=>__('@reviews text rating 2') ),
+ array('id'=>3, 'text'=>__('@reviews text rating 3') ),
+ array('id'=>4, 'text'=>__('@reviews text rating 4') ),
+ array('id'=>5, 'text'=>__('@reviews text rating 5') ),
+ ),
+ 'position_col'=>'left',
+ 'position_grp'=>5
+ ),
+ );
+// self::$allfields['c.reviews_read'] = array(
+// 'sort'=>true,
+// 'alias'=>'read',
+// 'text'=>__('@reviews table heading read'),
+// 'width'=>'10%',
+// 'class'=>'tcenter',
+// );
- self::$allfields['c.reviews_parent'] = array(
- 'sort'=>true,
- 'alias'=>'parent',
- 'text'=>__('@reviews table heading parent'),
- 'width'=>'10%',
- 'class'=>'tcenter',
- );
+ self::$allfields['c.reviews_parent'] = array(
+ 'sort'=>true,
+ 'alias'=>'parent',
+ 'text'=>__('@reviews table heading parent'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ );
- self::$allfields['cd.languages_id'] = array(
- 'sort'=>true,
- 'alias'=>'languages_id',
- 'text'=>__('@reviews table heading language'),
- 'width'=>'10%',
- 'class'=>'tcenter',
- );
+ self::$allfields['cd.languages_id'] = array(
+ 'sort'=>true,
+ 'alias'=>'languages_id',
+ 'text'=>__('@reviews table heading language'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ );
- self::$allfields['cd.reviews_text'] = array(
- 'sort'=>true,
- 'alias'=>'text',
- 'text'=>__('@reviews table heading text'),
-// 'default'=>true,
- 'width'=>'18%',
-// 'edit'=>array(
-// 'input_name'=>__CLASS__.'[content_text]',
-// 'input_type'=>'textarea@advanced',
-// // 'input_size'=>'64',
-// // 'required_status'=>true,
-// 'active_value_language'=>true,
-// ),
- );
+ self::$allfields['cd.reviews_text'] = array(
+ 'sort'=>true,
+ 'alias'=>'text',
+ 'text'=>__('@reviews table heading text'),
+// 'default'=>true,
+ 'width'=>'18%',
+// 'edit'=>array(
+// 'input_name'=>__CLASS__.'[content_text]',
+// 'input_type'=>'textarea@advanced',
+// // 'input_size'=>'64',
+// // 'required_status'=>true,
+// 'active_value_language'=>true,
+// ),
+ );
- self::$allfields['c.date_added'] = array(
- 'sort'=>true,
- 'alias'=>'added',
- 'text'=>__('@reviews table heading date_added'),
- 'width'=>'10%',
- 'class'=>'tcenter',
- );
- self::$allfields['c.last_modified'] = array(
- 'sort'=>true,
- 'alias'=>'modified',
- 'text'=>__('@reviews table heading last modified'),
- 'width'=>'10%',
- 'class'=>'tcenter',
- 'default'=>true,
- );
+ self::$allfields['c.date_added'] = array(
+ 'sort'=>true,
+ 'alias'=>'added',
+ 'text'=>__('@reviews table heading date_added'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ );
+ self::$allfields['c.last_modified'] = array(
+ 'sort'=>true,
+ 'alias'=>'modified',
+ 'text'=>__('@reviews table heading last modified'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ );
- self::$allfields['c.reviews_status'] = array(
- 'sort'=>true,
- 'alias'=>'status',
- 'text'=>__('@reviews table heading status'),
- 'width'=>'5%',
- 'default'=>true,
- 'edit'=>array(
- 'input_type'=>'radio',
- 'input_size'=>'1',
- 'input_name'=>'reviews_status',
- 'values_list'=>array(
- array('id'=>0, 'text'=>__('@reviews text status off') ),
- array('id'=>1, 'text'=>__('@reviews text status on') ),
- ),
- 'position_col'=>'right',
- 'position_grp'=>5
- ),
- );
+ self::$allfields['c.reviews_status'] = array(
+ 'sort'=>true,
+ 'alias'=>'status',
+ 'text'=>__('@reviews table heading status'),
+ 'width'=>'5%',
+ 'default'=>true,
+ 'edit'=>array(
+ 'input_type'=>'radio',
+ 'input_size'=>'1',
+ 'input_name'=>'reviews_status',
+ 'values_list'=>array(
+ array('id'=>0, 'text'=>__('@reviews text status off') ),
+ array('id'=>1, 'text'=>__('@reviews text status on') ),
+ ),
+ 'position_col'=>'right',
+ 'position_grp'=>5
+ ),
+ );
- /// @remarks min fields and not view directly colonne fields
- $listfield = ' c.reviews_id as id, ';
+ /// @remarks min fields and not view directly colonne fields
+ $listfield = ' c.reviews_id as id, ';
- /// @remarks Active forms filter
- $mutli=array();
-// $mutli[] = sprintf(CsrtAction::getButton('button_action', IMAGE_DELETE, 'delete'), '', ' name="multi_action" ' ) ;
+ /// @remarks Active forms filter
+ $mutli=array();
+// $mutli[] = sprintf(CsrtAction::getButton('button_action', IMAGE_DELETE, 'delete'), '', ' name="multi_action" ' ) ;
- /**
- @remarks Active forms filter
- @note
- array[
- // For normalised filter define on method ConvertInitVar
- generic =>
- array (
- 'string'
- // , ....
- );
- mod =>
- array(
- 'title'=>__('@products filter tab manufacturer'),
- 'content'=>tep_get_include_contents('manufacturers/filter.manufacturer'),
- )
- ]
- */
- $tab = array();
+ /**
+ @remarks Active forms filter
+ @note
+ array[
+ // For normalised filter define on method ConvertInitVar
+ generic =>
+ array (
+ 'string'
+ // , ....
+ );
+ mod =>
+ array(
+ 'title'=>__('@products filter tab manufacturer'),
+ 'content'=>tep_get_include_contents('manufacturers/filter.manufacturer'),
+ )
+ ]
+ */
+ $tab = array();
- if(count(self::$languages)>1 )
- $tab['generic'][] ='language' ;
+ if(count(self::$languages)>1 )
+ $tab['generic'][] ='language' ;
- $tab['mod'][]=array(
- 'title'=>__('@reviews filter tab clause'),
- 'content'=>tep_get_include_contents(__CLASS__.'/filter.clause'),
- );
- /**
- @remarks this define menu master module in page
- @note use $boutons[action][] = array(params)
+ $tab['mod'][]=array(
+ 'title'=>__('@reviews filter tab clause'),
+ 'content'=>tep_get_include_contents(__CLASS__.'/filter.clause'),
+ );
+ /**
+ @remarks this define menu master module in page
+ @note use $boutons[action][] = array(params)
- params :
- 'type'=>'getLink',
- 'format'=>'button_nav',
- 'image'=>'',
- 'cssclass'=>'button',
- 'title'=>__('image create new content'),
- 'url'=>tep_href_link(self::FILENAME, 'action=new'),
- */
- $boutons = array();
+ params :
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'button',
+ 'title'=>__('image create new content'),
+ 'url'=>tep_href_link(self::FILENAME, 'action=new'),
+ */
+ $boutons = array();
- /**
- Call Base Init and construct $InitInfo for process Filter
- $listfield string list row in db
- $mutli array action multiple
- $filter array put list off activate tab filter
- $boutons array
- */
- self::ConvertInitVar( $listfield, $mutli, $tab, $boutons);
+ /**
+ Call Base Init and construct $InitInfo for process Filter
+ $listfield string list row in db
+ $mutli array action multiple
+ $filter array put list off activate tab filter
+ $boutons array
+ */
+ self::ConvertInitVar( $listfield, $mutli, $tab, $boutons);
}
@@ -337,84 +337,84 @@
self::$action=$actions;
switch (self::$action) {
- /**
- @remarks specific save in session value filters
- */
- case 'filters':
- /*
- Call Prev Process
- */
- self::actionFilter();
+ /**
+ @remarks specific save in session value filters
+ */
+ case 'filters':
+ /*
+ Call Prev Process
+ */
+ self::actionFilter();
- tep_redirect(tep_href_link(self::FILENAME));
- break;
+ tep_redirect(tep_href_link(self::FILENAME));
+ break;
- /**
- @remarks specific Ajax call
- */
- case 'update_cell':
- try {
- if($_REQUEST['columnName'] == 'products_ref'){
- if( sqlcontent::fetch(array('ref'=>$_REQUEST['value'])) != false)
- throw new Exception(__('@cms_content ref is already used') ) ;
- }
+ /**
+ @remarks specific Ajax call
+ */
+ case 'update_cell':
+ try {
+ if($_REQUEST['columnName'] == 'products_ref'){
+ if( sqlcontent::fetch(array('ref'=>$_REQUEST['value'])) != false)
+ throw new Exception(__('@cms_content ref is already used') ) ;
+ }
- $modele = array_keys(sqlcontent::Specimen());
- $params = array();
- $params['id'] = $_REQUEST['id'];
+ $modele = array_keys(sqlcontent::Specimen());
+ $params = array();
+ $params['id'] = $_REQUEST['id'];
- if( in_array($_REQUEST['columnName'], $modele) )
- $params['sqlarray'] = array(
- $_REQUEST['columnName'] => (isset($_REQUEST['value']) ? tep_db_prepare_input($_REQUEST['value']) : 0)
- );
- else{
- $tab = explode('[', $_REQUEST['columnName']);
- $final = $tabs2 = array();
- foreach($tab as $row)
- $tabs2[] = ( (substr($row,-1)==']')?substr($row,0,-1) : $row );
+ if( in_array($_REQUEST['columnName'], $modele) )
+ $params['sqlarray'] = array(
+ $_REQUEST['columnName'] => (isset($_REQUEST['value']) ? tep_db_prepare_input($_REQUEST['value']) : 0)
+ );
+ else{
+ $tab = explode('[', $_REQUEST['columnName']);
+ $final = $tabs2 = array();
+ foreach($tab as $row)
+ $tabs2[] = ( (substr($row,-1)==']')?substr($row,0,-1) : $row );
- $tabs3 = array_reverse($tabs2);
- $max = count($tabs2);
- $i=0;
- foreach($tabs3 as $row){
- $i++;
- if($i==1) $final[$row] = (isset($_REQUEST['value']) ? tep_db_prepare_input($_REQUEST['value']) : 0);
- else
- $final[$row] = $final;
- }
+ $tabs3 = array_reverse($tabs2);
+ $max = count($tabs2);
+ $i=0;
+ foreach($tabs3 as $row){
+ $i++;
+ if($i==1) $final[$row] = (isset($_REQUEST['value']) ? tep_db_prepare_input($_REQUEST['value']) : 0);
+ else
+ $final[$row] = $final;
+ }
- $params['post'] = $final;
- }
+ $params['post'] = $final;
+ }
- $params['action']=self::$action;
+ $params['action']=self::$action;
- $params['language_id']= $languages_id;
+ $params['language_id']= $languages_id;
- if( sqlcontent::update( $params ) != 1 )
- throw new Exception(__('@cms_content error in update process')) ;
+ if( sqlcontent::update( $params ) != 1 )
+ throw new Exception(__('@cms_content error in update process')) ;
- $messageStack->add_session(__('@cms_content success in update process'), 'success');
+ $messageStack->add_session(__('@cms_content success in update process'), 'success');
- // display value for return
- echo $_REQUEST['value'];
- }
- catch (Exception $e) {
+ // display value for return
+ echo $_REQUEST['value'];
+ }
+ catch (Exception $e) {
- $messageStack->add_session($e->getMessage() , 'error');
- }
- break;
+ $messageStack->add_session($e->getMessage() , 'error');
+ }
+ break;
case 'setflag':
- if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
- if (isset($_GET['cID'])) {
- sqlcontent::update(array('id'=>(int)$_GET['cID'], 'sqlarray'=>array('content_status' => (int) $_GET['flag'] )));
- }
- }
+ if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
+ if (isset($_GET['cID'])) {
+ sqlcontent::update(array('id'=>(int)$_GET['cID'], 'sqlarray'=>array('content_status' => (int) $_GET['flag'] )));
+ }
+ }
- $messageStack->add(__('@cms_content update status'), 'success');
+ $messageStack->add(__('@cms_content update status'), 'success');
- if(!isset($_GET['forceajax']))
- tep_redirect(tep_href_link(self::FILENAME) );
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(self::FILENAME) );
break;
case 'insert':
@@ -534,83 +534,83 @@
switch ($action) {
- /**
- @remarks Ajax View result
- */
+ /**
+ @remarks Ajax View result
+ */
case 'setflag':
break;
case 'viewflag':
break;
- /**
- @remarks Normal View Page
- */
+ /**
+ @remarks Normal View Page
+ */
case 'delete':
case 'detail':
case 'edit':
case 'new':
- global $language_id;
+ global $language_id;
- if( (int)self::$Id > 0) {
- $res = sqlcontent::fetch(array('id'=>self::$Id,'language_id'=>$language_id), true);
- }
- else{
- $res = sqlcontent::Specimen(true);
- }
+ if( (int)self::$Id > 0) {
+ $res = sqlcontent::fetch(array('id'=>self::$Id,'language_id'=>$language_id), true);
+ }
+ else{
+ $res = sqlcontent::Specimen(true);
+ }
- $res= self::FormatDBValue($res);
+ $res= self::FormatDBValue($res);
- return $res;
+ return $res;
break;
default:
- /**
- @remarks retrun object load one inventaire
- */
- global $query_numrows, $languages_id;
- $adjust=new objectInfo(self::$InitInfo['adjust']);
+ /**
+ @remarks retrun object load one inventaire
+ */
+ global $query_numrows, $languages_id;
+ $adjust=new objectInfo(self::$InitInfo['adjust']);
- /**
- @remarks replace id by name col
- */
- if(!empty($adjust->sWhere)) {
+ /**
+ @remarks replace id by name col
+ */
+ if(!empty($adjust->sWhere)) {
- foreach(self::$allfields as $key=>$row){
- if(is_array($row) && isset($row['alias']) ){
- $k[] = '#[(]'.$row['alias'].'[)]#i';
- $k[] = '# '.$row['alias'].' #i';
- $k[] = '# \.'.$row['alias'].'#i';
+ foreach(self::$allfields as $key=>$row){
+ if(is_array($row) && isset($row['alias']) ){
+ $k[] = '#[(]'.$row['alias'].'[)]#i';
+ $k[] = '# '.$row['alias'].' #i';
+ $k[] = '# \.'.$row['alias'].'#i';
- $v[] = '('.$key.')';
- $v[] = ' '.$key.' ';
- $v[] = '.'.$key.' ';
- }
- }
+ $v[] = '('.$key.')';
+ $v[] = ' '.$key.' ';
+ $v[] = '.'.$key.' ';
+ }
+ }
- if(isset($k))
- $adjust->sWhere = preg_replace($k,$v, $adjust->sWhere);
- }
+ if(isset($k))
+ $adjust->sWhere = preg_replace($k,$v, $adjust->sWhere);
+ }
// $reviews_query_raw = "select reviews_id, products_id, date_added, last_modified, reviews_rating from " . TABLE_REVIEWS . " ".$clause_where." order by ".((isset($_GET['sort_by'])) ? $_GET['sort_by'] : 'date_added DESC');
- $query_raw = "SELECT ".$adjust->listfields.", c.reviews_id as id FROM " . TABLE_REVIEWS . " c ".
- " LEFT JOIN " . TABLE_REVIEWS_TO . " ct USING(reviews_id) ".
- " LEFT JOIN " . TABLE_REVIEWS_DESCRIPTION . " cd ON(c.reviews_id =cd.reviews_id AND cd.languages_id='".(int)$adjust->languages_id."') ";
+ $query_raw = "SELECT ".$adjust->listfields.", c.reviews_id as id FROM " . TABLE_REVIEWS . " c ".
+ " LEFT JOIN " . TABLE_REVIEWS_TO . " ct USING(reviews_id) ".
+ " LEFT JOIN " . TABLE_REVIEWS_DESCRIPTION . " cd ON(c.reviews_id =cd.reviews_id AND cd.languages_id='".(int)$adjust->languages_id."') ";
- $query_raw .=((strlen($adjust->sWhere)>4) ? " WHERE ".substr($adjust->sWhere, 3) : '').
- " GROUP BY c.reviews_id ";
+ $query_raw .=((strlen($adjust->sWhere)>4) ? " WHERE ".substr($adjust->sWhere, 3) : '').
+ " GROUP BY c.reviews_id ";
- $query_raw .=" ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' c.date_added DESC ');
+ $query_raw .=" ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' c.date_added DESC ');
- $_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
- $_query = $DB->query($query_raw);
+ $_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
+ $_query = $DB->query($query_raw);
- $res=self::FormatDBValue($_query);
+ $res=self::FormatDBValue($_query);
- return $res;
+ return $res;
}
}
@@ -620,51 +620,51 @@
switch ($action) {
- /**
- @remarks Ajax View result
- */
- case 'update_cell':
- break;
+ /**
+ @remarks Ajax View result
+ */
+ case 'update_cell':
+ break;
case 'setflag':
- return self::RowStatus(array('status'=>(int)$_GET['flag'], 'id'=>(int)self::$Id));
+ return self::RowStatus(array('status'=>(int)$_GET['flag'], 'id'=>(int)self::$Id));
break;
case 'viewflag':
- return self::RowHidden(array('hidden'=>(int)$_GET['flag'], 'id'=>(int)self::$Id));
+ return self::RowHidden(array('hidden'=>(int)$_GET['flag'], 'id'=>(int)self::$Id));
break;
- /**
- @remarks Ajax View result
- */
+ /**
+ @remarks Ajax View result
+ */
case 'isValidKey':
- $stringkey = tep_db_prepare_input($_REQUEST['stringkey']) ;
+ $stringkey = tep_db_prepare_input($_REQUEST['stringkey']) ;
- if( ! (bool)self::$list['isValidKey'])
- $print = tep_draw_input_field('content_name', '', (string)$stringkey , ' class="inline error" ');
- else
- $print = $stringkey. tep_draw_hidden_field('content_name', '', (string)$stringkey, ' ');
+ if( ! (bool)self::$list['isValidKey'])
+ $print = tep_draw_input_field('content_name', '', (string)$stringkey , ' class="inline error" ');
+ else
+ $print = $stringkey. tep_draw_hidden_field('content_name', '', (string)$stringkey, ' ');
- return $print;
- break;
+ return $print;
+ break;
- /**
- @remarks Normal View Page
- */
+ /**
+ @remarks Normal View Page
+ */
case 'delete':
case 'edit':
- self::$Info=self::GetDBValue(self::$Id);
- /// use master gabarit
-// return MGabCont::CallGab(self::$action,__FUNCTION__,__CLASS__);
- return MGabCont::CallGab(self::$action,__FUNCTION__,self::MASTER);
+ self::$Info=self::GetDBValue(self::$Id);
+ /// use master gabarit
+// return MGabCont::CallGab(self::$action,__FUNCTION__,__CLASS__);
+ return MGabCont::CallGab(self::$action,__FUNCTION__,self::MASTER);
break;
case 'new':
- self::$Info=self::load_db_values(-1);
- return MGabCont::CallGab(self::$action,__FUNCTION__,__CLASS__);
+ self::$Info=self::load_db_values(-1);
+ return MGabCont::CallGab(self::$action,__FUNCTION__,__CLASS__);
break;
default:
- self::$list=self::tep_get_list();
- /// use master gabarit
+ self::$list=self::tep_get_list();
+ /// use master gabarit
- return MGabCont::CallGab('listing',__FUNCTION__,self::MASTER);
+ return MGabCont::CallGab('listing',__FUNCTION__,self::MASTER);
}
}
@@ -682,9 +682,9 @@
self::GetConf();
- self::$Id= (int)$id;
+ self::$Id= (int)$id;
- self::GetDBValue();
+ self::GetDBValue();
return MGabCont::CallGab('inline','display_view',__CLASS__);
@@ -733,11 +733,11 @@
*/
public static function ButtonRowsActions($content){
return sprintf(
- CsrtAction::getFormat('row_action'),
- self::$modules->display_ColumnRowAction($content['id']) ,
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME, 'cID=' . $content['id'] . '&action=edit') ,'' ).
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $content['id'] . '&action=delete') ,'' )
- );
+ CsrtAction::getFormat('row_action'),
+ self::$modules->display_ColumnRowAction($content['id']) ,
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME, 'cID=' . $content['id'] . '&action=edit') ,'' ).
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $content['id'] . '&action=delete') ,'' )
+ );
}
/**
@@ -750,12 +750,12 @@
$query_s='action=setflag&cID=' . $content['id'].'&flag=';
return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($content['status'] == '1')? '0' : '1') ) . '">'.
- sprintf(
- CsrtAction::getFormat('row_flag'),
- (int)$content['status'],
- ( ($content['status'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
- ).
- '</a>';
+ sprintf(
+ CsrtAction::getFormat('row_flag'),
+ (int)$content['status'],
+ ( ($content['status'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ ).
+ '</a>';
}
/**
@@ -767,20 +767,20 @@
/**
- @fn HrefLink($id, $action='edit')
+ @fn HrefLink($id, $action='edit')
@brief retrun link specififc this data
@param $id integer OR Array !!
@param $action string (defaut: edit)
- @param $key not used
+ @param $key not used
@param $params string other args passed in GET format and prev &
@return links
*/
public static function HrefLink($id, $action='edit', $key='', $params=''){
- if(is_array($id)){
- $action = ((!isset($id['action']) || empty($id['action']))? 'edit' : $id['action'] );
- $params = ((!isset($id['params']) || empty($id['params']))? '' : $id['params'] );
- $id = $id['id'];
- }
+ if(is_array($id)){
+ $action = ((!isset($id['action']) || empty($id['action']))? 'edit' : $id['action'] );
+ $params = ((!isset($id['params']) || empty($id['params']))? '' : $id['params'] );
+ $id = $id['id'];
+ }
return tep_href_link( self::FILENAME,'pID='.$id.'&action='.$action . $params );
}
@@ -798,68 +798,68 @@
switch (self::$action) {
case 'listing':
- global $query_numrows,$languages_id;
+ global $query_numrows,$languages_id;
- while ($item = $_query->fetchAssoc()) {
- $ord =array();
+ while ($item = $_query->fetchAssoc()) {
+ $ord =array();
- $item[1]=tep_draw_checkbox_field('action_multi['.$item['id'].']','action_mutli_'.$item['id'],$item['id']);
+ $item[1]=tep_draw_checkbox_field('action_multi['.$item['id'].']','action_mutli_'.$item['id'],$item['id']);
- foreach(self::$InitInfo['modele']['listing'] as $k=>$row){
- if($k == 'action') $ord[$k]=self::ButtonRowsActions($item);
- elseif($k == 'status') $ord[$k]=self::RowStatus($item);
- elseif($k == 'hidden') $ord[$k]=self::RowHidden($item);
- elseif(in_array($k,array('added', 'modified') ) )$ord[$k]=((isset($item[$k]) && $item[$k] !='1000-01-01 00:00:00' )? tep_date_short($item[$k]) : '' );
- else $ord[$k]=$item[$k];
- }
+ foreach(self::$InitInfo['modele']['listing'] as $k=>$row){
+ if($k == 'action') $ord[$k]=self::ButtonRowsActions($item);
+ elseif($k == 'status') $ord[$k]=self::RowStatus($item);
+ elseif($k == 'hidden') $ord[$k]=self::RowHidden($item);
+ elseif(in_array($k,array('added', 'modified') ) )$ord[$k]=((isset($item[$k]) && $item[$k] !='1000-01-01 00:00:00' )? tep_date_short($item[$k]) : '' );
+ else $ord[$k]=$item[$k];
+ }
- $ord[0]=$item['id'];
+ $ord[0]=$item['id'];
- $res[]=$ord;
- }
+ $res[]=$ord;
+ }
break;
- case 'new':
+ case 'new':
case 'edit';
default:
- global $languages_id;
+ global $languages_id;
- $ord =array();
+ $ord =array();
- if(is_object($_query)){
- $res = new stdClass;
- foreach($_query as $key=>$row) {
- switch($key){
- case 'lg':
- foreach($row as $ke=>$ro){
- foreach($ro as $k=>$r){
+ if(is_object($_query)){
+ $res = new stdClass;
+ foreach($_query as $key=>$row) {
+ switch($key){
+ case 'lg':
+ foreach($row as $ke=>$ro){
+ foreach($ro as $k=>$r){
- if( ($new_r = self::GetEditFieldsDefine($k) ) && $new_r !=false ){
- $new_r['input_value'][$ke] = $r;
- $edit = 'edit_'.$k;
- $res->$edit = new objectInfo($new_r);
- }
+ if( ($new_r = self::GetEditFieldsDefine($k) ) && $new_r !=false ){
+ $new_r['input_value'][$ke] = $r;
+ $edit = 'edit_'.$k;
+ $res->$edit = new objectInfo($new_r);
+ }
- $res->$k = $r;
- }
- }
- break;
+ $res->$k = $r;
+ }
+ }
+ break;
-// case 'barcode_type':
+// case 'barcode_type':
- default:
+ default:
- if( ($new_r...
[truncated message content] |
|
From: <os...@us...> - 2013-10-23 13:06:19
|
Revision: 4902
http://sourceforge.net/p/oscss/svn/4902
Author: oscim
Date: 2013-10-23 13:06:13 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
add file and next develop extension
Modified Paths:
--------------
trunk/extensions/REVIEWS_stable/install.xml
Added Paths:
-----------
trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/customers/
trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/customers/reviews/
trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/customers/reviews/display_edit.noedit.gab
trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/reviews/
trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/
trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/reviews.txt
trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/pages/
trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/pages/reviews.php
Added: trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/customers/reviews/display_edit.noedit.gab
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/customers/reviews/display_edit.noedit.gab (rev 0)
+++ trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/customers/reviews/display_edit.noedit.gab 2013-10-23 13:06:13 UTC (rev 4902)
@@ -0,0 +1,34 @@
+<?php
+/**
+ @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 01/11/11, 20:00
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+
+<div class="main-customers history noedit">
+
+ <table class="dataTableBase Sort">
+ <thead>
+ <tr>
+ <th><?php echo __('@reviews table heading rating') ?></th>
+ <th><?php echo __('@reviews table heading date') ?></th>
+ <th><?php echo __('@reviews table heading text') ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach(reviews::$cInfo as $row): $row = new objectInfo($row);?>
+ <tr>
+ <td class="tleft"><?php echo $row->reviews_rating ?></td>
+ <td class="tcenter"><?php echo tep_date_short($row->date_added) ?></td>
+ <td class="tleft"><?php echo $row->reviews_text ?></td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+
+</div>
\ No newline at end of file
Added: trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/reviews.txt
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/reviews.txt (rev 0)
+++ trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/reviews.txt 2013-10-23 13:06:13 UTC (rev 4902)
@@ -0,0 +1,61 @@
+<?php
+/**
+ @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 10/04/2012 ,13:36:56
+ @author genrated by GenerCode
+ @encode UTF-8
+ @class rapport
+*/
+$lang['heading title reviews'] = "Commentaires";
+
+
+/* listing */
+ $lang['@reviews table heading id'] = "Id";
+ $lang['@reviews table heading text'] = "text";
+ $lang['@reviews table heading customers name'] = "Membre";
+ $lang['@reviews table heading rating'] = "vote";
+ $lang['@reviews table heading read'] = "Vu";
+ $lang['@reviews table heading pseudo'] = "Pseudo";
+ $lang['@reviews table heading email'] = "email";
+ $lang['@reviews table heading parent'] = "parent";
+ $lang['@reviews table heading date_added'] = "Ajouté";
+ $lang['@reviews table heading last modified'] = "Modifié";
+ $lang['@reviews table heading status'] = "Etat";
+ $lang['@reviews table heading action'] = "Action";
+ $lang['@reviews table heading language'] = "Langue";
+ $lang['@reviews table heading datatype'] = "Donnée";
+ $lang['@reviews table heading data_id'] = "Donnée id";
+
+
+
+
+
+
+$lang['HEADING_TITLE'] = "Critiques" ;
+$lang['TABLE_HEADING_PRODUCTS'] = "Produits" ;
+$lang['TABLE_HEADING_RATING'] = "Classement" ;
+$lang['TABLE_HEADING_DATE_ADDED'] = "Date d\'ajout" ;
+$lang['TABLE_HEADING_ACTION'] = "Action" ;
+$lang['ENTRY_PRODUCT'] = "Produit :" ;
+$lang['ENTRY_FROM'] = "De :" ;
+$lang['ENTRY_DATE'] = "Date :" ;
+$lang['ENTRY_REVIEW'] = "Critique :" ;
+$lang['ENTRY_REVIEW_TEXT'] = "REMARQUE : Le HTML n\'est pas traduit !" ;
+$lang['ENTRY_RATING'] = "Classement :" ;
+$lang['TEXT_INFO_DELETE_REVIEW_INTRO'] = "Êtes vous sur de vouloir supprimer cette critique ?" ;
+$lang['TEXT_INFO_DATE_ADDED'] = "Date d\'ajout :" ;
+$lang['TEXT_INFO_LAST_MODIFIED'] = "Dernière modification :" ;
+$lang['TEXT_INFO_IMAGE_NONEXISTENT'] = "L\'IMAGE N\'EXISTE PAS" ;
+$lang['TEXT_INFO_REVIEW_AUTHOR'] = "Auteur :" ;
+$lang['TEXT_INFO_REVIEW_RATING'] = "Classement :" ;
+$lang['TEXT_INFO_REVIEW_READ'] = "Lu :" ;
+$lang['TEXT_INFO_REVIEW_SIZE'] = "Taille :" ;
+$lang['TEXT_INFO_PRODUCTS_AVERAGE_RATING'] = "Classement moyen :" ;
+$lang['TEXT_OF_5_STARS'] = "%s sur 5 étoiles !" ;
+// $lang['TEXT_GOOD'] = "<span style="color:#ff0000">BON</span>" ;
+// $lang['TEXT_BAD'] = "<span style="color:#ff0000">MAUVAIS</span>" ;
+$lang['TEXT_INFO_HEADING_DELETE_REVIEW'] = "Supprimer critique" ;
+?>
\ No newline at end of file
Added: trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/pages/reviews.php
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/pages/reviews.php (rev 0)
+++ trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/pages/reviews.php 2013-10-23 13:06:13 UTC (rev 4902)
@@ -0,0 +1,880 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 11/09/11, 10:45
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class reviews
+ @brief This class manipulate devise (add/up/delete)
+*/
+
+error_reporting(E_ALL);
+class reviews
+ extends ModTwo /// new abstract class for nextgen module
+ implements
+ InterfaceModule,
+ ExtModConfig,
+ InterfacedTJsonS,
+ InterfacedInnerHtml
+ {
+
+ const FILENAME =FILENAME_REVIEWS;
+
+ /**
+ @var int current id
+ */
+ public static $Id;
+ /**
+ @var object
+ */
+ public static $list=array();
+ /**
+ @var array
+ */
+ public static $languages;
+
+
+ /**
+ class constructor
+ */
+ public function __construct() {
+ self::GetConf();
+ }
+
+ /**
+ @brief Load , adjust and define var environement exe for module
+ Is use in module and class abstract for init value config this module
+ */
+ public static function GetConf(){
+ global $languages_id;
+
+ self::$code=__CLASS__;
+// self::$datatype='content';
+
+ self::$action=(isset($_REQUEST['action'])? $_REQUEST['action'] : 'listing' );
+ self::$Id=(isset($_REQUEST['cID'])? (int)$_REQUEST['cID'] : 0 );
+
+ /**
+ @remarks not load if not first init
+ */
+ if(!defined('JSONSTATMENT')){
+
+ //! active datatable in ajax, precise les GET necessaire
+ if(!defined('JSONSTATMENT'))define('JSONSTATMENT', 'ModTwo=true&mod=page&type='.self::$code .(isset($_GET['cID'])?'&cID='.$_GET['cID'] : '' ) );
+ //! detail item in ajax
+ if(!defined('AJAXSTATMENTDETAIL'))define('AJAXSTATMENTDETAIL', 'mod=page&type='.self::$code);
+
+
+ // instancie MLinkTo
+ MLinkTo::getInstance(self::$datatype);
+
+ // Use factory class aca
+ self::$modules=new AcaFactory(self::$datatype/*,'MODULE_CONTENT_INSTALLED_BO'*/);
+ self::$modules->set_image_handler();
+
+ self::$languages = tep_get_languages();
+
+ require_once(DIR_FS_CATALOG.DIR_WS_COMMON_CLASSES /*. 'classes/'*/ .'common_reviews.php' );
+ $common=new common_reviews();
+ }
+
+
+ /**
+ @remarks define var execution sql in GetDBValue()
+ */
+ self::$InitInfo['adjust']=array(
+ 'languages_id'=>$languages_id,
+ 'page'=>1,
+ 'rowbyp'=>10,
+ 'sOrder'=>'',
+ 'sWhere'=>'',
+ );
+
+
+ MGabCont::SetCurrentName(__CLASS__);
+
+// , products_id, date_added, last_modified, reviews_rating
+ /**
+ @remarks this define col theader title, and ajust html code
+ Just for Edit listing
+ */
+ self::$allfields = array(
+ 'c.reviews_id' => array(
+ 'sort'=>true,
+ 'alias'=>'id',
+ 'text'=>__('@reviews table heading id'),
+ 'width'=>'2%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ ),
+ );
+
+
+ self::$allfields['c.customers_name'] = array(
+ 'sort'=>true,
+ 'alias'=>'customers_name',
+ 'text'=>__('@reviews table heading customers name'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'edit'=>array(
+ 'input_name'=>'customers_name',
+ 'position_col'=>'left',
+ 'position_grp'=>5
+ ),
+ );
+ self::$allfields['c.pseudo'] = array(
+ 'sort'=>true,
+ 'alias'=>'pseudo',
+ 'text'=>__('@reviews table heading pseudo'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'edit'=>array(
+ 'input_name'=>'customers_name',
+ 'position_col'=>'left',
+ 'position_grp'=>5
+ ),
+ );
+ self::$allfields['c.email'] = array(
+ 'sort'=>true,
+ 'alias'=>'email',
+ 'text'=>__('@reviews table heading email'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ 'edit'=>array(
+ 'input_name'=>'customers_name',
+ 'position_col'=>'left',
+ 'position_grp'=>5
+ ),
+ );
+
+ self::$allfields['ct.datatype'] = array(
+ 'sort'=>true,
+ 'alias'=>'datatype',
+ 'text'=>__('@reviews table heading datatype'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ );
+
+ self::$allfields['ct.data_id'] = array(
+ 'sort'=>true,
+ 'alias'=>'data_id',
+ 'text'=>__('@reviews table heading data_id'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ );
+
+
+ self::$allfields['c.reviews_rating'] = array(
+ 'sort'=>true,
+ 'alias'=>'rating',
+ 'text'=>__('@reviews table heading rating'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ 'edit'=>array(
+ 'input_type'=>'radio',
+ 'input_size'=>'1',
+ 'input_name'=>'reviews_status',
+ 'values_list'=>array(
+ array('id'=>0, 'text'=>__('@reviews text rating off') ),
+ array('id'=>1, 'text'=>__('@reviews text rating 1') ),
+ array('id'=>2, 'text'=>__('@reviews text rating 2') ),
+ array('id'=>3, 'text'=>__('@reviews text rating 3') ),
+ array('id'=>4, 'text'=>__('@reviews text rating 4') ),
+ array('id'=>5, 'text'=>__('@reviews text rating 5') ),
+ ),
+ 'position_col'=>'left',
+ 'position_grp'=>5
+ ),
+ );
+// self::$allfields['c.reviews_read'] = array(
+// 'sort'=>true,
+// 'alias'=>'read',
+// 'text'=>__('@reviews table heading read'),
+// 'width'=>'10%',
+// 'class'=>'tcenter',
+// );
+
+ self::$allfields['c.reviews_parent'] = array(
+ 'sort'=>true,
+ 'alias'=>'parent',
+ 'text'=>__('@reviews table heading parent'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ );
+
+ self::$allfields['cd.languages_id'] = array(
+ 'sort'=>true,
+ 'alias'=>'languages_id',
+ 'text'=>__('@reviews table heading language'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ );
+
+ self::$allfields['cd.reviews_text'] = array(
+ 'sort'=>true,
+ 'alias'=>'text',
+ 'text'=>__('@reviews table heading text'),
+// 'default'=>true,
+ 'width'=>'18%',
+// 'edit'=>array(
+// 'input_name'=>__CLASS__.'[content_text]',
+// 'input_type'=>'textarea@advanced',
+// // 'input_size'=>'64',
+// // 'required_status'=>true,
+// 'active_value_language'=>true,
+// ),
+ );
+
+ self::$allfields['c.date_added'] = array(
+ 'sort'=>true,
+ 'alias'=>'added',
+ 'text'=>__('@reviews table heading date_added'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ );
+ self::$allfields['c.last_modified'] = array(
+ 'sort'=>true,
+ 'alias'=>'modified',
+ 'text'=>__('@reviews table heading last modified'),
+ 'width'=>'10%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ );
+
+
+ self::$allfields['c.reviews_status'] = array(
+ 'sort'=>true,
+ 'alias'=>'status',
+ 'text'=>__('@reviews table heading status'),
+ 'width'=>'5%',
+ 'default'=>true,
+ 'edit'=>array(
+ 'input_type'=>'radio',
+ 'input_size'=>'1',
+ 'input_name'=>'reviews_status',
+ 'values_list'=>array(
+ array('id'=>0, 'text'=>__('@reviews text status off') ),
+ array('id'=>1, 'text'=>__('@reviews text status on') ),
+ ),
+ 'position_col'=>'right',
+ 'position_grp'=>5
+ ),
+ );
+
+
+ /// @remarks min fields and not view directly colonne fields
+ $listfield = ' c.reviews_id as id, ';
+
+ /// @remarks Active forms filter
+ $mutli=array();
+// $mutli[] = sprintf(CsrtAction::getButton('button_action', IMAGE_DELETE, 'delete'), '', ' name="multi_action" ' ) ;
+
+
+ /**
+ @remarks Active forms filter
+ @note
+ array[
+ // For normalised filter define on method ConvertInitVar
+ generic =>
+ array (
+ 'string'
+ // , ....
+ );
+ mod =>
+ array(
+ 'title'=>__('@products filter tab manufacturer'),
+ 'content'=>tep_get_include_contents('manufacturers/filter.manufacturer'),
+ )
+ ]
+ */
+ $tab = array();
+
+ if(count(self::$languages)>1 )
+ $tab['generic'][] ='language' ;
+
+ $tab['mod'][]=array(
+ 'title'=>__('@reviews filter tab clause'),
+ 'content'=>tep_get_include_contents(__CLASS__.'/filter.clause'),
+ );
+ /**
+ @remarks this define menu master module in page
+ @note use $boutons[action][] = array(params)
+
+ params :
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'button',
+ 'title'=>__('image create new content'),
+ 'url'=>tep_href_link(self::FILENAME, 'action=new'),
+ */
+ $boutons = array();
+
+
+ /**
+ Call Base Init and construct $InitInfo for process Filter
+ $listfield string list row in db
+ $mutli array action multiple
+ $filter array put list off activate tab filter
+ $boutons array
+ */
+ self::ConvertInitVar( $listfield, $mutli, $tab, $boutons);
+
+
+ }
+
+
+ public function check_action($actions){
+ global $messageStack;
+
+ self::$action=$actions;
+
+ switch (self::$action) {
+ /**
+ @remarks specific save in session value filters
+ */
+ case 'filters':
+ /*
+ Call Prev Process
+ */
+ self::actionFilter();
+
+
+ tep_redirect(tep_href_link(self::FILENAME));
+ break;
+
+ /**
+ @remarks specific Ajax call
+ */
+ case 'update_cell':
+ try {
+ if($_REQUEST['columnName'] == 'products_ref'){
+ if( sqlcontent::fetch(array('ref'=>$_REQUEST['value'])) != false)
+ throw new Exception(__('@cms_content ref is already used') ) ;
+ }
+
+ $modele = array_keys(sqlcontent::Specimen());
+ $params = array();
+ $params['id'] = $_REQUEST['id'];
+
+ if( in_array($_REQUEST['columnName'], $modele) )
+ $params['sqlarray'] = array(
+ $_REQUEST['columnName'] => (isset($_REQUEST['value']) ? tep_db_prepare_input($_REQUEST['value']) : 0)
+ );
+ else{
+ $tab = explode('[', $_REQUEST['columnName']);
+ $final = $tabs2 = array();
+ foreach($tab as $row)
+ $tabs2[] = ( (substr($row,-1)==']')?substr($row,0,-1) : $row );
+
+ $tabs3 = array_reverse($tabs2);
+ $max = count($tabs2);
+ $i=0;
+ foreach($tabs3 as $row){
+ $i++;
+ if($i==1) $final[$row] = (isset($_REQUEST['value']) ? tep_db_prepare_input($_REQUEST['value']) : 0);
+ else
+ $final[$row] = $final;
+ }
+
+ $params['post'] = $final;
+ }
+
+ $params['action']=self::$action;
+
+ $params['language_id']= $languages_id;
+
+ if( sqlcontent::update( $params ) != 1 )
+ throw new Exception(__('@cms_content error in update process')) ;
+
+ $messageStack->add_session(__('@cms_content success in update process'), 'success');
+
+ // display value for return
+ echo $_REQUEST['value'];
+ }
+ catch (Exception $e) {
+
+ $messageStack->add_session($e->getMessage() , 'error');
+ }
+ break;
+ case 'setflag':
+ if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
+ if (isset($_GET['cID'])) {
+ sqlcontent::update(array('id'=>(int)$_GET['cID'], 'sqlarray'=>array('content_status' => (int) $_GET['flag'] )));
+ }
+ }
+
+ $messageStack->add(__('@cms_content update status'), 'success');
+
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(self::FILENAME) );
+ break;
+
+ case 'insert':
+ case 'save':
+ if (isset($_GET['cID'])) $currency_id = tep_db_prepare_input((int)$_GET['cID']);
+ $title = tep_db_prepare_input($_POST['title']);
+ $code = tep_db_prepare_input($_POST['code']);
+
+/**
+ TODO traiter charste avec config
+*/
+ $symbol_right = htmlentities(tep_db_prepare_input($_POST['symbol_right']),ENT_NOQUOTES,'UTF-8');
+ $symbol_left = htmlentities(tep_db_prepare_input($_POST['symbol_left']),ENT_NOQUOTES,'UTF-8');
+
+ $decimal_point = tep_db_prepare_input($_POST['decimal_point']);
+ $thousands_point = tep_db_prepare_input($_POST['thousands_point']);
+ $decimal_places = tep_db_prepare_input($_POST['decimal_places']);
+ $value = tep_db_prepare_input($_POST['value']);
+
+ $sql_data_array = array('title' => $title,
+ 'code' => $code,
+ 'symbol_left' => $symbol_left,
+ 'symbol_right' => $symbol_right,
+ 'decimal_point' => $decimal_point,
+ 'thousands_point' => $thousands_point,
+ 'decimal_places' => $decimal_places,
+ 'value' => $value);
+
+ if (self::$action == 'insert') {
+ $res=tep_db_perform(TABLE_CURRENCIES, $sql_data_array);
+ $currency_id = tep_db_insert_id($res);
+ } elseif (self::$action == 'save') {
+ tep_db_perform(TABLE_CURRENCIES, $sql_data_array, 'update', "reviews_id = '" . (int)$currency_id . "'");
+ }
+
+ if (isset($_POST['default']) && ($_POST['default'] == 'on')) {
+ tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($code) . "' where configuration_key = 'DEFAULT_CURRENCY'");
+ }
+
+ tep_redirect(tep_href_link(self::FILENAME, 'cID=' . $currency_id));
+ break;
+ case 'deleteconfirm':
+ $reviews_id = tep_db_prepare_input($_GET['cID']);
+
+ $currency_query = tep_db_query("select reviews_id from " . TABLE_CURRENCIES . " where code = '" . DEFAULT_CURRENCY . "'");
+ $currency = tep_db_fetch_array($currency_query);
+
+ if ($currency['reviews_id'] == $reviews_id) {
+ tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '' where configuration_key = 'DEFAULT_CURRENCY'");
+ }
+
+ tep_db_query("delete from " . TABLE_CURRENCIES . " where reviews_id = '" . (int)$reviews_id . "'");
+
+ tep_redirect(tep_href_link(self::FILENAME));
+ break;
+ case 'update':
+ $server_used = CURRENCY_SERVER_PRIMARY;
+
+ $currency_query = tep_db_query("select reviews_id, code, title from " . TABLE_CURRENCIES);
+ while ($currency = tep_db_fetch_array($currency_query)) {
+ $quote_function = 'quote_' . CURRENCY_SERVER_PRIMARY . '_currency';
+ $rate = $quote_function($currency['code']);
+
+ if (empty($rate) && (tep_not_null(CURRENCY_SERVER_BACKUP))) {
+ $messageStack->add_session(sprintf(__('warning primary server failed'), CURRENCY_SERVER_PRIMARY, $currency['title'], $currency['code']), 'warning');
+
+ $quote_function = 'quote_' . CURRENCY_SERVER_BACKUP . '_currency';
+ $rate = $quote_function($currency['code']);
+
+ $server_used = CURRENCY_SERVER_BACKUP;
+ }
+
+ if (tep_not_null($rate)) {
+ tep_db_query("update " . TABLE_CURRENCIES . " set value = '" . $rate . "', last_updated = now() where reviews_id = '" . (int)$currency['reviews_id'] . "'");
+
+ $messageStack->add_session(sprintf(__('text info currency updated'), $currency['title'], $currency['code'], $server_used), 'success');
+ } else {
+ $messageStack->add_session(sprintf(__('error currency invalid'), $currency['title'], $currency['code'], $server_used), 'error');
+ }
+ }
+
+ tep_redirect(tep_href_link(self::FILENAME, 'cID=' . $_GET['cID']));
+ break;
+ case 'delete':
+ $reviews_id = tep_db_prepare_input($_GET['cID']);
+
+ $currency_query = tep_db_query("select code from " . TABLE_CURRENCIES . " where reviews_id = '" . (int)$reviews_id . "'");
+ $currency = tep_db_fetch_array($currency_query);
+
+ $remove_currency = true;
+ if ($currency['code'] == DEFAULT_CURRENCY) {
+ $remove_currency = false;
+ $messageStack->add(__('error remove default currency'), 'error');
+ }
+ break;
+ }
+
+ return self::$action;
+ }
+
+ public function get_header(){
+ }
+
+
+ /**
+ @fn featured::GetDBValue();
+ @brief return DB value adapted for current action
+ Use self::action for determine switch
+ @return
+ */
+ public static function GetDBValue(){
+
+ $DB=Database::getInstance();
+
+
+ $action=self::$action;
+
+ switch ($action) {
+
+ /**
+ @remarks Ajax View result
+ */
+ case 'setflag':
+ break;
+ case 'viewflag':
+ break;
+
+
+ /**
+ @remarks Normal View Page
+ */
+ case 'delete':
+ case 'detail':
+ case 'edit':
+ case 'new':
+ global $language_id;
+
+ if( (int)self::$Id > 0) {
+ $res = sqlcontent::fetch(array('id'=>self::$Id,'language_id'=>$language_id), true);
+ }
+ else{
+ $res = sqlcontent::Specimen(true);
+ }
+
+ $res= self::FormatDBValue($res);
+
+ return $res;
+ break;
+
+ default:
+
+
+ /**
+ @remarks retrun object load one inventaire
+ */
+ global $query_numrows, $languages_id;
+ $adjust=new objectInfo(self::$InitInfo['adjust']);
+
+
+ /**
+ @remarks replace id by name col
+ */
+ if(!empty($adjust->sWhere)) {
+
+ foreach(self::$allfields as $key=>$row){
+ if(is_array($row) && isset($row['alias']) ){
+ $k[] = '#[(]'.$row['alias'].'[)]#i';
+ $k[] = '# '.$row['alias'].' #i';
+ $k[] = '# \.'.$row['alias'].'#i';
+
+ $v[] = '('.$key.')';
+ $v[] = ' '.$key.' ';
+ $v[] = '.'.$key.' ';
+ }
+ }
+
+ if(isset($k))
+ $adjust->sWhere = preg_replace($k,$v, $adjust->sWhere);
+ }
+// $reviews_query_raw = "select reviews_id, products_id, date_added, last_modified, reviews_rating from " . TABLE_REVIEWS . " ".$clause_where." order by ".((isset($_GET['sort_by'])) ? $_GET['sort_by'] : 'date_added DESC');
+ $query_raw = "SELECT ".$adjust->listfields.", c.reviews_id as id FROM " . TABLE_REVIEWS . " c ".
+ " LEFT JOIN " . TABLE_REVIEWS_TO . " ct USING(reviews_id) ".
+ " LEFT JOIN " . TABLE_REVIEWS_DESCRIPTION . " cd ON(c.reviews_id =cd.reviews_id AND cd.languages_id='".(int)$adjust->languages_id."') ";
+
+
+ $query_raw .=((strlen($adjust->sWhere)>4) ? " WHERE ".substr($adjust->sWhere, 3) : '').
+ " GROUP BY c.reviews_id ";
+
+ $query_raw .=" ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' c.date_added DESC ');
+
+ $_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
+ $_query = $DB->query($query_raw);
+
+ $res=self::FormatDBValue($_query);
+
+ return $res;
+
+ }
+ }
+
+ public function display_view(){
+ $action=self::$action;
+
+ switch ($action) {
+
+ /**
+ @remarks Ajax View result
+ */
+ case 'update_cell':
+ break;
+ case 'setflag':
+ return self::RowStatus(array('status'=>(int)$_GET['flag'], 'id'=>(int)self::$Id));
+ break;
+ case 'viewflag':
+ return self::RowHidden(array('hidden'=>(int)$_GET['flag'], 'id'=>(int)self::$Id));
+ break;
+ /**
+ @remarks Ajax View result
+ */
+ case 'isValidKey':
+ $stringkey = tep_db_prepare_input($_REQUEST['stringkey']) ;
+
+ if( ! (bool)self::$list['isValidKey'])
+ $print = tep_draw_input_field('content_name', '', (string)$stringkey , ' class="inline error" ');
+ else
+ $print = $stringkey. tep_draw_hidden_field('content_name', '', (string)$stringkey, ' ');
+
+ return $print;
+ break;
+
+ /**
+ @remarks Normal View Page
+ */
+
+ case 'delete':
+ case 'edit':
+ self::$Info=self::GetDBValue(self::$Id);
+ /// use master gabarit
+// return MGabCont::CallGab(self::$action,__FUNCTION__,__CLASS__);
+ return MGabCont::CallGab(self::$action,__FUNCTION__,self::MASTER);
+ break;
+ case 'new':
+ self::$Info=self::load_db_values(-1);
+ return MGabCont::CallGab(self::$action,__FUNCTION__,__CLASS__);
+ break;
+ default:
+ self::$list=self::tep_get_list();
+ /// use master gabarit
+
+ return MGabCont::CallGab('listing',__FUNCTION__,self::MASTER);
+ }
+
+ }
+
+
+ /** static InterfacedInnerHtml */
+
+ /**
+ @fn detail_row_page($id)
+ @brief call Ajax , detail of line in listing
+ @param $id int content_id
+ */
+ public static function detail_row_page($id){
+ self::$action ='detail';
+
+ self::GetConf();
+
+ self::$Id= (int)$id;
+
+ self::GetDBValue();
+
+ return MGabCont::CallGab('inline','display_view',__CLASS__);
+
+ }
+
+ /**
+ @fn tep_get_list($page=1,$rowbyp=10,$sOrder='',$sWhere='',$options='')
+ @brief Constructeur listing element cms content
+ @param $page integer default(1) split page
+ @param $rowbyp integer default(10) nbr line in page
+ @param $sOrder string | null
+ @param $sWhere string | null
+ @param $options array
+ @return Array
+ */
+ public static function tep_get_list($page=1,$rowbyp=10,$sOrder='',$sWhere='',$options=''){
+
+ global $query_numrows;
+
+ /// @remarks force load conf
+ self::GetConf();
+
+ $res=array();
+
+ /**
+ @remarks adjust param for sql requete
+ */
+ self::$InitInfo['adjust']['page']=$page;
+ self::$InitInfo['adjust']['rowbyp']=$rowbyp;
+ self::$InitInfo['adjust']['sOrder'].=$sOrder;
+ self::$InitInfo['adjust']['sWhere'].=$sWhere;
+ self::$InitInfo['adjust']['options']=$options;
+
+ $res = self::GetDBValue();
+
+ self::$list= $query_numrows ; //= count($res);
+
+ return $res;
+ }
+
+
+ /**
+ @fn get_item_action($content)
+ @brief private model for row action
+ @param $content array
+ */
+ public static function ButtonRowsActions($content){
+ return sprintf(
+ CsrtAction::getFormat('row_action'),
+ self::$modules->display_ColumnRowAction($content['id']) ,
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME, 'cID=' . $content['id'] . '&action=edit') ,'' ).
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $content['id'] . '&action=delete') ,'' )
+ );
+ }
+
+ /**
+ @fn get_item_status($content)
+ @brief private model for row status
+ @param $content array
+ */
+ public static function RowStatus($content){
+ $exclude=array('action','cID','forceajax','type','class','function','funct', 'mod');
+ $query_s='action=setflag&cID=' . $content['id'].'&flag=';
+
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($content['status'] == '1')? '0' : '1') ) . '">'.
+ sprintf(
+ CsrtAction::getFormat('row_flag'),
+ (int)$content['status'],
+ ( ($content['status'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ ).
+ '</a>';
+ }
+
+ /**
+ @brief return Filename
+ */
+ public static function GetFILENAME(){
+ return self::FILENAME;
+ }
+
+
+ /**
+ @fn HrefLink($id, $action='edit')
+ @brief retrun link specififc this data
+ @param $id integer OR Array !!
+ @param $action string (defaut: edit)
+ @param $key not used
+ @param $params string other args passed in GET format and prev &
+ @return links
+ */
+ public static function HrefLink($id, $action='edit', $key='', $params=''){
+ if(is_array($id)){
+ $action = ((!isset($id['action']) || empty($id['action']))? 'edit' : $id['action'] );
+ $params = ((!isset($id['params']) || empty($id['params']))? '' : $id['params'] );
+ $id = $id['id'];
+ }
+
+ return tep_href_link( self::FILENAME,'pID='.$id.'&action='.$action . $params );
+ }
+
+
+
+ /**
+ @brief format db value for display page
+ @param $_query ressource db sql
+ @return array
+ */
+ private static function FormatDBValue($_query){
+ $DB=Database::getInstance();
+ $res=array();
+
+ switch (self::$action) {
+ case 'listing':
+ global $query_numrows,$languages_id;
+
+ while ($item = $_query->fetchAssoc()) {
+ $ord =array();
+
+
+ $item[1]=tep_draw_checkbox_field('action_multi['.$item['id'].']','action_mutli_'.$item['id'],$item['id']);
+
+ foreach(self::$InitInfo['modele']['listing'] as $k=>$row){
+ if($k == 'action') $ord[$k]=self::ButtonRowsActions($item);
+ elseif($k == 'status') $ord[$k]=self::RowStatus($item);
+ elseif($k == 'hidden') $ord[$k]=self::RowHidden($item);
+ elseif(in_array($k,array('added', 'modified') ) )$ord[$k]=((isset($item[$k]) && $item[$k] !='1000-01-01 00:00:00' )? tep_date_short($item[$k]) : '' );
+ else $ord[$k]=$item[$k];
+ }
+
+ $ord[0]=$item['id'];
+
+
+ $res[]=$ord;
+ }
+ break;
+ case 'new':
+ case 'edit';
+ default:
+ global $languages_id;
+
+ $ord =array();
+
+ if(is_object($_query)){
+ $res = new stdClass;
+ foreach($_query as $key=>$row) {
+ switch($key){
+ case 'lg':
+ foreach($row as $ke=>$ro){
+ foreach($ro as $k=>$r){
+
+ if( ($new_r = self::GetEditFieldsDefine($k) ) && $new_r !=false ){
+ $new_r['input_value'][$ke] = $r;
+ $edit = 'edit_'.$k;
+ $res->$edit = new objectInfo($new_r);
+ }
+
+ $res->$k = $r;
+ }
+ }
+ break;
+
+// case 'barcode_type':
+
+ default:
+
+ if( ($new_r = self::GetEditFieldsDefine($key) ) && $new_r !=false ){
+ $new_r['input_value'] = $row;
+ $edit = 'edit_'.$key;
+ $res->$edit = new objectInfo($new_r);
+ }
+
+ $res->$key = $row;
+ }
+ }
+ }
+
+ }
+
+ return $res;
+ }
+
+
+
+
+/** Interface module */
+
+ function check() { return false; }
+ function install() { return false; }
+ function remove() { return false; }
+ function keys() { return false; }
+}
+
+?>
\ No newline at end of file
Modified: trunk/extensions/REVIEWS_stable/install.xml
===================================================================
--- trunk/extensions/REVIEWS_stable/install.xml 2013-10-23 12:40:29 UTC (rev 4901)
+++ trunk/extensions/REVIEWS_stable/install.xml 2013-10-23 13:06:13 UTC (rev 4902)
@@ -12,6 +12,12 @@
<version>3.2</version>
</description>
+ <perms>
+ <page>reviews</page>
+ <action>edit</action>
+ <action>view</action>
+ <action>delete</action>
+ <perms>
<add2end>
<file name="admin/includes/database_tables.php" />
@@ -29,9 +35,10 @@
</add2endlg>
<addfile>
- <file name="admin/includes/content/reviews.top.inc" />
- <file name="admin/includes/content/reviews.central.inc" />
+<!-- <file name="admin/includes/content/reviews.top.inc" />
+ <file name="admin/includes/content/reviews.central.inc" />-->
+ <file name="admin/includes/modules/pages/reviews.php" />
<file name="admin/includes/modules/account/reviews.php" />
<file name="admin/includes/modules/products/reviews.php" />
@@ -47,7 +54,8 @@
<!-- Lang -->
<addfilelg>
- <file name="admin/includes/languages/%LANGUAGE%/reviews.php" lgref="fr_FR"/>
+<!-- <file name="admin/includes/languages/%LANGUAGE%/reviews.php" lgref="fr_FR"/> -->
+ <file name="admin/includes/languages/%LANGUAGE%/modules/pages/reviews.txt" lgref="fr_FR"/>
<file name="admin/includes/languages/%LANGUAGE%/modules/account/reviews.txt" lgref="fr_FR"/>
<file name="admin/includes/languages/%LANGUAGE%/modules/products/reviews.php" lgref="fr_FR"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-23 12:40:32
|
Revision: 4901
http://sourceforge.net/p/oscss/svn/4901
Author: oscim
Date: 2013-10-23 12:40:29 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Fix install
Modified Paths:
--------------
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql
Added Paths:
-----------
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_orders_products.sql
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2013-10-23 12:39:24 UTC (rev 4900)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2013-10-23 12:40:29 UTC (rev 4901)
@@ -365,9 +365,9 @@
-- insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type) values ('ORDERS_NUMBER_PREFIX_S', 'ORDERS_NUMBER_PREFIX', 'ym-5', 'ORDERS_NUMBER_PREFIX_L', '129', '0', NULL, NOW(), '5');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('USE_LOCAL_GENERAT_ORDER_REF_S', 'USE_LOCAL_GENERAT_ORDER_REF', 'true', 'USE_LOCAL_GENERAT_ORDER_REF_L', '129', '5', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','3');
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type, set_function) values ('USE_MODELE_NUMREF_ORDERS_S', 'USE_MODELE_NUMREF_ORDERS', 'poisson', 'USE_MODELE_NUMREF_ORDERS_L', '129', '0', NULL, NOW(), '5', 'tep_cfg_pull_down_numref_mod(\'orders\',');
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type, set_function) values ('USE_MODELE_NUMREF_BILLS_S', 'USE_MODELE_NUMREF_BILLS', 'sakura', 'USE_MODELE_NUMREF_BILLS_L', '129', '0', NULL, NOW(), '5', 'tep_cfg_pull_down_numref_mod(\'bills\',');
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type, set_function) values ('USE_MODELE_NUMREF_SHIPPING_S', 'USE_MODELE_NUMREF_SHIPPING', 'shikamaru', 'USE_MODELE_NUMREF_SHIPPING_L', '129', '0', NULL, NOW(), '5', 'tep_cfg_pull_down_numref_mod(\'shipping\',');
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type, set_function) values ('USE_MODELE_NUMREF_SERVICE_S', 'USE_MODELE_NUMREF_SERVICE', '', 'USE_MODELE_NUMREF_SERVICE_L', '129', '0', NULL, NOW(), '5', 'tep_cfg_pull_down_numref_mod(\'services\',');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type, set_function) values ('USE_MODELE_NUMREF_ORDERS_S', 'USE_MODELE_NUMREF_ORDERS', 'poisson', 'USE_MODELE_NUMREF_ORDERS_L', '129', '0', NULL, NOW(), '2', 'tep_cfg_pull_down_numref_mod(\'orders\',');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type, set_function) values ('USE_MODELE_NUMREF_BILLS_S', 'USE_MODELE_NUMREF_BILLS', 'sakura', 'USE_MODELE_NUMREF_BILLS_L', '129', '0', NULL, NOW(), '2', 'tep_cfg_pull_down_numref_mod(\'bills\',');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type, set_function) values ('USE_MODELE_NUMREF_SHIPPING_S', 'USE_MODELE_NUMREF_SHIPPING', 'shikamaru', 'USE_MODELE_NUMREF_SHIPPING_L', '129', '0', NULL, NOW(), '2', 'tep_cfg_pull_down_numref_mod(\'shipping\',');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type, set_function) values ('USE_MODELE_NUMREF_SERVICE_S', 'USE_MODELE_NUMREF_SERVICE', '', 'USE_MODELE_NUMREF_SERVICE_L', '129', '0', NULL, NOW(), '2', 'tep_cfg_pull_down_numref_mod(\'services\',');
COMMIT;
Modified: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql 2013-10-23 12:39:24 UTC (rev 4900)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql 2013-10-23 12:40:29 UTC (rev 4901)
@@ -323,3 +323,7 @@
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type, set_function) values ('USE_MODELE_NUMREF_ORDERS_S', 'USE_MODELE_NUMREF_ORDERS', 'poisson', 'USE_MODELE_NUMREF_ORDERS_L', '129', '0', NULL, NOW(), '2', 'tep_cfg_pull_down_numref_mod(\'orders\',');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type, set_function) values ('USE_MODELE_NUMREF_BILLS_S', 'USE_MODELE_NUMREF_BILLS', 'sakura', 'USE_MODELE_NUMREF_BILLS_L', '129', '0', NULL, NOW(), '2', 'tep_cfg_pull_down_numref_mod(\'bills\',');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type, set_function) values ('USE_MODELE_NUMREF_SHIPPING_S', 'USE_MODELE_NUMREF_SHIPPING', 'shikamaru', 'USE_MODELE_NUMREF_SHIPPING_L', '129', '0', NULL, NOW(), '2', 'tep_cfg_pull_down_numref_mod(\'shipping\',');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type, set_function) values ('USE_MODELE_NUMREF_SERVICE_S', 'USE_MODELE_NUMREF_SERVICE', '', 'USE_MODELE_NUMREF_SERVICE_L', '129', '0', NULL, NOW(), '2', 'tep_cfg_pull_down_numref_mod(\'services\',');
\ No newline at end of file
Added: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_orders_products.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_orders_products.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_orders_products.sql 2013-10-23 12:40:29 UTC (rev 4901)
@@ -0,0 +1,16 @@
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2012 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
+
+ALTER TABLE osc_orders_products_attributes ADD products_options_id INT( 11 ) NOT NULL ,
+ADD products_options_values_id INT( 11 ) NOT NULL ;
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-23 12:39:27
|
Revision: 4900
http://sourceforge.net/p/oscss/svn/4900
Author: oscim
Date: 2013-10-23 12:39:24 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Clean install ; stabilise process and CRUD
Modified Paths:
--------------
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/classes/drivers/sqlmanufacturer.php
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/manufacturers.txt
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/modules/pages/manufacturers.php
trunk/extensions/MANUFACTURERS_stable/install.xml
Added Paths:
-----------
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/gabarit/manufacturers/display_view.quickedit.gab
Removed Paths:
-------------
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/gabarit/manufacturers/display_view.edit.gab
Modified: trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/classes/drivers/sqlmanufacturer.php
===================================================================
--- trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/classes/drivers/sqlmanufacturer.php 2013-10-23 08:21:18 UTC (rev 4899)
+++ trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/classes/drivers/sqlmanufacturer.php 2013-10-23 12:39:24 UTC (rev 4900)
@@ -45,6 +45,9 @@
$sql_data_array['manufacturers_image'] = tep_db_prepare_input($option['image']);
// $sql_data_array['manufacturersvisible'] = (isset($option['visible'])) ? tep_db_prepare_input($option['visible']) :'0';
+
+ $sql_data_array['date_added']='NOW()';
+
$res=tep_db_perform(TABLE_MANUFACTURERS, $sql_data_array);
$id = $res->__get('insertId');
@@ -75,8 +78,7 @@
$DB=Database::getInstance();
$error= 0;
-// print_r($option);
-// exit;
+
if(!isset($option['id']))
return false;
@@ -96,13 +98,17 @@
if(isset($dataarray['image']))
$sql_data_array['manufacturers_image'] = tep_db_prepare_input($dataarray['image']);
+
$DB->beginTransaction();
- if(count($sql_data_array) > 0 )
+ if(count($sql_data_array) > 0 ){
+ $sql_data_array['last_modified']='NOW()';
+
if( ! tep_db_perform(TABLE_MANUFACTURERS, $sql_data_array, 'update' , substr($where,3) ) )
$error++;
+ }
+
-
foreach(tep_get_languages() as $lg) {
$row = $option['langue'];
Deleted: trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/gabarit/manufacturers/display_view.edit.gab
===================================================================
--- trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/gabarit/manufacturers/display_view.edit.gab 2013-10-23 08:21:18 UTC (rev 4899)
+++ trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/gabarit/manufacturers/display_view.edit.gab 2013-10-23 12:39:24 UTC (rev 4900)
@@ -1,74 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 11/05/2012 ,15:04:13
- @author genrated by GenerCode
- @encode UTF-8
-*/
-?>
-<h3><?php echo __('@manufacturers heading title edit'); ?></h3>
-
-<div class="box_uniq block_form">
-<?php echo tep_draw_form('manufacturers', manufacturers::FILENAME, 'action='.((manufacturers::$action == 'new')?'insert' : 'update&cID='.$_GET['cID']), 'post') ?>
-
-
- <div id="tabs">
- <ul>
- <li><a href="#tabs-1"><?php echo __('@manufacturers tab specification'); ?></a></li>
- </ul>
-
- <div class="fleft w_70">
- <div id="tabs-1" class="tabPage">
-
- <p class="block_input">
- <Label><?php echo __('@manufacturers text info name') ?></label>
- <?php echo tep_draw_input_field('name', '', manufacturers::$Info->name,'', true) ?>
- </p>
-
- <div class="tabs_lang">
- <ul>
- <?php foreach(tep_get_languages() as $lg): ?>
- <li>
- <a href="#fieldset_<?php echo $lg['id'] ?>">
- <?php echo tep_language_image($lg['directory'] . '/images/' .$lg['image'], $lg['name']); ?>
- </a>
- </li>
- <?php endforeach; ?>
- </ul>
- <?php foreach(tep_get_languages() as $lg): ?>
- <fieldset id="fieldset_<?php echo $lg['id'] ?>" class="block_field">
- <p class="block_input">
- <label for="<?php echo 'url' . $lg['id']; ?>"><?php echo __('@manufacturers text info url'); ?></label>
- <?php echo tep_draw_input_field('url[' . $lg['id'] . ']', 'url_' . $lg['id'], manufacturers::$Info->lg[ $lg['id']]->url, 'size="70"', false) ; ?>
- </p>
- </fieldset>
- <?php endforeach; ?>
- </div>
-
- </div>
- </div>
-
- <div class="fleft w_30">
-
- <p class="block_input">
- <?php echo '<a class="button browser" href="#" onclick="'.tep_get_filebroswerserveur("image", "image", '').'return false;">'.tep_draw_input_field('image','', manufacturers::$Info->image ).' '.tep_image(DIR_WS_ICONS . 'icon_browser.png', PARCOURIR_SERVER) .'</a>'; ?>
- </p>
-
- <p class="block_input button_nav">
- <?php
- echo tep_image_submit('', IMAGE_UPDATE) /*. tep_image_submit('', IMAGE_UPDATE_AND_CLOSE,' name="up_and_close"' )*/;
- echo tep_js_back(tep_href_link(manufacturers::FILENAME), IMAGE_CANCEL) ;
- ?>
- </p>
- </div>
-
-
-
- <br class="clear" />
- </div>
-
-</form>
-</div>
Added: trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/gabarit/manufacturers/display_view.quickedit.gab
===================================================================
--- trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/gabarit/manufacturers/display_view.quickedit.gab (rev 0)
+++ trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/gabarit/manufacturers/display_view.quickedit.gab 2013-10-23 12:39:24 UTC (rev 4900)
@@ -0,0 +1,47 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 11/05/2012 ,15:04:13
+ @author genrated by GenerCode
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('@manufacturers heading title edit'); ?></h3>
+
+<div class="box_uniq block_form">
+<?php echo tep_draw_form('manufacturers', manufacturers::FILENAME, 'action=insert', 'post') ?>
+
+
+ <div >
+
+ <p class="block_input">
+ <Label><?php echo __('@manufacturers table heading title') ?></label>
+ <?php echo tep_draw_input_field('name', '', manufacturers::$Info->name,'', true) ?>
+ </p>
+
+
+
+
+
+
+ <p class="block_input button_nav">
+
+ <?php echo tep_draw_hidden_field('origin', '',@$_GET['origin']); ?>
+
+ <?php
+ echo tep_image_submit('', __('@manufacturers image add and edit')) . tep_image_submit('', IMAGE_UPDATE_AND_CLOSE,' name="up_and_close"' );
+ echo tep_js_back(tep_href_link(manufacturers::FILENAME), IMAGE_CANCEL) ;
+ ?>
+ </p>
+
+
+
+
+ <br class="clear" />
+ </div>
+
+</form>
+</div>
Modified: trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/manufacturers.txt
===================================================================
--- trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/manufacturers.txt 2013-10-23 08:21:18 UTC (rev 4899)
+++ trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/manufacturers.txt 2013-10-23 12:39:24 UTC (rev 4900)
@@ -24,15 +24,21 @@
$lang['@manufacturers table heading last click'] = "Derniers click";
-/* Edit */
+/* Edit & quickEdit */
/* title */
$lang['@manufacturers heading title edit'] = "Fiche Edition - Fabricant ";
/* tabs */
$lang['@manufacturers tab data'] = "Caractéristique ";
- /* entry */
+ /* Bt */
+ $lang['@manufacturers image add and edit'] = "Enregistrer et editer ";
+ /* message */
+ $lang['@manufacturers success in create process'] = "Création fabricant effectué ";
+ $lang['@manufacturers error in create process'] = "Erreur lors de la creation du fabricant ";
+ $lang['@manufacturers error in update process'] = "Erreur lors de la mise a jour ";
+ $lang['@manufacturers success in update process'] = "Mise à jour fabricant effectué ";
+ $lang['@manufacturers error load data'] = "Erreur de chargement du fabricant";
-
/* Delete */
$lang['@manufacturers heading title delete'] = "Supprimer ce fabricant";
Modified: trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/modules/pages/manufacturers.php
===================================================================
--- trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/modules/pages/manufacturers.php 2013-10-23 08:21:18 UTC (rev 4899)
+++ trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/modules/pages/manufacturers.php 2013-10-23 12:39:24 UTC (rev 4900)
@@ -136,23 +136,27 @@
'alias'=>'clicked',
'sort'=>true,
'text'=>__('@manufacturers table heading url clicked'),
+ 'class'=>'tcenter',
);
self::$allfields['mi.date_last_click'] = array(
'alias'=>'last_click',
'sort'=>false,
'text'=>__('@manufacturers table heading last click'),
+ 'class'=>'tcenter',
);
self::$allfields['c.date_added'] = array(
'sort'=>true,
'text'=>__('@manufacturers table heading date added'),
'width'=>'8%',
+ 'class'=>'tcenter',
);
self::$allfields['c.last_modified'] = array(
'sort'=>true,
'text'=>__('@manufacturers table heading last modified'),
'width'=>'8%',
+ 'class'=>'tcenter',
);
@@ -257,11 +261,12 @@
throw new Exception(__('@cms_content ref is already used') ) ;
}
- $modele = array_keys(sqlmanufacturer::Specimen());
+
+ $modele = sqlmanufacturer::Specimen(true);
$params = array();
$params['id'] = $_REQUEST['id'];
- if( in_array($_REQUEST['columnName'], $modele) )
+ if( isset($modele->$_REQUEST['columnName']) )
$params['sqlarray'] = array(
$_REQUEST['columnName'] => (isset($_REQUEST['value']) ? tep_db_prepare_input($_REQUEST['value']) : 0)
);
@@ -315,7 +320,12 @@
tep_redirect(tep_href_link(self::FILENAME, 'cID=' . $_GET['cID']));
break;
+
+
+ /**
+ */
case 'insert':
+ try {
$myarray = array(
'name'=>tep_db_prepare_input($_POST['name']),
);
@@ -335,9 +345,28 @@
$myarray['image'] = $sqli->rowid;
}
- sqlmanufacturer::create($myarray);
+ if( ($id = sqlmanufacturer::create($myarray) ) && $id <=0 )
+ throw new Exception(__('@manufacturers error in create process') ) ;
+ else
+ $messageStack->add_session( __('@manufacturers success in create process') , 'success');
- tep_redirect(tep_href_link(self::FILENAME ));
+ if(isset($_POST['up_and_close']) ){
+ // by popup ajax
+ if(isset($_POST['origin']) )
+ tep_redirect(tep_href_link($_POST['origin']));
+ }
+ else
+ tep_redirect(tep_href_link(self::FILENAME, 'cID=' . $id.'&action=edit'));
+
+
+
+ }
+ catch (Exception $e) {
+ $messageStack->add_session($e->getMessage() , 'error');
+ }
+
+ // generic redirect if error
+ tep_redirect(tep_href_link(self::FILENAME) );
break;
case 'update':
@@ -347,22 +376,14 @@
if(self::$Id <=0 )
throw new Exception(__('@manufacturers error load data')) ;
-// $c_id =(int) tep_db_prepare_input($_GET['cID']);
-//
-// if ($c_id > 0){
$myarray = array();
$params['id']= self::$Id;
$params['action']=self::$action;
$params['post']=$_POST;
$params['language_id']= $languages_id;
-// if()
-// 'id'=>self::$Id,
-// 'name'=>tep_db_prepare_input($_POST['name']),
-// );
+ $params['sqlarray']['name']=tep_db_prepare_input($_POST['name']);
- $params['sqlarray']['name']=tep_db_prepare_input($_POST['manufacturers_name']);
-
foreach(tep_get_languages() as $row) {
$params['langue']['url'][$row['id']] = tep_db_prepare_input($_POST['url'][$row['id']]);
}
@@ -380,8 +401,9 @@
if( ! sqlmanufacturer::update($params) )
throw new Exception(__('@manufacturers error in update process') ) ;
+ else
+ $messageStack->add_session( __('@manufacturers success in update process') , 'success');
-
if(!isset($_POST['up_and_close']) )
tep_redirect(tep_href_link(self::FILENAME, 'cID=' . self::$Id.'&action=edit'));
@@ -423,10 +445,12 @@
*/
public static function GetDBValue(){
+
$DB= Database::getInstance();
switch (self::$action) {
+ case 'noedit':
case 'delete':
case 'edit':
case 'new':
@@ -472,7 +496,10 @@
@brief this methode is switch for call gabarit action
*/
public function display_view(){
- switch (parent::$action) {
+ $MG = true ; // use master gabarit
+ $action = parent::$action;
+
+ switch ($action) {
/**
@remarks Ajax View result
*/
@@ -486,25 +513,38 @@
/**
@remarks Normal View Page
*/
- case 'new':
+
+ case 'delete':
+ $MG = false;
self::$Info = self::GetDBValue();
- return MGabCont::CallGab('edit',__FUNCTION__,__CLASS__);
+
break;
- case 'edit':
+ case 'new_light':
self::$Info = self::GetDBValue();
- return MGabCont::CallGab(parent::$action,__FUNCTION__,self::MASTER);
+ $action = 'quickedit';
+ $MG = false;
break;
- case 'delete':
+
+
+ case 'new':
+ $action = 'edit';
self::$Info = self::GetDBValue();
- return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
break;
+ case 'noedit':
+ case 'edit':
+ self::$Info = self::GetDBValue();
+ break;
case 'listing':
default:
self::$list=self::tep_get_list();
- /// use master gabarit
- MGabCont::SetCurrentName(__CLASS__);
- return MGabCont::CallGab('listing',__FUNCTION__,self::MASTER);
+ $action ='listing';
}
+
+ /// use master gabarit
+ if($MG)
+ return MGabCont::CallGab($action,__FUNCTION__,self::MASTER);
+ else
+ return MGabCont::CallGab($action,__FUNCTION__,__CLASS__);
}
@@ -622,13 +662,25 @@
@return string html
*/
public static function ButtonRowsActions($item){
- return sprintf(
- CsrtAction::getFormat('row_action'),
-''
- ,
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'edit'), '', tep_href_link(self::FILENAME, 'cID=' . $item['id'] . '&action=edit') ,'' ).
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $item['id'] . '&action=delete') ,'' )
- );
+ $action_str_left='';
+ $action_str ='';
+
+
+ $action_str.=sprintf(CsrtAction::getLink('row_action_right', __('image view public') , 'publiclink'), '', tep_catalog_href_link('index.php', 'manufacturers_id=' . $item['id'],'SSL', true, 'forceview') ,' target="blank" ' );
+ $action_str.=sprintf(CsrtAction::getLink('row_action_right', IMAGE_DETAILS, 'noedit'), '', tep_href_link(self::FILENAME, 'cID=' . $item['id'] . '&action=noedit' ),'' );
+
+ if(tep_action_check('edit', self::FILENAME))
+ $action_str.= sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'edit'), '', tep_href_link(self::FILENAME, 'cID=' . $item['id'] . '&action=edit') ,'' );
+ if(tep_action_check('delete', self::FILENAME))
+ $action_str.= sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $item['id'] . '&action=delete') ,'' );
+
+
+ return sprintf(
+ CsrtAction::getFormat('row_action'),
+ $action_str_left
+ ,
+ $action_str
+ );
}
/**
Modified: trunk/extensions/MANUFACTURERS_stable/install.xml
===================================================================
--- trunk/extensions/MANUFACTURERS_stable/install.xml 2013-10-23 08:21:18 UTC (rev 4899)
+++ trunk/extensions/MANUFACTURERS_stable/install.xml 2013-10-23 12:39:24 UTC (rev 4900)
@@ -9,19 +9,29 @@
<post_install_notes><![CDATA[ ]]></post_install_notes>
</description>
+
+ <perms>
+ <page>manufacturers</page>
+ <action>edit</action>
+ <action>view</action>
+ <action>delete</action>
+ <perms>
+
<!-- Install new files -->
<addfile>
<file name="admin/includes/modules/pages/manufacturers.php" />
- <file name="admin/includes/modules/products/manufacturers.php" />
+<!-- <file name="admin/includes/modules/products/manufacturers.php" /> -->
<file name="admin/includes/classes/drivers/sqlmanufacturer.php" />
- <file name="admin/includes/gabarit/manufacturers/display_view.edit.gab" />
+<!-- <file name="admin/includes/gabarit/manufacturers/display_view.edit.gab" /> -->
+ <file name="admin/includes/gabarit/manufacturers/display_view.quickedit.gab" />
<file name="admin/includes/gabarit/manufacturers/display_view.delete.gab" />
<file name="admin/includes/gabarit/manufacturers/filter.manufacturer.gab" />
- <file name="admin/includes/gabarit/products/manufacturers/display_inline.edit.gab" />
+ <file name="admin/includes/gabarit/manufacturers/rightto.edit.gab" />
+<!-- <file name="admin/includes/gabarit/products/manufacturers/display_inline.edit.gab" /> -->
- <file name="admin/includes/javascript/modules/products/manufacturers.js.php" />
+<!-- <file name="admin/includes/javascript/modules/products/manufacturers.js.php" /> -->
<file name="common/classes/datatype_drivers/Data_manufacturer.php" />
@@ -35,7 +45,7 @@
<!-- LAng -->
<addfilelg>
<file name="admin/includes/languages/%LANGUAGE%/modules/pages/manufacturers.txt" lgref="fr_FR"/>
- <file name="admin/includes/languages/%LANGUAGE%/modules/products/manufacturers.txt" lgref="fr_FR" />
+<!-- <file name="admin/includes/languages/%LANGUAGE%/modules/products/manufacturers.txt" lgref="fr_FR" /> -->
</addfilelg>
<add2endlg>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-23 08:21:22
|
Revision: 4899
http://sourceforge.net/p/oscss/svn/4899
Author: oscim
Date: 2013-10-23 08:21:18 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/pages/categories.php
Modified: trunk/catalog/admin/includes/modules/pages/categories.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/categories.php 2013-10-22 12:13:37 UTC (rev 4898)
+++ trunk/catalog/admin/includes/modules/pages/categories.php 2013-10-23 08:21:18 UTC (rev 4899)
@@ -137,6 +137,16 @@
'default'=>true,
'width'=>'5%',
'class'=>'tcenter',
+ 'edit'=>array(
+ 'input_name'=>'categories_image',
+ 'input_type'=>'input@image',
+// 'input_size'=>'1',
+// 'class'=>'tleft',
+// 'select_values'=>$list_parent,
+ 'position_grp'=>4,
+ 'position_col'=>'right',
+ ),
+
);
self::$allfields['c.categories_cpath'] = array(
'sort'=>true,
@@ -162,6 +172,7 @@
'input_size'=>'1',
'class'=>'tleft',
'select_values'=>$list_parent,
+ 'position_col'=>'right',
),
);
self::$allfields['c.sort_order'] = array(
@@ -189,6 +200,7 @@
'input_size'=>'1',
'required_status'=>true,
'select_values'=>$dt,
+ 'position_col'=>'right',
),
);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-22 12:13:40
|
Revision: 4898
http://sourceforge.net/p/oscss/svn/4898
Author: oscim
Date: 2013-10-22 12:13:37 +0000 (Tue, 22 Oct 2013)
Log Message:
-----------
Fix new process datatype integration
Modified Paths:
--------------
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/classes/drivers/sqlmanufacturer.php
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/manufacturers.txt
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/modules/pages/manufacturers.php
Added Paths:
-----------
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/gabarit/manufacturers/rightto.edit.gab
Modified: trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/classes/drivers/sqlmanufacturer.php
===================================================================
--- trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/classes/drivers/sqlmanufacturer.php 2013-10-22 12:12:12 UTC (rev 4897)
+++ trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/classes/drivers/sqlmanufacturer.php 2013-10-22 12:13:37 UTC (rev 4898)
@@ -73,33 +73,60 @@
public static function update($option){
self::getInstance();
+ $DB=Database::getInstance();
+ $error= 0;
+// print_r($option);
+// exit;
if(!isset($option['id']))
- return 'id';
+ return false;
$where ='';
if(isset($option['id'])) $where .="AND manufacturers_id = '".(int)$option['id']."' ";
+ // Put post value
+ if(isset($option['post'])){
+ $post=$option['post'];
+ }
- if(isset($option['name']))$sql_data_array['manufacturers_name'] = tep_db_prepare_input($option['name']);
- if(isset($option['name']))$sql_data_array['manufacturers_image'] = tep_db_prepare_input($option['image']);
+ $dataarray = (array)$option['sqlarray'];
+ $sql_data_array = array();
- $res=tep_db_perform(TABLE_MANUFACTURERS, $sql_data_array, 'update' , substr($where,3) );
+ if(isset($dataarray['name']))
+ $sql_data_array['manufacturers_name'] = tep_db_prepare_input($dataarray['name']);
+ if(isset($dataarray['image']))
+ $sql_data_array['manufacturers_image'] = tep_db_prepare_input($dataarray['image']);
+ $DB->beginTransaction();
+ if(count($sql_data_array) > 0 )
+ if( ! tep_db_perform(TABLE_MANUFACTURERS, $sql_data_array, 'update' , substr($where,3) ) )
+ $error++;
+
+
foreach(tep_get_languages() as $lg) {
- $row = $option['langue'];
+ $row = $option['langue'];
- $where_lg .= $where . "AND languages_id = '".(int)$lg['id']."' ";
+ $where_lg .= $where . "AND languages_id = '".(int)$lg['id']."' ";
- $sql_data_array_lg = array(
- 'manufacturers_url'=> ((isset($row['url'][$lg['id']])) ? tep_db_prepare_input($row['url'][$lg['id']]) : '' ),
- );
+ $sql_data_array_lg = array();
- $res=tep_db_perform(TABLE_MANUFACTURERS_INFO, $sql_data_array_lg, 'update' , substr($where_lg,3));
+ if(isset($row['url'][$lg['id']]))
+ $sql_data_array_lg['manufacturers_url']= tep_db_prepare_input($row['url'][$lg['id']]);
+
+ if(count($sql_data_array_lg) > 0 )
+ if( ! tep_db_perform(TABLE_MANUFACTURERS_INFO, $sql_data_array_lg, 'update' , substr($where_lg,3)) )
+ $error++;
}
- return $res;
+ if( $error > 0){
+ $DB->rollbackTransaction();
+ return false;
+ }
+ else{
+ $DB->commitTransaction();
+ return 1;
+ }
}
/**
@@ -251,6 +278,43 @@
return $object;
}
+/**
+ @brief Function link to for contruct link featured vs datatype
+ @note normlised methode used in childs datatype
+ */
+ public static function ListLinkTo($opt){
+
+ if(!isset($opt['id']))
+ return false;
+ else
+ $id = (int)$opt['id'];
+
+
+
+ $DB=Database::getInstance();
+ $list = array();
+
+ $query = $DB->query($sql="SELECT manufacturers_id FROM " . TABLE_PRODUCTS . " where products_id='".(int)$id."' ");
+ foreach($query->fetchAllAssoc() as $row)
+ $list[] = new objectInfo( $row );
+
+
+
+ if(is_object($list))
+ $liste[]=$list;
+ else
+ $liste=$list;
+
+ return $liste;
+ }
+
+ /**
+ @brief Function link to for contruct link featued vs datatype
+ @note normlised methode used in childs datatype
+ */
+ public static function AddLinkTo($opt){
+ return true;
+ }
}
Added: trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/gabarit/manufacturers/rightto.edit.gab
===================================================================
--- trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/gabarit/manufacturers/rightto.edit.gab (rev 0)
+++ trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/gabarit/manufacturers/rightto.edit.gab 2013-10-22 12:13:37 UTC (rev 4898)
@@ -0,0 +1,43 @@
+<?php
+/**
+ @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.2
+ @date 108/10/2013, 09:32
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+global $oscss;
+
+$curr = MLinkTo::$currclass;
+
+$DB=Database::getInstance();
+$res = $DB->query("SELECT manufacturers_id as id, manufacturers_name as text FROM " . TABLE_MANUFACTURERS ." WHERE 1 ORDER BY manufacturers_name ASC" );
+$list = array( array('id' => '', 'text' => __('@manufacturers select') ) ) ;
+
+if($res->__get('numRows'))
+ foreach($res->fetchAllAssoc() as $row)
+ $list[] = $row;
+
+?>
+<div class="LinkToView MnufacturerView">
+ <label>
+ <span class="text"><?php echo __('@manufacturers txt link to'); ?></span>
+
+ <span class="button_nav">
+ <a
+ class="buttonimg fancy"
+ href="<?php echo tep_href_link(FILENAME_MANUFACTURERS, '&datatype='.MLinkTo::$current.'&action=new_light&origin='. urlencode($curr::FILENAME.'?'.MLinkTo::$origin) ) ?>"
+ title="<?php echo sprintf(__('@manufacturers add manufacturers datatype %s'), MLinkTo::$current )?>"
+ >
+ <?php echo tep_image(DIR_WS_ICONS.'icon_add_new.png' ) ?>
+ </a>
+ </span>
+ </label>
+
+ <p class="LinkToView">
+ <?php echo tep_draw_pull_down_menu('manufacturers_id', $list , $curr::$Info->manufacturer[0]->manufacturers_id, ' class="manufacturersselect " '); ?>
+ </p>
+
+</div>
\ No newline at end of file
Modified: trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/manufacturers.txt
===================================================================
--- trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/manufacturers.txt 2013-10-22 12:12:12 UTC (rev 4897)
+++ trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/manufacturers.txt 2013-10-22 12:13:37 UTC (rev 4898)
@@ -13,29 +13,36 @@
$lang['heading title manufacturers'] = "Listing Fabricants";
$lang['@manufacturers image add'] = "Ajouter un fabricant";
+ $lang['@manufacturers table heading id'] = "Id";
$lang['@manufacturers table heading title'] = "Nom";
$lang['@manufacturers table heading image'] = "Logo";
$lang['@manufacturers table heading date added'] = "Créer le";
$lang['@manufacturers table heading last modified'] = "Modifié le";
- $lang['table heading action'] = "Action";
+ $lang['@manufacturers table heading action'] = "Action";
$lang['@manufacturers table heading url'] = "Url";
$lang['@manufacturers table heading url clicked'] = "Nbr click";
$lang['@manufacturers table heading last click'] = "Derniers click";
/* Edit */
- $lang['@manufacturers heading title edit'] = "Fiche fabricant - Edition d'un Fabricant";
- $lang['@manufacturers tab specification'] = "Caractéristique";
- $lang['@manufacturers text info name'] = "Nom";
- $lang['@manufacturers text info url'] = "Url externe du fabicant";
- $lang['@manufacturers text info image'] = "Logo";
+ /* title */
+ $lang['@manufacturers heading title edit'] = "Fiche Edition - Fabricant ";
+ /* tabs */
+ $lang['@manufacturers tab data'] = "Caractéristique ";
+ /* entry */
+
+
/* Delete */
$lang['@manufacturers heading title delete'] = "Supprimer ce fabricant";
+/* rightto */
+ $lang['@manufacturers txt link to'] = "Fabricants" ;
+ $lang['@manufacturer link %s to %s'] = "Fabricants" ;
+ $lang['@manufacturers select']='Pas de fabricant';
-// $lang['text delete image']='Suppprimer l\'image du fabricant ?';
+
// $lang['text delete products']='Supprimer tous les produits de ce fabricant ? (en incluant les critiques, produits en promotion, produits à venir)';
// $lang['text delete warning products']='<strong>ATTENTION :</strong> Il reste %s produit(s) liées à ce fabricant !';
// $lang['image insert manfufactured']='Ajouter un fabricant';
Modified: trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/modules/pages/manufacturers.php
===================================================================
--- trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/modules/pages/manufacturers.php 2013-10-22 12:12:12 UTC (rev 4897)
+++ trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/modules/pages/manufacturers.php 2013-10-22 12:13:37 UTC (rev 4898)
@@ -28,14 +28,6 @@
*/
public static $list=array();
- /**
- @var current object
- */
- public static $Info;
- /**
- @var array info all tabs for filter listings
- */
- public static $allfields = array();
/**
@@ -58,6 +50,9 @@
self::$action=(isset($_REQUEST['action'])? (string)$_REQUEST['action'] : 'listing' );
self::$Id=(isset($_REQUEST['cID'])? (int)$_REQUEST['cID'] : 0 );
+ // instancie MLinkTo
+ MLinkTo::getInstance(self::$datatype);
+
/**
@remarks define var execution sql in GetDBValue()
*/
@@ -70,7 +65,9 @@
);
+ MGabCont::SetCurrentName(__CLASS__);
+
/**
@remarks not load if not first init
*/
@@ -91,24 +88,48 @@
@remarks this define col theader title, and ajust html code
Just for Edit listing
*/
+ self::$allfields['c.manufacturers_id'] = array(
+ 'sort'=>true,
+ 'alias'=>'id',
+ 'text'=>__('@manufacturers table heading id'),
+ 'width'=>'8%',
+ 'default'=>true,
+ );
self::$allfields['c.manufacturers_name'] = array(
'sort'=>true,
- 'alias'=>'title',
+ 'alias'=>'name',
'text'=>__('@manufacturers table heading title'),
'default'=>true,
'width'=>'35%',
+ 'edit'=>array(
+ 'input_name'=>'name',
+ 'input_type'=>'input',
+ 'input_size'=>'64',
+ 'required_status'=>true,
+ ),
);
self::$allfields['c.manufacturers_image'] = array(
'sort'=>false,
'alias'=>'image',
'text'=>__('@manufacturers table heading image'),
+ 'edit'=>array(
+ 'input_name'=>'image',
+ 'input_type'=>'input@image',
+ 'position_grp'=>4,
+ 'position_col'=>'right',
+ ),
);
self::$allfields['mi.manufacturers_url'] = array(
'alias'=>'url',
'sort'=>true,
'text'=>__('@manufacturers table heading url'),
+ 'edit'=>array(
+ 'input_name'=>'manufacturers_url',
+ 'input_type'=>'input',
+ 'input_size'=>'64',
+ ),
);
self::$allfields['mi.url_clicked'] = array(
@@ -135,109 +156,65 @@
);
- /**
- @remarks Construct all list , fields , th/td
- */
- self::$InitInfo['theader']['listing']=array(
-// array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
- array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
- );
- self::$InitInfo['tfooter']['listing']=self::$InitInfo['theader']['listing'];
- self::$InitInfo['modele']['listing']=array(
-// 0=>false,
- 1=>false,
- );
+ /// @remarks min fields and not view directly colonne fields
+ $listfield = ' c.manufacturers_id as id,';
- // min fields and not view directly colonne fields
- $listfield = " c.manufacturers_id as id, ";
- $_SESSION['filters']['allfields'] = array();
- // put in
- if(isset($_SESSION['filters'][__CLASS__]['allfields']))
- $_SESSION['filters']['allfields'] = $_SESSION['filters'][__CLASS__]['allfields'];
- else
- $_SESSION['filters']['allfields'] = array();
+ /// @remarks Active forms filter
+ $mutli=array();
- $in_session = $_SESSION['filters']['allfields'];
- // check and appli
- foreach(self::$allfields as $key=>$row){
- $clean = substr($key, (strpos($key, '.')+1));
-
- if(is_array($row)){
- $txt = $row['text'];
- $alias = (isset($row['alias'])? $row['alias'] : $clean);
- $css = (isset($row['class'])? $row['class'] : 'tcenter');
- $width = (isset($row['width'])? $row['width'] : '5%');
- }
- else{
- $txt = $row;
- $alias = $clean;
- $css = 'tcenter';
- $width = '5%';
- }
-
- if(
- ( isset($in_session[$clean]) && (string)$in_session[$clean] == 'on' )
- || ( count($in_session) <=1 && ( is_array($row) && isset($row['default']) && $row['default'] == true) )
- ) {
- $_SESSION['filters']['allfields'][$clean] = 'on';
- /**
- @remarks this define col theader title, and ajust html code
- */
- self::$InitInfo['theader']['listing'][]= array( 'width'=>$width, 'class'=>$css, 'txt'=>$txt);
- self::$InitInfo['tfooter']['listing'][]= array( 'width'=>$width, 'class'=>$css, 'txt'=>$txt );
- /**
- @remarks this define col in table, and if is possible sort
- */
- self::$InitInfo['modele']['listing'][$alias]=true;
-
-
- if($clean !=$alias)
- $listfield .=$key.' as '.$alias.',';
- else
- $listfield .=$key.',';
- }
- }
-
-
- self::$InitInfo['modele']['listing']['action']=false;
- self::$InitInfo['theader']['listing']['action']= array( 'class'=>'row_action', 'txt'=>__('table heading action') );
- self::$InitInfo['tfooter']['listing']['action']= array( 'class'=>'row_action', 'txt'=>__('table heading action') );
-
- self::$InitInfo['allfields']['listing'] = self::$allfields ;
-
/**
@remarks Active forms filter
- */
- self::$InitInfo['tfilter']['listing']=array(
+ @note
+ array[
+ // For normalised filter define on method ConvertInitVar
+ generic =>
+ array (
+ 'string'
+ // , ....
+ );
+ mod =>
array(
- 'type'=>'listfield'
- ),
- );
-
- /**
- @remarks Put detail for listing methode
+ 'title'=>__('@products filter tab manufacturer'),
+ 'content'=>tep_get_include_contents('manufacturers/filter.manufacturer'),
+ )
+ ]
*/
- self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
+ $tab = array();
-
/**
@remarks this define menu master module in page
+ @note use $boutons[action][] = array(params)
+
+ params :
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'button',
+ 'title'=>__('image create new content'),
+ 'url'=>tep_href_link(self::FILENAME, 'action=new'),
*/
- if(self::$action =='listing'){
- $i = 0;
- self::$InitInfo['MenuModule'][$i]=array(
- 'type'=>'getLink',
+ $boutons = array();
+ $boutons['listing'][]=array(
+ 'type'=>'getLink',
'format'=>'button_nav',
'image'=>'',
'cssclass'=>'',
'title'=>__('@manufacturers image add'),
'url'=>tep_href_link(self::FILENAME, 'action=new'),
- );
+ );
- }
- return true;
+ /**
+ Call Base Init and construct $InitInfo for process Filter
+ $listfield string list row in db
+ $mutli array action multiple
+ $filter array put list off activate tab filter
+ $boutons array
+ */
+ self::ConvertInitVar( $listfield, $mutli, $tab, $boutons);
+
+
}
@@ -258,13 +235,11 @@
@remarks specific save in session value filters
*/
case 'filters':
- $_SESSION['filters'] =array();
+ /*
+ Call Prev Process
+ */
+ self::actionFilter();
- foreach($_POST['filters']['listfield'] as $key=>$row){
- if( $row =='on' )
- $_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
- }
-
tep_redirect(tep_href_link(self::FILENAME));
break;
@@ -272,6 +247,60 @@
/**
@remarks specific ajax action
*/
+ /**
+ @remarks specific Ajax call
+ */
+ case 'update_cell':
+ try {
+ if($_REQUEST['columnName'] == 'manufacturers_name'){
+ if( sqlmanufacturer::fetch(array('name'=>$_REQUEST['value'])) != false)
+ throw new Exception(__('@cms_content ref is already used') ) ;
+ }
+
+ $modele = array_keys(sqlmanufacturer::Specimen());
+ $params = array();
+ $params['id'] = $_REQUEST['id'];
+
+ if( in_array($_REQUEST['columnName'], $modele) )
+ $params['sqlarray'] = array(
+ $_REQUEST['columnName'] => (isset($_REQUEST['value']) ? tep_db_prepare_input($_REQUEST['value']) : 0)
+ );
+ else{
+ $tab = explode('[', $_REQUEST['columnName']);
+ $final = $tabs2 = array();
+ foreach($tab as $row)
+ $tabs2[] = ( (substr($row,-1)==']')?substr($row,0,-1) : $row );
+
+ $tabs3 = array_reverse($tabs2);
+ $max = count($tabs2);
+ $i=0;
+ foreach($tabs3 as $row){
+ $i++;
+ if($i==1) $final[$row] = (isset($_REQUEST['value']) ? tep_db_prepare_input($_REQUEST['value']) : 0);
+ else
+ $final[$row] = $final;
+ }
+
+ $params['post'] = $final;
+ }
+
+ $params['action']=self::$action;
+
+ $params['language_id']= $languages_id;
+
+ if( sqlmanufacturer::update( $params ) != 1 )
+ throw new Exception(__('@manufacturers error in update process')) ;
+
+ $messageStack->add_session(__('@manufacturers success in update process'), 'success');
+
+ // display value for return
+ echo $_REQUEST['value'];
+ }
+ catch (Exception $e) {
+
+ $messageStack->add_session($e->getMessage() , 'error');
+ }
+ break;
case 'setflag':
if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
$c_id =(int) tep_db_prepare_input($_GET['cID']);
@@ -312,35 +341,58 @@
break;
case 'update':
- $c_id =(int) tep_db_prepare_input($_GET['cID']);
- if ($c_id > 0){
- $myarray = array(
- 'id'=>$c_id,
- 'name'=>tep_db_prepare_input($_POST['name']),
- );
+ try {
+ if(self::$Id <=0 )
+ throw new Exception(__('@manufacturers error load data')) ;
+
+// $c_id =(int) tep_db_prepare_input($_GET['cID']);
+//
+// if ($c_id > 0){
+ $myarray = array();
+ $params['id']= self::$Id;
+ $params['action']=self::$action;
+ $params['post']=$_POST;
+ $params['language_id']= $languages_id;
+
+// if()
+// 'id'=>self::$Id,
+// 'name'=>tep_db_prepare_input($_POST['name']),
+// );
+
+ $params['sqlarray']['name']=tep_db_prepare_input($_POST['manufacturers_name']);
+
foreach(tep_get_languages() as $row) {
- $myarray['langue']['url'][$row['id']] = tep_db_prepare_input($_POST['url'][$row['id']]);
+ $params['langue']['url'][$row['id']] = tep_db_prepare_input($_POST['url'][$row['id']]);
}
- if (isset($_POST['image']) && !preg_match('#^[0-9]*$#',$_POST['image']) && ($_POST['image'] != 'none')){
- if( substr($_POST['image'], 0,strlen( DIR_WS_CATALOG_IMAGES)) ==DIR_WS_CATALOG_IMAGES )
- $img_src= tep_db_prepare_input(substr($_POST['image'], strlen( DIR_WS_CATALOG_IMAGES) ) );
+ if (isset($_POST['manufacturers_image']) && !preg_match('#^[0-9]*$#',$_POST['manufacturers_image']) && ($_POST['manufacturers_image'] != 'none')){
+ if( substr($_POST['manufacturers_image'], 0,strlen( DIR_WS_CATALOG_IMAGES)) ==DIR_WS_CATALOG_IMAGES )
+ $img_src= tep_db_prepare_input(substr($_POST['manufacturers_image'], strlen( DIR_WS_CATALOG_IMAGES) ) );
else
- $img_src= tep_db_prepare_input($_POST['image']);
+ $img_src= tep_db_prepare_input($_POST['manufacturers_image']);
$sqli=sqlimage::fetch(array('pathkey'=>md5(DIR_WS_IMAGES.$img_src) ), true);
- $myarray['image'] = $sqli->rowid;
+ $params['sqlarray']['image'] = $sqli->rowid;
}
-// var_dump($myarray);
-// exit;
- sqlmanufacturer::update($myarray);
+ if( ! sqlmanufacturer::update($params) )
+ throw new Exception(__('@manufacturers error in update process') ) ;
+
+
+ if(!isset($_POST['up_and_close']) )
+ tep_redirect(tep_href_link(self::FILENAME, 'cID=' . self::$Id.'&action=edit'));
+
+
}
+ catch (Exception $e) {
+ $messageStack->add_session($e->getMessage() , 'error');
+ }
- tep_redirect(tep_href_link(self::FILENAME, 'action=edit&cID=' . $c_id ));
+ // generic redirect if error
+ tep_redirect(tep_href_link(self::FILENAME) );
break;
case 'delete_confirm':
@@ -379,18 +431,22 @@
case 'edit':
case 'new':
if( (int)self::$Id > 0) {
- self::$Info = sqlmanufacturer::fetch(array('id' =>self::$Id ), true);
+ $res = sqlmanufacturer::fetch(array('id' =>self::$Id ), true);
}
else{
- self::$Info = sqlmanufacturer::Specimen(true);
+ $res = sqlmanufacturer::Specimen(true);
}
+
+ $res=self::FormatDBValue($res);
+
+ return $res;
break;
case 'listing':
default:
/**
- @remarks retrun object load one inventaire
+ @remarks retrun object load
*/
global $query_numrows;
$adjust=new objectInfo(self::$InitInfo['adjust']);
@@ -420,6 +476,8 @@
/**
@remarks Ajax View result
*/
+ case 'update_cell':
+ break;
case 'setflag':
return self::RowStatus(array('country_visible'=>(int)$_GET['flag'], 'manufacturers_id'=>(int)$_GET['cID']));
break;
@@ -429,15 +487,15 @@
@remarks Normal View Page
*/
case 'new':
- self::load_db_values(0);
+ self::$Info = self::GetDBValue();
return MGabCont::CallGab('edit',__FUNCTION__,__CLASS__);
break;
case 'edit':
- self::load_db_values(self::$Id);
- return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
+ self::$Info = self::GetDBValue();
+ return MGabCont::CallGab(parent::$action,__FUNCTION__,self::MASTER);
break;
case 'delete':
- self::load_db_values(self::$Id);
+ self::$Info = self::GetDBValue();
return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
break;
case 'listing':
@@ -498,10 +556,6 @@
$res=array();
switch (parent::$action) {
- case 'edit';
- global $query_numrows,$languages_id;
-
- break;
case 'listing':
global $query_numrows,$languages_id;
@@ -518,6 +572,46 @@
$res[]=$ord;
}
break;
+ case 'new':
+ case 'edit';
+ default:
+ global $languages_id;
+
+ $ord =array();
+
+ if(is_object($_query)){
+ $res = new stdClass;
+ foreach($_query as $key=>$row) {
+ switch($key){
+ case 'lg':
+ foreach($row as $ke=>$ro){
+ foreach($ro as $k=>$r){
+
+ if( ($new_r = self::GetEditFieldsDefine($k) ) && $new_r !=false ){
+ $new_r['input_value'][$ke] = $r;
+ $edit = 'edit_'.$k;
+ $res->$edit = new objectInfo($new_r);
+ }
+
+ $res->$k = $r;
+ }
+ }
+ break;
+
+// case 'barcode_type':
+
+ default:
+
+ if( ($new_r = self::GetEditFieldsDefine($key) ) && $new_r !=false ){
+ $new_r['input_value'] = $row;
+ $edit = 'edit_'.$key;
+ $res->$edit = new objectInfo($new_r);
+ }
+
+ $res->$key = $row;
+ }
+ }
+ }
}
return $res;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-22 12:12:16
|
Revision: 4897
http://sourceforge.net/p/oscss/svn/4897
Author: oscim
Date: 2013-10-22 12:12:12 +0000 (Tue, 22 Oct 2013)
Log Message:
-----------
Fix and next develop new forms in files .gab
delete old files
Fix notice php
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/ModTwo.php
trunk/catalog/admin/includes/functions/html_output.php
trunk/catalog/admin/includes/gabarit/MGabCont/display_view.edit.gab
trunk/catalog/admin/includes/gabarit/navigation_links/filter.clause.gab
trunk/catalog/admin/includes/gabarit/products/filter.clause.gab
trunk/catalog/admin/includes/modules/products/desc_base.php
trunk/catalog/common/classes/FieldsDisplay.php
Removed Paths:
-------------
trunk/catalog/admin/includes/gabarit/products/desc_base/
trunk/catalog/admin/includes/gabarit/products/display_view.aca_actions.gab
Modified: trunk/catalog/admin/includes/classes/ModTwo.php
===================================================================
--- trunk/catalog/admin/includes/classes/ModTwo.php 2013-10-21 19:33:11 UTC (rev 4896)
+++ trunk/catalog/admin/includes/classes/ModTwo.php 2013-10-22 12:12:12 UTC (rev 4897)
@@ -742,8 +742,11 @@
@param $key string alias or name of field
@return bool flase or array
*/
- public static function DisplayField($key, $format = '<p class="block_input input-one">%s</p>', $obj=false){
+ public static function DisplayField($key, $format = '', $obj=false){
+ if(!tep_not_null($format))
+ $format = '<div class="block_input input-one">%s</div>';
+
if(!$obj)
$obj = self::$Info;
Modified: trunk/catalog/admin/includes/functions/html_output.php
===================================================================
--- trunk/catalog/admin/includes/functions/html_output.php 2013-10-21 19:33:11 UTC (rev 4896)
+++ trunk/catalog/admin/includes/functions/html_output.php 2013-10-22 12:12:12 UTC (rev 4897)
@@ -231,6 +231,15 @@
// public images
function tep_info_image($image, $alt, $width = '', $height = '', $parameters = '',$mode=false) {
+ $param ='';
+
+ if($width>0)
+ $param.=' width="'.$width.'" ';
+ if($height>0)
+ $param.=' width="'.$height.'" ';
+
+ $parameters.=$param;
+
if(preg_match('#^([0-9\.]*)$#i', $image))
return '<img src="'.tep_href_link('document.php', 'mod=img&typ=db&id='.$image.'&w='.$width.'&h='.$height).'" alt="'.$alt.'" title="'.$alt.'" '.$parameters.'/>';
else
Modified: trunk/catalog/admin/includes/gabarit/MGabCont/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/MGabCont/display_view.edit.gab 2013-10-21 19:33:11 UTC (rev 4896)
+++ trunk/catalog/admin/includes/gabarit/MGabCont/display_view.edit.gab 2013-10-22 12:12:12 UTC (rev 4897)
@@ -49,24 +49,28 @@
<div class="edit box_left w_70" >
+
<div id="tabs-1" class="tabPage">
-
<?php foreach (MGabCont::CallSt('DisplayCol','left') as $value): ?>
- <?php echo $page::DisplayField($value, '<p class="block_input input-one">%s</p>', $page::$Info); ?>
+ <?php echo $page::DisplayField($value, '', $page::$Info); ?>
<?php endforeach; ?>
+ </div>
-
-
-
- </div>
<?php
$g=6;
- if(is_array($contents)){
+ if(isset($contents) && is_array($contents)){
reset($contents);
foreach ($contents as $value) {
echo '<div id="tabs-'.$g.'" class="tabPage">'."\n";
- if (!empty($value['text'])) echo $value['text']."\n";
+
+ if (isset($value['key']) && $value['text'] =='automatic'){
+ foreach (MGabCont::CallSt('DisplayCol',array('left', $value['key']) ) as $value)
+ echo $page::DisplayField($value, '', $page::$Info);
+ }
+ elseif (!empty($value['text']))
+ echo $value['text']."\n";
else echo '<br />';
+
echo '<div class="separator"></div></div>'."\n";
$g++;
}
@@ -84,7 +88,7 @@
<dl>
<?php foreach (MGabCont::CallSt('DisplayCol','right') as $value): ?>
- <?php echo $page::DisplayField($value, '<p class="block_input input-one">%s</p>', $page::$Info ); ?>
+ <?php echo $page::DisplayField($value, '', $page::$Info ); ?>
<?php endforeach; ?>
<!-- All LinkTo -->
Modified: trunk/catalog/admin/includes/gabarit/navigation_links/filter.clause.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/navigation_links/filter.clause.gab 2013-10-21 19:33:11 UTC (rev 4896)
+++ trunk/catalog/admin/includes/gabarit/navigation_links/filter.clause.gab 2013-10-22 12:12:12 UTC (rev 4897)
@@ -9,11 +9,13 @@
@encode UTF-8
*/
global $languages_id;
+
+$array = sqlnavigation_links::fetch(array('mode'=>1, 'language_id'=>$languages_id), true);
?>
<fieldset>
<legend><?php echo __('@navigation_links filter legend choose display menu'); ?></legend>
<ul class="inline">
- <?php foreach(sqlnavigation_links::fetch(array('mode'=>1, 'language_id'=>$languages_id), true) as $row): ?>
+ <?php if(is_array($array)) foreach($array as $row): ?>
<?php $active = ((bool)(count(@$_SESSION['filters']['menus']) <=0 || (isset($_SESSION['filters']['menus'][$row->id]) && (string)@$_SESSION['filters']['menus'][$row->id] == 'on' ))? 'select' : '' ) ; ?>
Deleted: trunk/catalog/admin/includes/gabarit/products/display_view.aca_actions.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/display_view.aca_actions.gab 2013-10-21 19:33:11 UTC (rev 4896)
+++ trunk/catalog/admin/includes/gabarit/products/display_view.aca_actions.gab 2013-10-22 12:12:12 UTC (rev 4897)
@@ -1,16 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 22/12/10, 16:35
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-
-/**
- ACA function specifique
-*/
-if(isset(products::$box) && is_object(products::$box)) print( products::$box->TableBox( products::$box->_call_pile() ) );
-else echo products::$box; ?>
-<!--<a class="button" href="#" onclick="history.go(-1)"><?php echo IMAGE_BACK ?></a>-->
\ No newline at end of file
Modified: trunk/catalog/admin/includes/gabarit/products/filter.clause.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/filter.clause.gab 2013-10-21 19:33:11 UTC (rev 4896)
+++ trunk/catalog/admin/includes/gabarit/products/filter.clause.gab 2013-10-22 12:12:12 UTC (rev 4897)
@@ -4,33 +4,45 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.2
- @date 221/09/2013 ,22:50:08
+ @date 23/09/2013, 09:48
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
-
?>
+<!-- <fieldset> -->
+<!-- <legend><?php echo __('orders filter legend choose status'); ?></legend>
+ <ul class="inline">
+ <li>
+ <label class="inline" for="products_date_available"><?php echo __('text products date available'); ?></label>
+ <?php echo tep_draw_input_field('products_date_available', '', '', ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_products_date_available') . ' ' . __('text products date format'); ?>
+ </li>
+ <li>
+ <label class="inline" for="products_date_available"><?php echo __('text products date available'); ?></label>
+ <?php echo tep_draw_input_field('products_date_available', '', '', ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_products_date_available') . ' ' . __('text products date format'); ?>
+ </li>
+ </ul>-->
+<!-- </fieldset> -->
<fieldset>
<legend><?php echo __('@products filter legend products by stock'); ?></legend>
<ul class="inline">
<li>
<label class="inline" for="filters_bystock_stock"><?php echo __('@products label text bystock view'); ?></label>
- <?php echo tep_draw_radio_field('filters[bystock]', 'filters_bystock', '1', (int) ( (int)$_SESSION['filters']['products']['bystock'] == 1) ); ?>
+ <?php echo tep_draw_radio_field('filters[bystock]', 'filters_bystock', '0', (int) ( (int)$_SESSION['filters']['bystock'] == 0) ); ?>
</li>
<li>
<label class="inline" for="filters_bystock_stock"><?php echo __('@products label text bystock all'); ?></label>
- <?php echo tep_draw_radio_field('filters[bystock]', 'filters_bystock', '2', (int)( (int)$_SESSION['filters']['products']['bystock'] == 2 ) ); ?>
+ <?php echo tep_draw_radio_field('filters[bystock]', 'filters_bystock', '1', (int)( (int)$_SESSION['filters']['bystock'] >0 ) ); ?>
</li>
</ul>
</fieldset>
-<?php if(!isset($_SESSION['filters']['products']['bystock']) || (int)$_SESSION['filters']['products']['bystock'] == 1): ?>
+<?php if(!isset($_SESSION['filters']['bystock']) || (int)$_SESSION['filters']['bystock'] == 0): ?>
<fieldset>
<legend><?php echo __('@products filter legend products by attribut'); ?></legend>
<ul class="inline">
<li>
<label class="inline" for="filters_byattribute_all"><?php echo __('@products label text byattribute all'); ?></label>
- <?php echo tep_draw_checkbox_field('filters[byattribute][all]', 'filters_byattribute_all', 'on', (bool)(@$_SESSION['filters']['products']['byattribute']['all'] == 'on') ); ?>
+ <?php echo tep_draw_checkbox_field('filters[byattribute][all]', 'filters_byattribute_all', 'on', (bool)(@$_SESSION['filters']['byattribute']['all'] == 'on') ); ?>
</li>
</ul>
</fieldset>
@@ -40,11 +52,11 @@
<ul class="inline">
<li>
<label class="inline" for="products_date_available"><?php echo __('@products label text expected publied'); ?></label>
- <?php echo tep_draw_checkbox_field('filters[expected][publied]', 'filters_publied', 'on', (bool)(@$_SESSION['filters']['products']['expected']['publied'] == 'on') ); ?>
+ <?php echo tep_draw_checkbox_field('filters[expected][publied]', 'filters_publied', 'on', (bool)(@$_SESSION['filters']['expected']['publied'] == 'on') ); ?>
</li>
<li>
<label class="inline" for="products_date_available"><?php echo __('@products label text expected no publied'); ?></label>
- <?php echo tep_draw_checkbox_field('filters[expected][nopublied]', 'filters_publied', 'on', (bool)(@$_SESSION['filters']['products']['expected']['nopublied'] == 'on') ); ?>
+ <?php echo tep_draw_checkbox_field('filters[expected][nopublied]', 'filters_publied', 'on', (bool)(@$_SESSION['filters']['expected']['nopublied'] == 'on') ); ?>
</li>
</ul>
</fieldset>
@@ -54,11 +66,11 @@
<ul class="inline">
<li>
<label class="inline" for="products_date_available"><?php echo __('@products label text status publied'); ?></label>
- <?php echo tep_draw_checkbox_field('filters[status][publied]', 'filters_publied', 'on', (bool)(@$_SESSION['filters']['products']['status']['publied'] == 'on') ); ?>
+ <?php echo tep_draw_checkbox_field('filters[status][publied]', 'filters_publied', 'on', (bool)(@$_SESSION['filters']['status']['publied'] == 'on') ); ?>
</li>
<li>
<label class="inline" for="products_date_available"><?php echo __('@products label text status no publied'); ?></label>
- <?php echo tep_draw_checkbox_field('filters[status][nopublied]', 'filters_publied', 'on', (bool)(@$_SESSION['filters']['products']['status']['nopublied'] == 'on') ); ?>
+ <?php echo tep_draw_checkbox_field('filters[status][nopublied]', 'filters_publied', 'on', (bool)(@$_SESSION['filters']['status']['nopublied'] == 'on') ); ?>
</li>
</ul>
</fieldset>
Modified: trunk/catalog/admin/includes/modules/products/desc_base.php
===================================================================
--- trunk/catalog/admin/includes/modules/products/desc_base.php 2013-10-21 19:33:11 UTC (rev 4896)
+++ trunk/catalog/admin/includes/modules/products/desc_base.php 2013-10-22 12:12:12 UTC (rev 4897)
@@ -193,8 +193,7 @@
}
echo $oscss->_call(BO_WISIWYG_SELECTED,'_top',substr($nam,0, strlen($nam)-1),'400','100');
-// var_dump($actions);
-// exit;
+
return $actions;
}
Modified: trunk/catalog/common/classes/FieldsDisplay.php
===================================================================
--- trunk/catalog/common/classes/FieldsDisplay.php 2013-10-21 19:33:11 UTC (rev 4896)
+++ trunk/catalog/common/classes/FieldsDisplay.php 2013-10-22 12:12:12 UTC (rev 4897)
@@ -84,7 +84,7 @@
@param $edit boolean true = no edit; false : edit
@param $format html string put in rows
*/
- public static function DisplayRow($robj, $edit=true, $format = '<p class="block_input input-one">%s</p>'){
+ public static function DisplayRow($robj, $edit=true, $format = '<div class="block_input input-one">%s</div>'){
static $i,
$i = 0;
$i++;
@@ -247,13 +247,9 @@
else
$input .= self::draw_textarea_field($prefix. (($rows->active_value_language)? '['.$rows->languages_id.']': ''), 'soft', 50, 6,$rows->input_value,$params . 'style="width:400px;"'). $flag_r;
break;
-// case 8: // textarea advanced
-// $input .= $oscss->_call(BO_WISIWYG_SELECTED,'_draw',$prefix. (($rows->active_value_language)? '['.$rows->languages_id.']': ''),'400','100', $rows->input_value ) ;
-// break;
case 2: // radio
foreach($rows->values_list as $k=>$item) {
-// print_r($item);
$input .= '<span class="values">'.self::draw_input_field($prefix,$prefix. '_' . $k, $item['id'], $params.( ( (int)$item['id'] == (int)$rows->input_value)?' checked="checked" ': '' ), $rows->required_status , 'radio').' '.$item['text']. $flag_r.'</span>';
}
break;
@@ -294,11 +290,34 @@
case 0: // classic
default:
- $input .= self::draw_input_field($prefix. (($rows->active_value_language)? '['.$rows->languages_id.']': '') ,$prefix ,$rows->input_value,$params, $rows->required_status). $flag_r;
+ if( in_array('image', $options)){
+ $input = '<ul class="images display">';
+ $input .= '<li>';
+ $input .= '<span class="image">';
+ $input .= tep_info_image($rows->input_value,$rows->input_value, TEMP_BO_HEADING_IMAGE_WIDTH, TEMP_BO_HEADING_IMAGE_HEIGHT, 'class="image" id="'.$prefix.'img" onclick="'.tep_get_filebroswerserveur($prefix, "image", '').'return false;" ');
+ $input .= '</span>';
+ $input .= '<span class="button">';
+// $input .= '<a class="button browser" href="#" onclick="'.tep_get_filebroswerserveur($prefix, "image", '').'return false;">'.self::draw_hidden_field($prefix ,$prefix ,$rows->input_value ).' '.tep_image(DIR_WS_ICONS . 'icon_browser.png', PARCOURIR_SERVER) .'</a>';
+ $input .= self::draw_hidden_field($prefix ,$rows->input_value ) ;
+ $input .= tep_draw_checkbox_field($prefix.'_checkbox', $prefix.'_checkbox', 'on', true);
+ $input .= '</span>';
+ $input .= '</li>';
+ $input .= '<li>';
+ $input .= '<a class="button browser" href="#" onclick="'.tep_get_filebroswerserveur($prefix.'_add', "image", '').'return false;">'.self::draw_hidden_field($prefix ,$rows->input_value ).' '.tep_image(DIR_WS_ICONS . 'icon_browser.png', PARCOURIR_SERVER) .'</a>';
+
+ $input .= '</li>';
+ $input .= '</ul>';
+
+ }
+ else
+ $input .= self::draw_input_field($prefix. (($rows->active_value_language)? '['.$rows->languages_id.']': '') ,$prefix ,$rows->input_value,$params, $rows->required_status). $flag_r;
}
}
return $input;
}
+
+ private static function DisplayImage(){
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-21 19:33:15
|
Revision: 4896
http://sourceforge.net/p/oscss/svn/4896
Author: oscim
Date: 2013-10-21 19:33:11 +0000 (Mon, 21 Oct 2013)
Log Message:
-----------
new process generate fileds in BO
Clean code and clean files
Adjust code
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/MLinkTo.php
trunk/catalog/admin/includes/classes/ModTwo.php
trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/categories.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt
trunk/catalog/admin/includes/modules/categories/header_tags.php
trunk/catalog/admin/includes/modules/content/header_tags.php
trunk/catalog/admin/includes/modules/pages/categories.php
trunk/catalog/admin/includes/modules/pages/cms_content.php
trunk/catalog/admin/includes/modules/pages/products.php
trunk/catalog/admin/includes/modules/products/desc_base.php
trunk/catalog/admin/includes/modules/products/header_tags.php
trunk/catalog/common/classes/AbstractHeader_tags.php
trunk/catalog/common/classes/FieldsDisplay.php
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/MGabCont/display_view.noedit.gab
Removed Paths:
-------------
trunk/catalog/admin/includes/gabarit/categories/header_tags/display_edit.edit.gab
trunk/catalog/admin/includes/gabarit/cms_content/header_tags/display_edit.edit.gab
trunk/catalog/admin/includes/gabarit/products/header_tags/display_edit.edit.gab
Modified: trunk/catalog/admin/includes/classes/MLinkTo.php
===================================================================
--- trunk/catalog/admin/includes/classes/MLinkTo.php 2013-10-19 14:14:54 UTC (rev 4895)
+++ trunk/catalog/admin/includes/classes/MLinkTo.php 2013-10-21 19:33:11 UTC (rev 4896)
@@ -42,7 +42,7 @@
protected function __construct($type){
global $oscss,$language;
- self::$current = $type;
+ self::$current = self::RetroDatatype($type) ;
$res = sqlconfiguration::fetch(array('like_key'=>'DATATYPES_ROOTLISTING_%'), true );
@@ -51,7 +51,7 @@
foreach($res as $row){
$key = strtolower(substr(self::RetroDatatype($row->key), strlen('DATATYPES_ROOTLISTING_') ) );
- if( DataTypes::is_active($key) ){
+ if( self::$current != $key && DataTypes::is_active($key) ){
// search current in type for rootlisting
if(in_array(self::$current, explode(',',$row->value))) {
//! @remarks Force load language centralised
@@ -172,7 +172,7 @@
/**
- @brief define current class name and adjust retor-compatibilite
+ @brief define current class name and adjust retro-compatibilite
@param $classname string name of current class
*/
private static function RetroClassName($classname){
@@ -182,30 +182,28 @@
case 'content': // retro compatible
return 'cms_content';
break;
-// case 'product': // retro compatible
-// return $classname.'s';
-// break;
default:
- return $classname.'s';
+ if(substr($classname,-1) == 's')
+ return $classname;
+ else
+ return $classname.'s';
}
}
/**
- @brief define current class name and adjust retor-compatibilite
+ @brief define current class name and adjust retro-compatibilite
@param $classname string name of current class
*/
private static function RetroDatatype($classname){
switch($classname){
- case 'cms_content': // retro compatible
- return $classname;
- break;
- case 'products': // retro compatible
- return $classname;
- break;
+// case 'cms_content': // retro compatible
default:
- return $classname;
+ if(substr($classname,-1) == 's')
+ return substr($classname,0,-1);
+ else
+ return $classname;
}
}
Modified: trunk/catalog/admin/includes/classes/ModTwo.php
===================================================================
--- trunk/catalog/admin/includes/classes/ModTwo.php 2013-10-19 14:14:54 UTC (rev 4895)
+++ trunk/catalog/admin/includes/classes/ModTwo.php 2013-10-21 19:33:11 UTC (rev 4896)
@@ -588,10 +588,11 @@
// self::$InitInfo['edit']['multi']['edit_'.$alias] = $row['edit'];
// self::$InitInfo['edit']['listing_edit']['edit_'.$alias] = $row['edit'];
+ $tab = (isset($row['edit']['position_tab'])? $row['edit']['position_tab']: 'master' );
$colum = (isset($row['edit']['position_col'])? $row['edit']['position_col']: 'left' );
$grp = (isset($row['edit']['position_grp'])? $row['edit']['position_grp']: 5 );
- self::$InitInfo['colum'][$colum][$grp][] = $alias;
+ self::$InitInfo['colum'][$tab][$colum][$grp][] = $alias;
// [$alias] = array(
// 'col'=>$row['edit']['position_col'],
// 'grp'=>$row['edit']['position_grp'],
@@ -755,19 +756,30 @@
if(is_array($obj->$edit))
$obj->$edit = new objectInfo($obj->$edit);
- return FieldsDisplay::DisplayRow($obj->$edit, (( self::$action!='noedit')? false : true ), $format) ;
+ return FieldsDisplay::DisplayRow($obj->$edit, (( self::$action !='noedit')? false : true ), $format) ;
}
else
return '';
}
- public static function DisplayCol($colum='left'){
+ public static function DisplayCol(){
+ $opt = func_get_args();
+
+ if(is_array($opt[0])){
+ $colum=(isset($opt[0][0])? $opt[0][0] : 'left' );
+ $tab=(isset($opt[0][1])? $opt[0][1] : 'master');
+ }
+ else{
+ $colum=(!empty($opt[0])? $opt[0] : 'left' );
+ $tab='master';
+ }
+
$array=array();
- if(isset(self::$InitInfo['colum'][$colum]) ){
- ksort(self::$InitInfo['colum'][$colum]);
+ if(isset(self::$InitInfo['colum'][$tab][$colum]) ){
+ ksort(self::$InitInfo['colum'][$tab][$colum]);
- foreach(self::$InitInfo['colum'][$colum] as $grp)
+ foreach(self::$InitInfo['colum'][$tab][$colum] as $grp)
foreach($grp as $row)
$array[] = $row;
Added: trunk/catalog/admin/includes/gabarit/MGabCont/display_view.noedit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/MGabCont/display_view.noedit.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/MGabCont/display_view.noedit.gab 2013-10-21 19:33:11 UTC (rev 4896)
@@ -0,0 +1,121 @@
+<?php
+/**
+ @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.2
+ @date 19/10/2013, 09:17
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+$page= MGabCont::CallSt('GetClassName');
+
+?>
+<h3><?php echo __('@'.$page.' heading title noedit'); ?></h3>
+
+
+<?php
+ /**
+ @remarks Call generic menu define in page module for display action bouton in header html page
+ */
+?>
+<div class="button_nav">
+ <?php foreach(MGabCont::CallSt('DMenuModule') as $item): ?>
+ <?php echo $item ?>
+ <?php endforeach; ?>
+</div>
+
+
+
+
+<div class="box_uniq block_form">
+ <div id="tabs">
+ <ul>
+ <li><a href="#tabs-1"><?php echo __('@'.$page.' tab data'); ?></a></li>
+ <?php
+ if(isset($page::$modules ) ) {
+ $g=6;
+ $page::$modules->display_edit($contents,@$cID);
+ if(is_array($contents))
+ foreach ($contents as $value) {
+ if(!empty($value['title']))echo '<li><a href="#tabs-'.$g.'">'.$value['title'].'</a></li>'."\n";
+ $g++;
+ }
+ }
+ ?>
+ </ul>
+
+
+ <div class="noedit box_left w_70" >
+ <div id="tabs-1" class="tabPage">
+
+ <?php foreach (MGabCont::CallSt('DisplayCol','left') as $value): ?>
+ <?php echo $page::DisplayField($value, '<p class="block_input input-one">%s</p>', $page::$Info); ?>
+ <?php endforeach; ?>
+
+
+
+
+ </div>
+ <?php
+ $g=6;
+ if(is_array($contents)){
+ reset($contents);
+ foreach ($contents as $value) {
+ echo '<div id="tabs-'.$g.'" class="tabPage">'."\n";
+
+ if (isset($value['key']) && $value['text'] =='automatic'){
+ foreach (MGabCont::CallSt('DisplayCol',array('left', $value['key']) ) as $value)
+ echo $page::DisplayField($value, '<p class="block_input input-one">%s</p>', $page::$Info);
+ }
+ elseif (!empty($value['text']))
+ echo $value['text']."\n";
+ else echo '<br />';
+
+ echo '<div class="separator"></div></div>'."\n";
+ $g++;
+ }
+ }
+ ?>
+
+ <div class="separator"></div>
+ </div>
+
+
+
+ <div class="noedit box_right w_30">
+
+ <fieldset class="block_field">
+ <dl>
+
+ <?php foreach (MGabCont::CallSt('DisplayCol','right') as $value): ?>
+ <?php echo $page::DisplayField($value, '<p class="block_input input-one">%s</p>', $page::$Info ); ?>
+ <?php endforeach; ?>
+
+ <!-- All LinkTo -->
+ <dt class="tabs block_input w_90">
+ <?php $linkto =MLinkTo::LoadRightTo( $page, 'noedit' , 'action='.$page::$action.'&cID='. $page::$Info->id ); ?>
+ <ul>
+ <?php $j=0;foreach($linkto as $row): $j++; ?>
+ <li><a href="#tabslinkto-<?php echo $j ?>"><?php echo $row['title'] ;?></a></li>
+ <?php endforeach;?>
+ </ul>
+ <?php $j=0;foreach($linkto as $row): $j++; ?>
+ <div id="tabslinkto-<?php echo $j ?>">
+ <?php echo $row['text'] ;?>
+ </div>
+ <?php endforeach;?>
+ </dt>
+
+
+ <dt class="block_input button_nav" >
+ <?php printf( CsrtAction::getLink('button_nav', IMAGE_EDIT, ''), '', tep_href_link($page::FILENAME, 'cID=' . $page::$Info->id . '&action=edit'),'' ); ?>
+ <?php echo tep_js_back(tep_href_link($page::FILENAME, 'cID=' . $page::$Info->id), IMAGE_CANCEL); ?>
+ </dt>
+ </dl>
+ </fieldset>
+ </div>
+
+ <div class="separator"></div>
+ </div>
+</div>
Deleted: trunk/catalog/admin/includes/gabarit/categories/header_tags/display_edit.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/categories/header_tags/display_edit.edit.gab 2013-10-19 14:14:54 UTC (rev 4895)
+++ trunk/catalog/admin/includes/gabarit/categories/header_tags/display_edit.edit.gab 2013-10-21 19:33:11 UTC (rev 4896)
@@ -1,19 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.2
- @date 01/10/2013, 19:18
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<div class="header_tags">
- <?php echo categories::DisplayField('head_title_tag'); ?>
-
-
- <?php echo categories::DisplayField('head_desc_tag'); ?>
-
- <?php echo categories::DisplayField('head_keywords_tag'); ?>
-</div>
Deleted: trunk/catalog/admin/includes/gabarit/cms_content/header_tags/display_edit.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/cms_content/header_tags/display_edit.edit.gab 2013-10-19 14:14:54 UTC (rev 4895)
+++ trunk/catalog/admin/includes/gabarit/cms_content/header_tags/display_edit.edit.gab 2013-10-21 19:33:11 UTC (rev 4896)
@@ -1,20 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.2
- @date 01/10/2013, 19:18
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<div class="header_tags">
-
- <?php echo cms_content::DisplayField('head_title_tag', '%s'); ?>
-
-
- <?php echo cms_content::DisplayField('head_desc_tag'); ?>
-
- <?php echo cms_content::DisplayField('head_keywords_tag'); ?>
-</div>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab 2013-10-19 14:14:54 UTC (rev 4895)
+++ trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab 2013-10-21 19:33:11 UTC (rev 4896)
@@ -217,7 +217,11 @@
reset($contents);
foreach ($contents as $value) {
echo '<div id="tabs-'.$g.'" class="tabPage">'."\n";
- if (!empty($value['text'])) echo $value['text']."\n";
+ if (isset($value['key']) && $value['text'] =='automatic'){
+ foreach (MGabCont::CallSt('DisplayCol',array('left', $value['key'] ) ) as $value)
+ echo products::DisplayField($value, '<p class="block_input input-one">%s</p>', products::$Info);
+ }
+ elseif (!empty($value['text'])) echo $value['text']."\n";
else echo '<br />';
echo '<div class="separator"></div></div>'."\n";
$g++;
Deleted: trunk/catalog/admin/includes/gabarit/products/header_tags/display_edit.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/header_tags/display_edit.edit.gab 2013-10-19 14:14:54 UTC (rev 4895)
+++ trunk/catalog/admin/includes/gabarit/products/header_tags/display_edit.edit.gab 2013-10-21 19:33:11 UTC (rev 4896)
@@ -1,19 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.2
- @date 01/10/2013, 19:18
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<div class="header_tags">
- <?php echo products::DisplayField('head_title_tag'); ?>
-
-
- <?php echo products::DisplayField('head_desc_tag'); ?>
-
- <?php echo products::DisplayField('head_keywords_tag'); ?>
-</div>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/categories.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/categories.txt 2013-10-19 14:14:54 UTC (rev 4895)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/categories.txt 2013-10-21 19:33:11 UTC (rev 4896)
@@ -39,16 +39,22 @@
/* Edit */
- $lang['text categories name']="Nom de la catégorie :" ;
+ /* title */
+ $lang['@categories heading title edit']="Edition de la catégorie" ;
+ $lang['@categories heading title noedit']="Détail de la catégorie" ;
+
+ /* tabs */
+ $lang['@categories tab data']="Caractéristiques" ;
+
+ /* entry */
$lang['text categories image']="Image de la catégorie :" ;
- $lang['text sort order']="Ordre de tri :" ;
- $lang['text edit datatype categorie']="Datatype actif pour cette categorie" ;
+
+ /* select / radio */
$lang['input datatype value none']="aucun datatype specifique" ;
- $lang['view in menu']="Voir dans le menu" ;
-
$lang['@categories text status off']=" Active " ;
$lang['@categories text status on']=" Inactive" ;
+
$lang['@categories text hidden off']="Non-Visible " ;
$lang['@categories text hidden on']=" Visible" ;
@@ -107,7 +113,7 @@
$lang['text products']="Produits : " ;
$lang['txt categories']="Positions de cette categorie (choix du parent) : " ;
$lang['text cms']="Page : " ;
-$lang['tab products data']="Caractéristiques" ;
+
$lang['text choose img']="Choix de l'image " ;
$lang['empty category']="Catégorie vide" ;
$lang['text delete image cat']="Aucune image" ;
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt 2013-10-19 14:14:54 UTC (rev 4895)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt 2013-10-21 19:33:11 UTC (rev 4896)
@@ -57,6 +57,7 @@
/* Edit */
/* title */
$lang['@cms_content heading title edit']="Édition d'une page" ;
+ $lang['@cms_content heading title noedit']="Detail une page" ;
/* tab */
$lang['@cms_content tab data']="Contenu" ;
/* */
Modified: trunk/catalog/admin/includes/modules/categories/header_tags.php
===================================================================
--- trunk/catalog/admin/includes/modules/categories/header_tags.php 2013-10-19 14:14:54 UTC (rev 4895)
+++ trunk/catalog/admin/includes/modules/categories/header_tags.php 2013-10-21 19:33:11 UTC (rev 4896)
@@ -89,6 +89,7 @@
'input_size'=>'64',
'required_status'=>true,
'active_value_language'=>true,
+ 'position_tab'=>__CLASS__,
),
);
$array['fhtd.head_desc_tag'] = array(
@@ -104,6 +105,7 @@
'input_size'=>'64',
'required_status'=>true,
'active_value_language'=>true,
+ 'position_tab'=>__CLASS__,
),
);
$array['fhtd.head_keywords_tag'] = array(
@@ -119,6 +121,7 @@
'input_size'=>'64',
'required_status'=>true,
'active_value_language'=>true,
+ 'position_tab'=>__CLASS__,
),
);
break;
@@ -199,6 +202,7 @@
public static function load_db_values ($cat_id) {
$arr['cat_id'] = $cat_id;
$arr=array_merge(array('cat_id'=>$cat_id) ,parent::load_db($cat_id, 'cat') );
+
self::$pInfo->objectInfo($arr);
return $arr;
@@ -213,7 +217,12 @@
Draw
*/
public function display_edit(&$contents, $id) {
- $contents []=array('title'=> __('tab meta'),'text'=>tep_get_include_contents('categories/'.__CLASS__.'/'.__FUNCTION__.'.edit'));
+ $this->load_db_values (categories::$Id);
+ $contents[]=array(
+ 'title'=> __('tab meta'),
+ 'key'=> __CLASS__,
+ 'text'=> 'automatic'
+);
}
public static function DisplayField($arg1, $args2){
Modified: trunk/catalog/admin/includes/modules/content/header_tags.php
===================================================================
--- trunk/catalog/admin/includes/modules/content/header_tags.php 2013-10-19 14:14:54 UTC (rev 4895)
+++ trunk/catalog/admin/includes/modules/content/header_tags.php 2013-10-21 19:33:11 UTC (rev 4896)
@@ -91,6 +91,7 @@
'input_size'=>'64',
'required_status'=>true,
'active_value_language'=>true,
+ 'position_tab'=>__CLASS__,
),
);
$array['fhtd.head_desc_tag'] = array(
@@ -106,6 +107,7 @@
// 'input_size'=>'64',
// 'required_status'=>true,
'active_value_language'=>true,
+ 'position_tab'=>__CLASS__,
),
);
$array['fhtd.head_keywords_tag'] = array(
@@ -117,13 +119,14 @@
);
if(! DataTypes::is_active('tags'))
- $array['fhtd.head_keywords_tag']['edit']=array(
- 'input_name'=>__CLASS__.'[head_keywords_tag]',
- 'input_type'=>'textarea',
-// 'input_size'=>'64',
-// 'required_status'=>true,
- 'active_value_language'=>true,
- );
+ $array['fhtd.head_keywords_tag']['edit']=array(
+ 'input_name'=>__CLASS__.'[head_keywords_tag]',
+ 'input_type'=>'textarea',
+ // 'input_size'=>'64',
+ // 'required_status'=>true,
+ 'active_value_language'=>true,
+ 'position_tab'=>__CLASS__,
+ );
break;
case 'tables':
@@ -223,7 +226,11 @@
*/
public function display_edit(&$contents, $id) {
$this->load_db_values (cms_content::$Id);
- $contents[]=array('title'=> __('tab meta'),'text'=>tep_get_include_contents('cms_content/'.__CLASS__.'/'.__FUNCTION__.'.edit'));
+ $contents[]=array(
+ 'title'=> __('tab meta'),
+ 'key'=> __CLASS__,
+ 'text'=> 'automatic'
+);
}
Modified: trunk/catalog/admin/includes/modules/pages/categories.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/categories.php 2013-10-19 14:14:54 UTC (rev 4895)
+++ trunk/catalog/admin/includes/modules/pages/categories.php 2013-10-21 19:33:11 UTC (rev 4896)
@@ -738,7 +738,7 @@
case 'delete';
case 'edit';
-
+ case 'noedit';
$res = sqlcategorie::fetch(array('id'=> (int) self::$Id, 'language_id'=>(int)$languages_id), true);
$res->cPath= categorieUtility::get_generated_category_path_ids(self::$Id);
@@ -849,14 +849,22 @@
/**
@remarks Normal View Page
*/
+// case 'new':
+// $action='edit';
+// self::$Info=self::GetDBValue(0);
+// /// use master gabarit
+// return MGabCont::CallGab($action,__FUNCTION__,__CLASS__);
+// break;
case 'new':
$action='edit';
- self::$Info=self::GetDBValue(0);
+ case 'edit':
+ case 'noedit':
+ self::$Info=self::GetDBValue(self::$Id);
/// use master gabarit
- return MGabCont::CallGab($action,__FUNCTION__,__CLASS__);
+ return MGabCont::CallGab(self::$action,__FUNCTION__,self::MASTER);
break;
- case 'edit':
+// case 'edit':
case 'new_light':
case 'delete':
case 'copy_to':
@@ -888,14 +896,25 @@
@return string
*/
public static function ButtonRowsActions($categories){
+ $action_str_left='';
+ $action_str ='';
+
+ $action_str_left.=sprintf(CsrtAction::getLink('row_action_right', ICON_FOLDER, 'childs'), '', tep_href_link(self::FILENAME, 'cPath=' . $categories['id'] ),'' );
+
+ $action_str.=sprintf(CsrtAction::getLink('row_action_right', __('image view public') , 'publiclink'), '', tep_catalog_href_link('index.php', 'cPath=' . $categories['cPath'],'SSL', true, 'forceview') ,' target="blank" ' );
+ $action_str.=sprintf(CsrtAction::getLink('row_action_right', IMAGE_DETAILS, 'noedit'), '', tep_href_link(self::FILENAME, 'cPath=' . self::$cPath . '&cID=' . $categories['id'] . '&action=noedit' ),'' );
+
+ if(tep_action_check('edit', self::FILENAME))
+ $action_str.=sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME, 'cPath=' . self::$cPath . '&cID=' . $categories['id'] . '&action=edit' ),'' );
+ if(tep_action_check('delete', self::FILENAME))
+ $action_str.= sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cPath=' . self::$cPath . '&cID=' . $categories['id'] . '&action=delete') ,'' );
+
return sprintf(
CsrtAction::getFormat('row_action'),
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME, 'cPath=' . self::$cPath . '&cID=' . $categories['id'] . '&action=edit' ),'' ).
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cPath=' . self::$cPath . '&cID=' . $categories['id'] . '&action=delete') ,'' ),
-
- sprintf(CsrtAction::getLink('row_action_right', ICON_FOLDER, 'childs'), '', tep_href_link(self::FILENAME, 'cPath=' . $categories['id'] ),'' ).
- sprintf(CsrtAction::getLink('row_action_right', __('image view public') , 'publiclink'), '', tep_catalog_href_link('index.php', 'cPath=' . $categories['cPath'],'SSL', true, 'forceview') ,' target="blank" ' )
-
+ self::$modules->display_ColumnRowAction($categories['id']) .
+ $action_str_left
+ ,
+ $action_str
);
}
Modified: trunk/catalog/admin/includes/modules/pages/cms_content.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/cms_content.php 2013-10-19 14:14:54 UTC (rev 4895)
+++ trunk/catalog/admin/includes/modules/pages/cms_content.php 2013-10-21 19:33:11 UTC (rev 4896)
@@ -629,6 +629,7 @@
case 'delete':
case 'detail':
case 'edit':
+ case 'noedit':
case 'new':
global $language_id;
@@ -766,6 +767,7 @@
break;
case 'edit':
+ case 'noedit':
case 'delete':
self::$Info=self::GetDBValue(self::$Id);
/// use master gabarit
@@ -851,11 +853,24 @@
@param $content array
*/
public static function ButtonRowsActions($content){
+
+ $action_str_left='';
+ $action_str ='';
+
+ $action_str.=sprintf(CsrtAction::getLink('row_action_right', __('image view public') , 'publiclink'), '', tep_catalog_href_link('index.php', 'content=' . $content['id'],'SSL', true, 'forceview') ,' target="blank" ' );
+ $action_str.=sprintf(CsrtAction::getLink('row_action_right', IMAGE_DETAILS, 'noedit'), '', tep_href_link(self::FILENAME, 'cID=' . $content['id'] . '&action=noedit') ,'' );
+
+ if(tep_action_check('edit', self::FILENAME))
+ $action_str.=sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME, 'cID=' . $content['id'] . '&action=edit') ,'' );
+ if(tep_action_check('delete', self::FILENAME))
+ $action_str.=sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $content['id'] . '&action=delete') ,'' );
+
return sprintf(
CsrtAction::getFormat('row_action'),
- self::$modules->display_ColumnRowAction($content['id']) ,
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME, 'cID=' . $content['id'] . '&action=edit') ,'' ).
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $content['id'] . '&action=delete') ,'' )
+ self::$modules->display_ColumnRowAction($content['id']).
+ $action_str_left
+ ,
+ $action_str
);
}
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2013-10-19 14:14:54 UTC (rev 4895)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2013-10-21 19:33:11 UTC (rev 4896)
@@ -1443,6 +1443,7 @@
self::$Info=self::GetDBValue();
return MGabCont::CallGab($action,__FUNCTION__,__CLASS__);
+// return MGabCont::CallGab($action,__FUNCTION__,self::MASTER);
default:
if(!empty(self::$actions['action_method']) ){
@@ -1475,12 +1476,15 @@
@return string
*/
public static function ButtonRowsActions($products){
+ $action_str_left='';
+ $action_str ='';
- $action_str =sprintf(CsrtAction::getLink('row_action_right', __('image view public') , 'publiclink'), '', tep_catalog_href_link('index.php', 'products_id=' . $products['id'],'SSL', true, 'forceview') ,' target="blank" ' );
-
if(_cst_bool('STOCK_CHECK') && tep_action_check('view', FILENAME_STOCK) )
- $action_str.=sprintf(CsrtAction::getLink('row_action_right', __('txt stock') , 'stock'), 'fancyView', tep_href_link(FILENAME_STOCK, 'product_id=' . $products['id'].'&origin='.self::FILENAME) ,'' );
+ $action_str_left.=sprintf(CsrtAction::getLink('row_action_right', __('txt stock') , 'stock'), 'fancyView', tep_href_link(FILENAME_STOCK, 'product_id=' . $products['id'].'&origin='.self::FILENAME) ,'' );
+ $action_str.=sprintf(CsrtAction::getLink('row_action_right', __('image view public') , 'publiclink'), '', tep_catalog_href_link('index.php', 'products_id=' . $products['id'],'SSL', true, 'forceview') ,' target="blank" ' );
+ $action_str.=sprintf(CsrtAction::getLink('row_action_right', IMAGE_DETAILS, 'noedit'), '', tep_href_link(self::FILENAME, 'pID=' . $products['id'] . '&action=noedit' ),'' );
+
if(tep_action_check('copy_to', self::FILENAME))
$action_str.=sprintf(CsrtAction::getLink('row_action_right', IMAGE_COPY_TO, 'copyto'), 'fancy', tep_href_link(self::FILENAME, 'pID=' . $products['id'] . '&action=copy_to') ,'' );
@@ -1494,7 +1498,9 @@
return sprintf(
CsrtAction::getFormat('row_action'),
- self::$modules->display_ColumnRowAction($products['id']) ,
+ self::$modules->display_ColumnRowAction($products['id']).
+ $action_str_left
+ ,
$action_str
);
}
Modified: trunk/catalog/admin/includes/modules/products/desc_base.php
===================================================================
--- trunk/catalog/admin/includes/modules/products/desc_base.php 2013-10-19 14:14:54 UTC (rev 4895)
+++ trunk/catalog/admin/includes/modules/products/desc_base.php 2013-10-21 19:33:11 UTC (rev 4896)
@@ -76,6 +76,9 @@
'input_size'=>'64',
'required_status'=>true,
'active_value_language'=>true,
+ 'position_tab'=>__CLASS__,
+// 'position_col'=>'left',
+// 'position_grp'=>6
),
);
$array['pd.products_chapo'] = array(
@@ -90,6 +93,9 @@
// 'input_size'=>'64',
// 'required_status'=>true,
'active_value_language'=>true,
+ 'position_tab'=>__CLASS__,
+// 'position_col'=>'left',
+// 'position_grp'=>6
),
);
$array['pd.products_description'] = array(
@@ -104,6 +110,9 @@
// 'input_size'=>'64',
// 'required_status'=>true,
'active_value_language'=>true,
+ 'position_tab'=>__CLASS__,
+// 'position_col'=>'left',
+// 'position_grp'=>6
),
);
$array['pd.products_url'] = array(
@@ -118,7 +127,11 @@
'input_size'=>'64',
// 'required_status'=>true,
'active_value_language'=>true,
+ 'position_tab'=>__CLASS__,
+// 'position_col'=>'left',
+// 'position_grp'=>6
),
+
);
break;
@@ -267,17 +280,15 @@
function display_edit(&$contents, $product_id) {
global $oscss;
$languages = tep_get_languages();
+ $contents[]=array(
+ 'title'=> __('Description') ,
+ 'key'=> __CLASS__,
+ 'text'=> 'automatic'
+ );
+ }
- if(empty($product_id)) $m=__('enregistrer votre produit pour acceder à ces options ');
- else {
- /// use master gabarit
- $m= MGabCont::CallGab('edit',__FUNCTION__,'products/'.__CLASS__);
- }
- $contents []=array('title'=> __('Description') ,'text'=> $m);
- }
-
/** Force implements InterfaceModule class to define this method */
function check() { return false; }
Modified: trunk/catalog/admin/includes/modules/products/header_tags.php
===================================================================
--- trunk/catalog/admin/includes/modules/products/header_tags.php 2013-10-19 14:14:54 UTC (rev 4895)
+++ trunk/catalog/admin/includes/modules/products/header_tags.php 2013-10-21 19:33:11 UTC (rev 4896)
@@ -100,6 +100,7 @@
'input_size'=>'64',
'required_status'=>true,
'active_value_language'=>true,
+ 'position_tab'=>__CLASS__,
),
);
$array['fhtd.head_desc_tag'] = array(
@@ -115,6 +116,7 @@
// 'input_size'=>'64',
// 'required_status'=>false,
'active_value_language'=>true,
+ 'position_tab'=>__CLASS__,
),
);
$array['fhtd.head_keywords_tag'] = array(
@@ -132,6 +134,7 @@
// 'input_size'=>'64',
// 'required_status'=>true,
'active_value_language'=>true,
+ 'position_tab'=>__CLASS__,
);
break;
@@ -235,6 +238,8 @@
public static function load_db_values ($Id) {
$arr['products_id'] = $Id;
$arr=array_merge(array('products_id'=>$Id) ,parent::load_db($Id, 'product') );
+
+// var_dump($arr);
self::$pInfo->objectInfo($arr);
return $arr;
@@ -253,7 +258,9 @@
public function display_edit(&$contents, $product_id) {
$contents[]=array(
'title'=> __('tab meta'),
- 'text'=>tep_get_include_contents('products/'.__CLASS__.'/'.__FUNCTION__.'.edit')
+ 'key'=> __CLASS__,
+ 'text'=> 'automatic'
+// 'text'=>tep_get_include_contents('products/'.__CLASS__.'/'.__FUNCTION__.'.edit')
);
}
Modified: trunk/catalog/common/classes/AbstractHeader_tags.php
===================================================================
--- trunk/catalog/common/classes/AbstractHeader_tags.php 2013-10-19 14:14:54 UTC (rev 4895)
+++ trunk/catalog/common/classes/AbstractHeader_tags.php 2013-10-21 19:33:11 UTC (rev 4896)
@@ -194,16 +194,25 @@
*/
public static function load_db($id, $type) {
$languages = tep_get_languages();
+ $arr = array();
+ $product_query = tep_db_query($sql="SELECT head_title_tag, head_desc_tag, head_keywords_tag, language_id FROM " . TABLE_FULL_TAG . " ft, " . TABLE_FULL_TAG_DESCRIPTION . " ftd WHERE ft.tag_id=ftd.tag_id and ft.page_type='".$type."' and ft.page_id = '" . $id . "' ");
+
+ foreach($product_query->fetchAllAssoc() as $row){
+ $arr['head_title_tag'][$row['language_id']]=$row['head_title_tag'];
+ $arr['head_desc_tag'][$row['language_id']]=$row['head_desc_tag'];
+ $arr['head_keywords_tag'][$row['language_id']]=$row['head_keywords_tag'];
+ }
+
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
$languages_id = $languages[$i]['id'];
- $product_query = tep_db_query($sql="SELECT head_title_tag, head_desc_tag, head_keywords_tag FROM " . TABLE_FULL_TAG . " ft, " . TABLE_FULL_TAG_DESCRIPTION . " ftd WHERE ft.tag_id=ftd.tag_id and ft.page_type='".$type."' and ft.page_id = '" . $id . "' and ftd.language_id = '" . (int)$languages_id . "'");
- if(tep_db_num_rows($product_query)>0){
- $product = tep_db_fetch_array($product_query);
- $arr ['head_title_tag'][$languages_id]=$product['head_title_tag'];
- $arr ['head_desc_tag'][$languages_id]=$product['head_desc_tag'];
- $arr ['head_keywords_tag'][$languages_id]=$product['head_keywords_tag'];
- } else $arr=array();
+
+ if(!isset($arr['head_title_tag'][$languages_id]) )
+ $arr['head_title_tag'][$languages_id]='';
+ if(!isset($arr['head_desc_tag'][$languages_id]) )
+ $arr['head_desc_tag'][$languages_id]='';
+ if(!isset($arr['head_keywords_tag'][$languages_id]) )
+ $arr['head_keywords_tag'][$languages_id]='';
}
return $arr;
Modified: trunk/catalog/common/classes/FieldsDisplay.php
===================================================================
--- trunk/catalog/common/classes/FieldsDisplay.php 2013-10-19 14:14:54 UTC (rev 4895)
+++ trunk/catalog/common/classes/FieldsDisplay.php 2013-10-21 19:33:11 UTC (rev 4896)
@@ -132,8 +132,8 @@
$robj->languages_id = $languages[$i]['id'];
- $label = self::FormatLabels($robj, false);
- $input = self::FormatFields($robj, false, $prefix);
+ $label = self::FormatLabels($robj, $edit);
+ $input = self::FormatFields($robj, $edit, $prefix);
$html_string .='<li id="'.str_replace(array('[',']'), array('_'),$prefix).'Tabs-'. $robj->id . '-' . ($i+1).'" >';
$html_string .= str_replace(
@@ -180,7 +180,7 @@
global $oscss;
$input = '';
- $flag_r = ''; //(($rows->required_status==1) ? self::$required: '');
+ $flag_r = '';
$params = '';
$options = explode('@',$rows->input_type);
@@ -195,11 +195,14 @@
case 2:
case 3:
case 4:
-
- if(isset($rows->select_values) && is_array($rows->select_values)){
- foreach($rows->select_values as $k=>$item)
+ if(isset($rows->values_list) && is_array($rows->values_list)){
+ foreach($rows->values_list as $k=>$item)
if( (int)$rows->input_value == (int)$item['id']) $input .= $item['text'];
}
+ elseif(isset($rows->select_values) && is_array($rows->select_values)){
+ foreach($rows->select_values as $k=>$item)
+ if(in_array($item['id'], (array)$rows->input_value))$input .= $item['text'];
+ }
else
$input .= substr($rows->input_value,0, -1);
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-19 14:14:59
|
Revision: 4895
http://sourceforge.net/p/oscss/svn/4895
Author: oscim
Date: 2013-10-19 14:14:54 +0000 (Sat, 19 Oct 2013)
Log Message:
-----------
Fix new generate edit form , clean code, delete olds files
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/MLinkTo.php
trunk/catalog/admin/includes/classes/drivers/sqlcontent.php
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt
trunk/catalog/admin/includes/modules/pages/cms_content.php
Removed Paths:
-------------
trunk/catalog/admin/includes/gabarit/cms_content/display_view.delete.gab
trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab
Modified: trunk/catalog/admin/includes/classes/MLinkTo.php
===================================================================
--- trunk/catalog/admin/includes/classes/MLinkTo.php 2013-10-19 08:41:53 UTC (rev 4894)
+++ trunk/catalog/admin/includes/classes/MLinkTo.php 2013-10-19 14:14:54 UTC (rev 4895)
@@ -10,7 +10,7 @@
@class MLinkTo
@brief Cette classe assure les liaison entre les datyape enfants les les datyape RootListing.
Elle fournit les gabarit htmls de liaison destiné à être inséré dans les form d'edition
- @note elle n'est compatible qu'avaec les module de type ModTwo
+ @note elle n'est compatible qu'avec les module de type ModTwo
*/
class MLinkTo {
@@ -178,8 +178,9 @@
private static function RetroClassName($classname){
switch($classname){
+ case 'cms_content':
case 'content': // retro compatible
- return 'cms_'.$classname;
+ return 'cms_content';
break;
// case 'product': // retro compatible
// return $classname.'s';
Modified: trunk/catalog/admin/includes/classes/drivers/sqlcontent.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcontent.php 2013-10-19 08:41:53 UTC (rev 4894)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcontent.php 2013-10-19 14:14:54 UTC (rev 4895)
@@ -121,35 +121,32 @@
$sql_data_array = array_merge($sql_data_array, self::$modules->get_update_table_content());
-
if(count($sql_data_array) > 0 )
if ( ! tep_db_perform(TABLE_CONTENT, $sql_data_array, 'update', "content_id = '" . (int)$content_id . "'") )
$error++;
- // no touch if just update one rows
-// if(count($sql_data_array) >= 3 ) {
$r = MLinkTo::SqlLeftTo('content', $content_id, $post['linkto']) ;
if($r == false)
$error++;
-// }
for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
$sql_data_array = array();
$language_id = $list_languages[$i]['id'];
- if(isset($post['cms_content']['content_text'][$language_id]) && is_array($post['cms_content']['content_text']) )
+ if(isset($post['cms_content']['content_text'][$language_id]) && !empty($post['cms_content']['content_text'][$language_id]) )
$sql_data_array['content_text'] = tep_db_prepare_input($post['cms_content']['content_text'][$language_id]) ;
elseif(isset($post['cms_content']['content_text']) && is_string($post['cms_content']['content_text']) )
$sql_data_array['content_text'] = tep_db_prepare_input($post['cms_content']['content_text']) ;
- if(isset($post['cms_content']['content_title'][$language_id]) && is_array($post['cms_content']['content_title']) )
+ if(isset($post['cms_content']['content_title'][$language_id]) && !empty($post['cms_content']['content_title'][$language_id]) )
$sql_data_array['content_title'] = tep_db_prepare_input($post['cms_content']['content_title'][$language_id]) ;
elseif(isset($post['cms_content']['content_title']) && is_string($post['cms_content']['content_title']) )
$sql_data_array['content_title'] = tep_db_prepare_input($post['cms_content']['content_title']) ;
+
$sql_data_array = array_merge($sql_data_array, self::$modules->get_update_table_content_description ($language_id));
if(count($sql_data_array) > 0)
@@ -168,8 +165,6 @@
$DB->commitTransaction();
return 1;
}
-
-// return $content_id;
}
@@ -210,11 +205,6 @@
$sql .="AND c.content_id = '".(int)tep_db_input($option['id'])."' ";
}
-// if(isset($option['language_id'])){
-// $languages_id = (int)$option['language_id'];
-// $sql .="AND pd.language_id = '".(int)tep_db_input($option['language_id'])."' ";
-// }
-
if(isset($option['catid'])){
$languages_id = (int)$option['catid'];
$sql .="AND c2c.categories_id = '".(int)tep_db_input($option['catid'])."' ";
@@ -225,7 +215,7 @@
if(strlen($sql)<4)
return false;
- $res = $DB->query($sql="select c.content_id, content_name, date_added, last_modified, content_status from " . TABLE_CONTENT . " c LEFT JOIN " . TABLE_CONTENT_TO_CATEGORIES . " c2c on(c.content_id=c2c.content_id) WHERE ".$sql." GROUP BY c.content_id");
+ $res = $DB->query($sql="select c.* from " . TABLE_CONTENT . " c LEFT JOIN " . TABLE_CONTENT_TO_CATEGORIES . " c2c on(c.content_id=c2c.content_id) WHERE ".$sql." GROUP BY c.content_id");
$num = $res->__get('numRows');
@@ -372,8 +362,8 @@
);
for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
- $par['text'][$list_languages[$i]['id']] = '';
- $par['title'][$list_languages[$i]['id']] = '';
+ $par['text'][$list_languages[$i]['id']] = '';
+ $par['title'][$list_languages[$i]['id']] = '';
}
return self::CleanKey($par);
Deleted: trunk/catalog/admin/includes/gabarit/cms_content/display_view.delete.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/cms_content/display_view.delete.gab 2013-10-19 08:41:53 UTC (rev 4894)
+++ trunk/catalog/admin/includes/gabarit/cms_content/display_view.delete.gab 2013-10-19 14:14:54 UTC (rev 4895)
@@ -1,23 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 08/04/2012, 19:07
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-
-?>
-<div class="box_uniq">
- <h3><?php echo __('text info heading delete content'); ?></h3>
-
- <?php echo tep_draw_form('content', cms_content::FILENAME, 'cID=' . cms_content::$Id . '&action=deleteconfirm') ?>
- <p><?php echo __('text info delete content intro') ?></p>
- <p><?php echo cms_content::$Info->content_name ; ?></p>
- <div class="button_nav">
- <?php echo tep_image_submit('button_delete.gif', IMAGE_DELETE) .tep_js_back(tep_href_link(cms_content::FILENAME, 'cID=' . cms_content::$Info->content_id), IMAGE_CANCEL); ?>
- </div>
- </form>
-</div>
\ No newline at end of file
Deleted: trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab 2013-10-19 08:41:53 UTC (rev 4894)
+++ trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab 2013-10-19 14:14:54 UTC (rev 4895)
@@ -1,99 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.2
- @date 30/09/2013, 09:48
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-global $oscss;
-$contents=array();
-
-?>
-<h3><?php echo __('heading title edit'); ?></h3>
-<div class="box_uniq block_form">
-<?php echo tep_draw_form('review', cms_content::FILENAME, 'cID=' . (int)@$_GET['cID'] . '&action='.((cms_content::$action=='new')?'insert': 'update'),'post'); ?>
-
- <div id="tabs">
- <ul>
- <li><a href="#tabs-1"><?php echo __('tab content data'); ?></a></li>
- <?php
- $g=6;
- cms_content::$modules->display_edit($contents,@$cID);
- if(is_array($contents))
- foreach ($contents as $value) {
- if(!empty($value['title']))echo '<li><a href="#tabs-'.$g.'">'.$value['title'].'</a></li>'."\n";
- $g++;
- } ?>
- </ul>
-
-
- <div class="edit box_left w_70" >
- <div id="tabs-1" class="tabPage">
-
- <?php echo cms_content::DisplayField('title'); ?>
-
- <?php echo cms_content::DisplayField('text'); ?>
-
- </div>
- <?php
- $g=6;
- if(is_array($contents)){
- reset($contents);
- foreach ($contents as $value) {
- echo '<div id="tabs-'.$g.'" class="tabPage">'."\n";
- if (!empty($value['text'])) echo $value['text']."\n";
- else echo '<br />';
- echo '<div class="separator"></div></div>'."\n";
- $g++;
- }
- } ?>
-
- <div class="separator"></div>
- </div>
-
-
-
- <div class="edit box_right w_30">
-
- <fieldset class="block_field">
- <dl>
- <dt class="block_input">
- <label for="content_name" title="<?php echo __('entry content help'); ?>"><?php echo __('entry content').tep_image(DIR_WS_ICONS .'icon_help.gif') ?></label>
- <?php echo tep_draw_input_field('content_name', '', cms_content::$Info->name) . tep_draw_hidden_field('p_format','','HTML'); ?>
- </dt>
-
- <dt class="block_input">
- <?php echo cms_content::DisplayField('status', '%s'); ?>
- </dt>
-
- <!-- All LinkTo -->
- <dt class="tabs block_input w_90">
- <?php $linkto =MLinkTo::LoadRightTo( 'content', 'edit' , 'action='.cms_content::$action.'&cID='.@$_GET['cID'] ); ?>
- <ul>
- <?php $j=0;foreach($linkto as $row): $j++; ?>
- <li><a href="#tabslinkto-<?php echo $j ?>"><?php echo $row['title'] ;?></a></li>
- <?php endforeach;?>
- </ul>
- <?php $j=0;foreach($linkto as $row): $j++; ?>
- <div id="tabslinkto-<?php echo $j ?>">
- <?php echo $row['text'] ;?>
- </div>
- <?php endforeach;?>
- </dt>
-
-
- <dt class="block_input button_nav" >
- <?php echo tep_image_submit('', IMAGE_UPDATE) . tep_image_submit('', IMAGE_UPDATE_AND_CLOSE,' name="up_and_close"' );?>
- <?php echo tep_js_back(tep_href_link(cms_content::FILENAME, 'cID=' . cms_content::$Info->id), IMAGE_CANCEL); ?>
- </dt>
- </dl>
- </fieldset>
- </div>
-
- <div class="separator"></div>
- </div>
-</form>
-</div>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt 2013-10-19 08:41:53 UTC (rev 4894)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt 2013-10-19 14:14:54 UTC (rev 4895)
@@ -9,10 +9,6 @@
@encode UTF-8
*/
-
-
-
-
/* listing */
/* Heading */
$lang['heading title cms_content']="Gestion des pages" ;
@@ -32,10 +28,16 @@
$lang['cms_content table heading date_added']="Crée(s)" ;
$lang['cms_content table heading last modified']="Modifié(s)" ;
$lang['cms_content table heading status']="État" ;
- $lang['cms_content table heading hidden']="Menu" ;
+ $lang['cms_content table heading hidden']="Visible" ;
$lang['@cms_content table heading action']="Action" ;
- /* MessageStack */
+ /* detail inline */
+ $lang['text info date added']="Date d'ajout :" ;
+ $lang['text info last modified']="Dernière modification :" ;
+ $lang['text info content size']="Taille :" ;
+ $lang['txt info permalink']="Lien vers cette page: " ;
+
+ /* MessageStack */
$lang['@cms_content error in update process']="Erreur lors de l'enregsitrement de la page" ;
$lang['@cms_content success in update process']="Mise à jour reussie" ;
$lang['@cms_content update status']="Changement de l'état de la page" ;
@@ -53,41 +55,26 @@
$lang['text info intro choose content type']="Le type de contenu que vous créer impactera les options d'edition et d'affichage de votre texte. (depend de la prise en charge du theme public et de ces options)" ;
/* Edit */
+ /* title */
+ $lang['@cms_content heading title edit']="Édition d'une page" ;
+ /* tab */
+ $lang['@cms_content tab data']="Contenu" ;
/* */
- $lang['heading title edit']="Édition d'une page" ;
$lang['entry content']="Clef : " ;
$lang['entry content help']="La clef permet l'appel de cette page, elle ce doit d'être unique. Pour appeler plusieurs page, il est possible d'utiliser une racine de clef commune " ;
$lang['@cms_content text status off']="Non publié" ;
$lang['@cms_content text status on']="Publié" ;
+ $lang['@cms_content text hidden off']="Caché" ;
+ $lang['@cms_content text hidden on']="Visible" ;
+
/* MessageStack */
$lang['@cms_content key is valid']="Cette clef est disponible " ;
$lang['@cms_content key is already used']="Cette clef est déjà utilisé " ;
-/* other */
-
-
-$lang['text info delete content intro']="Êtes-vous sûr de vouloir supprimer ce contenu ?" ;
-$lang['text info date added']="Date d'ajout :" ;
-$lang['text info last modified']="Dernière modification :" ;
-$lang['text info image nonexistent']="L'IMAGE N'EXISTE PAS" ;
-$lang['text info content size']="Taille :" ;
-$lang['text info heading delete content']="Supprimer le contenu" ;
-
-$lang['entry title']="Titre " ;
-$lang['text content status']="Statut :" ;
-
-$lang['text content enabled']="Actif" ;
-$lang['text content disabled']="Inactif" ;
-$lang['txt info permalink']="Lien vers cette page: " ;
-$lang['txt cat all']="Toutes" ;
-$lang['heading title goto']="Lister les articles de la catégorie" ;
-$lang['heading title search']="Chercher" ;
-$lang['txt categories']="Catégories" ;
-$lang['tab content data']="Contenu" ;
-
-
-
+/* Delete */
+ $lang['heading title delete cms_content']="Suppression d'un contenu" ;
+ $lang['text info delete cms_content']="Êtes-vous sûr de vouloir supprimer ce contenu ?" ;
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/modules/pages/cms_content.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/cms_content.php 2013-10-19 08:41:53 UTC (rev 4894)
+++ trunk/catalog/admin/includes/modules/pages/cms_content.php 2013-10-19 14:14:54 UTC (rev 4895)
@@ -33,23 +33,10 @@
@var object
*/
public static $list=array();
-
/**
- @var object
- */
-// public static $Info;
- /**
@var array
*/
public static $languages;
- /**
- @var bool
- */
- public static $enabled_status;
- /**
- @var bool
- */
- public static $disabled_status;
@@ -133,6 +120,8 @@
// 'required_status'=>false,
'reedit'=>false,
'input_size'=>'32',
+ 'position_col'=>'right',
+ 'position_grp'=>5
),
),
'cd.content_title' => array(
@@ -234,6 +223,8 @@
array('id'=>0, 'text'=>__('@cms_content text status off') ),
array('id'=>1, 'text'=>__('@cms_content text status on') ),
),
+ 'position_col'=>'right',
+ 'position_grp'=>5
),
);
self::$allfields['c.content_hidden'] = array(
@@ -242,6 +233,17 @@
'text'=>__('cms_content table heading hidden'),
'width'=>'5%',
'default'=>true,
+ 'edit'=>array(
+ 'input_type'=>'radio',
+ 'input_size'=>'1',
+ 'input_name'=>'content_hidden',
+ 'values_list'=>array(
+ array('id'=>0, 'text'=>__('@cms_content text hidden off') ),
+ array('id'=>1, 'text'=>__('@cms_content text hidden on') ),
+ ),
+ 'position_col'=>'right',
+ 'position_grp'=>6
+ ),
);
@@ -478,45 +480,58 @@
@remarks normal page
*/
case 'insert':
- $type = ( isset($_POST['content_name']) ? tep_db_prepare_input($_POST['content_name']) : 1 );
+ try {
+ $type = ( isset($_POST['content_name']) ? tep_db_prepare_input($_POST['content_name']) : 1 );
- $params['sqlarray'] = array(
- 'content_type' => $type,
- 'content_name' => '',
- 'content_status' => '',
- );
+ $params['sqlarray'] = array(
+ 'content_type' => $type,
+ 'content_name' => '',
+ 'content_status' => '',
+ );
- $content_id=sqlcontent::create($params);
+ $content_id=sqlcontent::create($params);
- tep_redirect(tep_href_link(self::FILENAME, 'page=' . $_GET['page'] . '&cID=' . $content_id.'&action=edit'));
-
+ tep_redirect(tep_href_link(self::FILENAME, 'page=' . $_GET['page'] . '&cID=' . $content_id.'&action=edit'));
+ }
+ catch (Exception $e) {
+ $messageStack->add_session($e->getMessage() , 'error');
+ }
break;
case 'update':
+ try {
+ if(self::$Id <=0 )
+ throw new Exception(__('@cms_content error load data')) ;
- if (isset($_GET['cID']) && (int)$_GET['cID']>0)
- $content_id = tep_db_prepare_input($_GET['cID']);
+ $params['sqlarray'] = array(
+ 'content_status' => tep_db_prepare_input($_POST['content_status']),
+ 'content_hidden' => tep_db_prepare_input($_POST['content_hidden']),
+ );
- $params['sqlarray'] = array(
- 'content_name' => tep_db_prepare_input($_POST['content_name']),
- 'content_status' => tep_db_prepare_input($_POST['content_status']),
- );
+ if (isset($_POST['content_name']))
+ $params['sqlarray']['content_name'] = tep_db_prepare_input($_POST['content_name']);
- if (isset($content_id))
- $params['id']=$content_id;
- $params['action']=self::$action;
- $params['post']=$_POST;
- $params['language_id']= $languages_id;
- $params['cPath']=(isset($_POST['cPath'])) ? tep_db_prepare_input($_POST['cPath']) : 0;
+ $params['id']= self::$Id;
+ $params['action']=self::$action;
+ $params['post']=$_POST;
+ $params['language_id']= $languages_id;
- if( ! sqlcontent::update($params) )
- $messageStack->add_session(__('@cms_content error in update process'), 'error');
- else
+ if( ! sqlcontent::update($params) )
+ throw new Exception(__('@cms_content error in update process')) ;
+
$messageStack->add_session(__('@cms_content success in update process'), 'success');
- if(isset($_POST['up_and_close']) ) tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array( 'cID','flag','action'),false)) );
- else tep_redirect(tep_href_link(self::FILENAME, 'page=' . $_GET['page'] . '&cID=' . $content_id.'&action=edit'));
+ if(!isset($_POST['up_and_close']) )
+ tep_redirect(tep_href_link(self::FILENAME, 'cID=' . self::$Id.'&action=edit'));
+
+ }
+ catch (Exception $e) {
+ $messageStack->add_session($e->getMessage() , 'error');
+ }
+
+ // generic redirect if error
+ tep_redirect(tep_href_link(self::FILENAME) );
break;
@@ -524,15 +539,23 @@
@remarks Delete post
*/
case 'deleteconfirm':
- $content_id = tep_db_prepare_input((int)$_GET['cID']);
+ try {
+ if(self::$Id <=0 )
+ throw new Exception(__('@cms_content error load data')) ;
- if( !sqlcontent::delete(array('id'=>$content_id)) )
- $messageStack->add_session(sprintf(__('error delet for post id %s'), $content_id ), 'error');
- else
- $messageStack->add_session(sprintf(__('delete post id %s success'), $content_id ), 'success');
- tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array( 'cID','flag','action'),false)));
+ if( !sqlcontent::delete(array('id'=>self::$Id)) )
+ throw new Exception( sprintf(__('error delet for post id %s'), self::$Id ) ) ;
+
+ $messageStack->add_session(sprintf(__('delete post id %s success'), self::$Id ), 'success');
+
+ }
+ catch (Exception $e) {
+ $messageStack->add_session($e->getMessage() , 'error');
+ }
+
+ tep_redirect(tep_href_link(self::FILENAME) );
break;
@@ -737,17 +760,18 @@
/**
@remarks Normal View Page
*/
+ case 'new':
+ self::$Info=self::load_db_values(-1);
+ return MGabCont::CallGab(self::$action,__FUNCTION__,__CLASS__);
+ break;
+ case 'edit':
case 'delete':
- case 'edit':
self::$Info=self::GetDBValue(self::$Id);
/// use master gabarit
- return MGabCont::CallGab(self::$action,__FUNCTION__,__CLASS__);
+ return MGabCont::CallGab(self::$action,__FUNCTION__,self::MASTER);
break;
- case 'new':
- self::$Info=self::load_db_values(-1);
- return MGabCont::CallGab(self::$action,__FUNCTION__,__CLASS__);
- break;
+ case 'listing':
default:
self::$list=self::tep_get_list();
/// use master gabarit
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-19 08:41:57
|
Revision: 4894
http://sourceforge.net/p/oscss/svn/4894
Author: oscim
Date: 2013-10-19 08:41:53 +0000 (Sat, 19 Oct 2013)
Log Message:
-----------
Fix
Add html agabrit for generate form generic
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/MGabCont.php
trunk/catalog/admin/includes/classes/ModTwo.php
trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php
trunk/catalog/admin/includes/modules/pages/categories.php
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/MGabCont/display_view.edit.gab
Modified: trunk/catalog/admin/includes/classes/MGabCont.php
===================================================================
--- trunk/catalog/admin/includes/classes/MGabCont.php 2013-10-17 06:40:08 UTC (rev 4893)
+++ trunk/catalog/admin/includes/classes/MGabCont.php 2013-10-19 08:41:53 UTC (rev 4894)
@@ -99,7 +99,7 @@
Use in gabarit file
*/
public static function CallSt($method,$arg=''){
- if(self::$Name===false)
+ if(self::$Name===false)
return false;
return @call_user_func(array(self::$Name, $method), $arg);
Modified: trunk/catalog/admin/includes/classes/ModTwo.php
===================================================================
--- trunk/catalog/admin/includes/classes/ModTwo.php 2013-10-17 06:40:08 UTC (rev 4893)
+++ trunk/catalog/admin/includes/classes/ModTwo.php 2013-10-19 08:41:53 UTC (rev 4894)
@@ -376,7 +376,7 @@
$_SESSION['filters'][self::$code]['subtype'][$key] = 'on';
}
- // if class containt submodule
+ // if class containt submodule
if(isset(self::$modules) )
self::$modules->__call('check_action', array('action'=>'ModTwofilters'));
}
@@ -571,7 +571,7 @@
$txt = (isset($row['text_short'])? $row['text_short'] : $row['text']) ;
$alias = (isset($row['alias'])? $row['alias'] : $clean);
$css = (isset($row['class'])? $row['class'] : 'tleft')
- // add css class for jseditable
+ // add css class for jseditable
.(isset($row['edit'])? ' edit_dbclick': '' );
$width = (isset($row['width'])? $row['width'] : '5%');
@@ -585,9 +585,17 @@
// put for all other context
self::$InitInfo['edit']['listing']['edit_'.$alias] = $row['edit'];
- self::$InitInfo['edit']['multi']['edit_'.$alias] = $row['edit'];
- self::$InitInfo['edit']['listing_edit']['edit_'.$alias] = $row['edit'];
+// self::$InitInfo['edit']['multi']['edit_'.$alias] = $row['edit'];
+// self::$InitInfo['edit']['listing_edit']['edit_'.$alias] = $row['edit'];
+ $colum = (isset($row['edit']['position_col'])? $row['edit']['position_col']: 'left' );
+ $grp = (isset($row['edit']['position_grp'])? $row['edit']['position_grp']: 5 );
+
+ self::$InitInfo['colum'][$colum][$grp][] = $alias;
+// [$alias] = array(
+// 'col'=>$row['edit']['position_col'],
+// 'grp'=>$row['edit']['position_grp'],
+// );
// unset($row['edit']);
}
@@ -734,20 +742,41 @@
@return bool flase or array
*/
public static function DisplayField($key, $format = '<p class="block_input input-one">%s</p>', $obj=false){
+
if(!$obj)
$obj = self::$Info;
if(is_array($obj))
- $obj = new arrayInfo($obj);
+ $obj = new objectInfo($obj);
$edit = ((substr($key,0,5) !='edit_' ) ? 'edit_'.$key : $key);
- if(isset($obj->$edit))
+ if(isset($obj->$edit)){
+ if(is_array($obj->$edit))
+ $obj->$edit = new objectInfo($obj->$edit);
+
return FieldsDisplay::DisplayRow($obj->$edit, (( self::$action!='noedit')? false : true ), $format) ;
+ }
else
return '';
}
+
+ public static function DisplayCol($colum='left'){
+ $array=array();
+ if(isset(self::$InitInfo['colum'][$colum]) ){
+ ksort(self::$InitInfo['colum'][$colum]);
+
+ foreach(self::$InitInfo['colum'][$colum] as $grp)
+ foreach($grp as $row)
+ $array[] = $row;
+
+ }
+
+ return $array;
+ }
+
+
/**
@brief return classs name
*/
Modified: trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php 2013-10-17 06:40:08 UTC (rev 4893)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php 2013-10-19 08:41:53 UTC (rev 4894)
@@ -141,9 +141,7 @@
else
$id = (int)$option['id'];
-// if( ! isset($option['post']) )
-// self::$error = __('no post');
-// else
+
if( isset($option['post']) )
$post = $option['post'];
@@ -188,12 +186,12 @@
$language_id = (int)$list_languages[$i]['id'];
$sql_data_array = array();
- if(!empty($categories_name_array[$language_id]) && is_array($categories_name_array[$language_id]))
+ if(isset($categories_name_array[$language_id]) && !empty($categories_name_array[$language_id]))
$sql_data_array['categories_name'] = tep_db_prepare_input($categories_name_array[$language_id]);
elseif(!empty($categories_name_array) && is_string($categories_name_array))
$sql_data_array['categories_name'] = tep_db_prepare_input($categories_name_array);
- if(!empty($categories_desc_array[$language_id]) && is_array($categories_desc_array[$language_id]) )
+ if(isset($categories_desc_array[$language_id]) && !empty($categories_desc_array[$language_id]) )
$sql_data_array['categories_description'] =tep_db_prepare_input($categories_desc_array[$language_id]);
elseif(!empty($categories_desc_array) && is_string($categories_desc_array))
$sql_data_array['categories_description'] = tep_db_prepare_input($categories_desc_array);
@@ -447,15 +445,12 @@
$res = $DB->query($sql="SELECT * FROM " . $table . " WHERE ".$datatype."_id = " . (int)$id . " ");
-
+ $list = array();
foreach($res->fetchAllAssoc() as $row)
$list[] = new objectInfo( $row );
- if(is_object($list))
- $liste[]=$list;
- else
- $liste=$list;
+ $liste=$list;
return $liste;
}
Added: trunk/catalog/admin/includes/gabarit/MGabCont/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/MGabCont/display_view.edit.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/MGabCont/display_view.edit.gab 2013-10-19 08:41:53 UTC (rev 4894)
@@ -0,0 +1,120 @@
+<?php
+/**
+ @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.2
+ @date 19/10/2013, 09:17
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+$page= MGabCont::CallSt('GetClassName');
+
+?>
+<h3><?php echo __('@'.$page.' heading title edit'); ?></h3>
+
+
+<?php
+ /**
+ @remarks Call generic menu define in page module for display action bouton in header html page
+ */
+?>
+<div class="button_nav">
+ <?php foreach(MGabCont::CallSt('DMenuModule') as $item): ?>
+ <?php echo $item ?>
+ <?php endforeach; ?>
+</div>
+
+
+
+
+<div class="box_uniq block_form">
+<?php echo tep_draw_form($page, $page::FILENAME, 'action='.(($page::$action=='new')?'insert': 'update&cID=' . $page::$Info->id ),'post'); ?>
+
+ <div id="tabs">
+ <ul>
+ <li><a href="#tabs-1"><?php echo __('@'.$page.' tab data'); ?></a></li>
+ <?php
+ if(isset($page::$modules ) ) {
+ $g=6;
+ $page::$modules->display_edit($contents,@$cID);
+ if(is_array($contents))
+ foreach ($contents as $value) {
+ if(!empty($value['title']))echo '<li><a href="#tabs-'.$g.'">'.$value['title'].'</a></li>'."\n";
+ $g++;
+ }
+ }
+ ?>
+ </ul>
+
+
+ <div class="edit box_left w_70" >
+ <div id="tabs-1" class="tabPage">
+
+ <?php foreach (MGabCont::CallSt('DisplayCol','left') as $value): ?>
+ <?php echo $page::DisplayField($value, '<p class="block_input input-one">%s</p>', $page::$Info); ?>
+ <?php endforeach; ?>
+
+
+
+
+ </div>
+ <?php
+ $g=6;
+ if(is_array($contents)){
+ reset($contents);
+ foreach ($contents as $value) {
+ echo '<div id="tabs-'.$g.'" class="tabPage">'."\n";
+ if (!empty($value['text'])) echo $value['text']."\n";
+ else echo '<br />';
+ echo '<div class="separator"></div></div>'."\n";
+ $g++;
+ }
+ }
+ ?>
+
+ <div class="separator"></div>
+ </div>
+
+
+
+ <div class="edit box_right w_30">
+
+ <fieldset class="block_field">
+ <dl>
+
+ <?php foreach (MGabCont::CallSt('DisplayCol','right') as $value): ?>
+ <?php echo $page::DisplayField($value, '<p class="block_input input-one">%s</p>', $page::$Info ); ?>
+ <?php endforeach; ?>
+
+ <!-- All LinkTo -->
+ <dt class="tabs block_input w_90">
+ <?php $linkto =MLinkTo::LoadRightTo( $page, 'edit' , 'action='.$page::$action.'&cID='. $page::$Info->id ); ?>
+ <ul>
+ <?php $j=0;foreach($linkto as $row): $j++; ?>
+ <li><a href="#tabslinkto-<?php echo $j ?>"><?php echo $row['title'] ;?></a></li>
+ <?php endforeach;?>
+ </ul>
+ <?php $j=0;foreach($linkto as $row): $j++; ?>
+ <div id="tabslinkto-<?php echo $j ?>">
+ <?php echo $row['text'] ;?>
+ </div>
+ <?php endforeach;?>
+ </dt>
+
+
+ <dt class="block_input button_nav" >
+ <?php if($page::$action=='new')
+ echo tep_image_submit('', IMAGE_CREATE);
+ else
+ echo tep_image_submit('', IMAGE_UPDATE) . tep_image_submit('', IMAGE_UPDATE_AND_CLOSE,' name="up_and_close"' );?>
+ <?php echo tep_js_back(tep_href_link($page::FILENAME, 'cID=' . $page::$Info->id), IMAGE_CANCEL); ?>
+ </dt>
+ </dl>
+ </fieldset>
+ </div>
+
+ <div class="separator"></div>
+ </div>
+</form>
+</div>
Modified: trunk/catalog/admin/includes/modules/pages/categories.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/categories.php 2013-10-17 06:40:08 UTC (rev 4893)
+++ trunk/catalog/admin/includes/modules/pages/categories.php 2013-10-19 08:41:53 UTC (rev 4894)
@@ -159,6 +159,8 @@
'edit'=>array(
'input_name'=>'parent_id',
'input_type'=>'select',
+ 'input_size'=>'1',
+ 'class'=>'tleft',
'select_values'=>$list_parent,
),
);
@@ -232,6 +234,8 @@
array('id'=>0, 'text'=>__('@categories text status off') ),
array('id'=>1, 'text'=>__('@categories text status on') ),
),
+ 'position_col'=>'right',
+ 'position_grp'=>5
),
);
self::$allfields['c.categories_hidden'] = array(
@@ -248,6 +252,8 @@
array('id'=>0, 'text'=>__('@categories text hidden off') ),
array('id'=>1, 'text'=>__('@categories text hidden on') ),
),
+ 'position_col'=>'right',
+ 'position_grp'=>5
),
);
self::$allfields['c.date_added'] = array(
@@ -517,9 +523,6 @@
case 'update':
- if (isset($_POST['categories_id'])) $categories_id = tep_db_prepare_input((int)$_POST['categories_id']);
-
-
$params['sqlarray'] = array('sort_order' => (isset($_POST['sort_order'])) ? tep_db_prepare_input((int)$_POST['sort_order']) : 0 ,
'parent_id' => tep_db_prepare_input((int)@$_POST['cPath']),
'categories_status' => (isset($_POST['categories_status'])) ? tep_db_prepare_input((int)$_POST['categories_status']) : 0,
@@ -533,14 +536,12 @@
$params['sqlarray']['categories_image']='';
- $params['id']=$categories_id;
+ $params['id']=self::$Id;
$params['action']=self::$action;
$params['post']=$_POST;
$params['language_id']= $languages_id;
$params['cPath']=(isset($_POST['cPath'])) ? tep_db_prepare_input($_POST['cPath']) : 0;
-
-
if (self::$action == 'insert')
$res = sqlcategorie::create($params);
elseif (self::$action == 'update')
@@ -550,15 +551,15 @@
if( ! $res )
$messageStack->add_session(sprintf(__('error save categorie : %s'), sqlcategorie::$error ), 'error');
else
- $messageStack->add_session(sprintf(__('save categorie %s success'), $categories_id ), 'success');
+ $messageStack->add_session(sprintf(__('save categorie %s success'), self::$Id ), 'success');
/// clear cache for all file name based on datatype
osCSS_Cache::clear('categorie', true);
- if(isset($_POST['up_and_close']) ) tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . self::$cPath . '&cID=' . $categories_id));
- else tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . self::$cPath . '&cID=' . $categories_id.'&action=edit'));
+ if(isset($_POST['up_and_close']) ) tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . self::$cPath . '&cID=' . self::$Id));
+ else tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . self::$cPath . '&cID=' . self::$Id.'&action=edit'));
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-17 06:40:12
|
Revision: 4893
http://sourceforge.net/p/oscss/svn/4893
Author: oscim
Date: 2013-10-17 06:40:08 +0000 (Thu, 17 Oct 2013)
Log Message:
-----------
Fix and clean
Modified Paths:
--------------
trunk/catalog/admin/includes/content/modules.top.inc
Removed Paths:
-------------
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_27.txt
Modified: trunk/catalog/admin/includes/content/modules.top.inc
===================================================================
--- trunk/catalog/admin/includes/content/modules.top.inc 2013-10-17 06:37:53 UTC (rev 4892)
+++ trunk/catalog/admin/includes/content/modules.top.inc 2013-10-17 06:40:08 UTC (rev 4893)
@@ -35,7 +35,6 @@
case 'general':
default:
$code_inistalletd_array['generic']=array('key'=>'MODULE_GENERIC_INSTALLED', 'value'=>MODULE_GENERIC_INSTALLED, 'key_BO'=>'MODULE_GENERIC_INSTALLED_BO', 'value_BO'=>MODULE_GENERIC_INSTALLED_BO,'module_directory'=>'generic/','module_language'=>DIR_FS_ADMIN.'includes/languages/', 'prefix'=>'');
- $code_inistalletd_array['categories']=array('key'=>'MODULE_ACACAT_INSTALLED', 'value'=>MODULE_ACACAT_INSTALLED ,'key_BO'=>'MODULE_ACACAT_INSTALLED_BO', 'value_BO'=>MODULE_ACACAT_INSTALLED_BO,'module_directory'=> 'categories/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES , 'prefix'=>'');
$code_inistalletd_array['listing']=array('key'=>'MODULE_LISTING_INSTALLED', 'value'=>MODULE_LISTING_INSTALLED,'key_BO'=>'MODULE_LISTING_INSTALLED_BO', 'value_BO'=>@MODULE_LISTING_INSTALLED_BO,'module_directory'=> 'listing/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES , 'prefix'=>'');
$code_inistalletd_array['home']=array('key'=>'MODULE_HOME_INSTALLED', 'value'=>MODULE_HOME_INSTALLED, 'key_BO'=>'MODULE_HOME_INSTALLED_BO', 'value_BO'=>MODULE_HOME_INSTALLED_BO ,'module_directory'=>'home/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES , 'prefix'=>'');
Deleted: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_27.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_27.txt 2013-10-17 06:37:53 UTC (rev 4892)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_27.txt 2013-10-17 06:40:08 UTC (rev 4893)
@@ -1,14 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 24/10/11, 11:18
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-
-
-
-?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-17 06:37:59
|
Revision: 4892
http://sourceforge.net/p/oscss/svn/4892
Author: oscim
Date: 2013-10-17 06:37:53 +0000 (Thu, 17 Oct 2013)
Log Message:
-----------
add files and fix
Modified Paths:
--------------
trunk/extensions/REVIEWS_stable/install.xml
Added Paths:
-----------
trunk/extensions/REVIEWS_stable/catalog/admin/includes/gabarit/
Modified: trunk/extensions/REVIEWS_stable/install.xml
===================================================================
--- trunk/extensions/REVIEWS_stable/install.xml 2013-10-17 06:35:36 UTC (rev 4891)
+++ trunk/extensions/REVIEWS_stable/install.xml 2013-10-17 06:37:53 UTC (rev 4892)
@@ -35,7 +35,9 @@
<file name="admin/includes/modules/account/reviews.php" />
<file name="admin/includes/modules/products/reviews.php" />
+ <file name="admin/includes/gabarit/customers/reviews/display_edit.noedit.gab" />
+
<file name="common/classes/common_reviews.php" />
<file name="includes/content/listing_reviews.php" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-17 06:35:42
|
Revision: 4891
http://sourceforge.net/p/oscss/svn/4891
Author: oscim
Date: 2013-10-17 06:35:36 +0000 (Thu, 17 Oct 2013)
Log Message:
-----------
add base new version for reviews
Added Paths:
-----------
trunk/extensions/REVIEWS_stable/
trunk/extensions/REVIEWS_stable/catalog/
trunk/extensions/REVIEWS_stable/catalog/admin/
trunk/extensions/REVIEWS_stable/catalog/admin/includes/
trunk/extensions/REVIEWS_stable/catalog/admin/includes/content/
trunk/extensions/REVIEWS_stable/catalog/admin/includes/content/reviews.central.inc
trunk/extensions/REVIEWS_stable/catalog/admin/includes/content/reviews.top.inc
trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/
trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/
trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/
trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/account/
trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/account/reviews.txt
trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/products/
trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/products/reviews.php
trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/reviews.php
trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/
trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/account/
trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/account/reviews.php
trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/products/
trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/products/reviews.php
trunk/extensions/REVIEWS_stable/catalog/common/
trunk/extensions/REVIEWS_stable/catalog/common/classes/
trunk/extensions/REVIEWS_stable/catalog/common/classes/common_reviews.php
trunk/extensions/REVIEWS_stable/catalog/includes/
trunk/extensions/REVIEWS_stable/catalog/includes/boxes/
trunk/extensions/REVIEWS_stable/catalog/includes/boxes/reviews.php
trunk/extensions/REVIEWS_stable/catalog/includes/content/
trunk/extensions/REVIEWS_stable/catalog/includes/content/listing_reviews.php
trunk/extensions/REVIEWS_stable/catalog/includes/languages/
trunk/extensions/REVIEWS_stable/catalog/includes/languages/fr_FR/
trunk/extensions/REVIEWS_stable/catalog/includes/languages/fr_FR/modules/
trunk/extensions/REVIEWS_stable/catalog/includes/languages/fr_FR/modules/products/
trunk/extensions/REVIEWS_stable/catalog/includes/languages/fr_FR/modules/products/reviews.php
trunk/extensions/REVIEWS_stable/catalog/includes/modules/
trunk/extensions/REVIEWS_stable/catalog/includes/modules/account/
trunk/extensions/REVIEWS_stable/catalog/includes/modules/account/reviews.php
trunk/extensions/REVIEWS_stable/catalog/includes/modules/content/
trunk/extensions/REVIEWS_stable/catalog/includes/modules/content/reviews.php
trunk/extensions/REVIEWS_stable/catalog/includes/modules/products/
trunk/extensions/REVIEWS_stable/catalog/includes/modules/products/reviews.php
trunk/extensions/REVIEWS_stable/install.xml
trunk/extensions/REVIEWS_stable/layout.zip
trunk/extensions/REVIEWS_stable/sql/
trunk/extensions/REVIEWS_stable/sql/mysql/
trunk/extensions/REVIEWS_stable/sql/mysql/install/
trunk/extensions/REVIEWS_stable/sql/mysql/install/data/
trunk/extensions/REVIEWS_stable/sql/mysql/install/tables/
trunk/extensions/REVIEWS_stable/sql/mysql/install/tables/osc_reviews.sql
trunk/extensions/REVIEWS_stable/sql/mysql/install/tables/osc_reviews_description.sql
trunk/extensions/REVIEWS_stable/sql/mysql/install/tables/osc_reviews_to.sql
trunk/extensions/REVIEWS_stable/sql/mysql/remove/
trunk/extensions/REVIEWS_stable/sql/mysql/remove/data/
trunk/extensions/REVIEWS_stable/sql/mysql/remove/tables/
trunk/extensions/REVIEWS_stable/sql/mysql/remove/tables/osc_reviews.sql
trunk/extensions/REVIEWS_stable/sql/mysql/remove/tables/osc_reviews_description.sql
trunk/extensions/REVIEWS_stable/sql/mysql/remove/tables/osc_reviews_to.sql
Added: trunk/extensions/REVIEWS_stable/catalog/admin/includes/content/reviews.central.inc
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/admin/includes/content/reviews.central.inc (rev 0)
+++ trunk/extensions/REVIEWS_stable/catalog/admin/includes/content/reviews.central.inc 2013-10-17 06:35:36 UTC (rev 4891)
@@ -0,0 +1,224 @@
+<?php
+/*
+ $Id: reviews.php,v 1.3 25.07.2009 16:53:53 oscim Exp $
+// kate: replace-trailing-space-save true; space-indent on; indent-width 4; mixedindent off; indent-mode cstyle; word-wrap-marker-color #41C2A4
++-----------------------------------------------------------------------+
+| osCSS Open Source E-commerce |
++-----------------------------------------------------------------------+
+| Copyright (c) 2005-2009 The osCSS developers |
+| |
+| http://www.oscss.org |
+| |
+| Portions Copyright (c) 2003-2009 osCommerce |
++-----------------------------------------------------------------------+
+| This source file is subject to version 2.0 of the GPL license, |
+| available at the following url: |
+| http://www.oscss.org/license/2_0.txt. |
++-----------------------------------------------------------------------+
+*/
+error_reporting(E_ALL);
+?>
+<h3><?php echo HEADING_TITLE; ?></h3>
+<!-- body_text //-->
+<?php
+/** EDIT */
+
+ if ($action == 'edit') {
+ $rID = tep_db_prepare_input($_GET['rID']);
+
+ $reviews_query = tep_db_query("select r.reviews_id, r.products_id, r.customers_name, r.date_added, r.last_modified, r.reviews_read, rd.reviews_text, r.reviews_rating from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.reviews_id = '" . (int)$rID . "' and r.reviews_id = rd.reviews_id");
+ $reviews = tep_db_fetch_array($reviews_query);
+
+ $products_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int)$reviews['products_id'] . "'");
+ $products = tep_db_fetch_array($products_query);
+
+ $products_name_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$reviews['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
+ $products_name = tep_db_fetch_array($products_name_query);
+
+ $rInfo_array = array_merge($reviews, $products, $products_name);
+ $rInfo = new objectInfo($rInfo_array);
+?>
+ <?php echo tep_draw_form('review', FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $_GET['rID'] . '&action=preview'); ?>
+ <table width="100%" >
+ <tr>
+ <td class="main" valign="top"><b><?php echo ENTRY_PRODUCT; ?></b> <?php echo $rInfo->products_name; ?><br /><b><?php echo ENTRY_FROM; ?></b> <?php echo $rInfo->customers_name; ?><br /><br /><b><?php echo ENTRY_DATE; ?></b> <?php echo tep_date_short($rInfo->date_added); ?></td>
+ <td class="main" align="right" valign="top"><?php echo tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . $rInfo->products_image, $rInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"'); ?></td>
+ </tr>
+ <tr>
+ <td colspan="2"><b><?php echo ENTRY_REVIEW; ?></b><br /><br /><?php echo tep_draw_textarea_field('reviews_text', '', '60', '15', $rInfo->reviews_text); ?></td>
+ </tr>
+
+ <tr>
+ <td colspan="2"><b><?php echo ENTRY_RATING; ?></b> <?php echo TEXT_BAD; ?> <?php for ($i=1; $i<=5; $i++) echo tep_draw_radio_field('reviews_rating','reviews_rating'.$i, $i, '', $rInfo->reviews_rating) . ' '; echo TEXT_GOOD; ?></td>
+ </tr>
+ </table>
+
+
+ <div class="fright"><?php echo tep_draw_hidden_field('reviews_id', '', $rInfo->reviews_id) . tep_draw_hidden_field('products_id', '', $rInfo->products_id) . tep_draw_hidden_field('customers_name', '', $rInfo->customers_name) . tep_draw_hidden_field('products_name', '', $rInfo->products_name) . tep_draw_hidden_field('products_image', '', $rInfo->products_image) . tep_draw_hidden_field('date_added', '', $rInfo->date_added) . tep_image_submit('button_preview.gif', IMAGE_PREVIEW) . ' <a class="button" href="' . tep_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $_GET['rID']) . '">' . IMAGE_CANCEL . '</a>'; ?></div>
+ </form>
+<?php
+/** PREVIEW */
+
+ } elseif ($action == 'preview') {
+ if (tep_not_null($_POST)) {
+ $rInfo = new objectInfo($_POST);
+ } else {
+ $rID = tep_db_prepare_input($_GET['rID']);
+
+ $reviews_query = tep_db_query("select r.reviews_id, r.products_id, r.customers_name, r.date_added, r.last_modified, r.reviews_read, rd.reviews_text, r.reviews_rating from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.reviews_id = '" . (int)$rID . "' and r.reviews_id = rd.reviews_id");
+ $reviews = tep_db_fetch_array($reviews_query);
+
+ $products_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int)$reviews['products_id'] . "'");
+ $products = tep_db_fetch_array($products_query);
+
+ $products_name_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$reviews['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
+ $products_name = tep_db_fetch_array($products_name_query);
+
+ $rInfo_array = array_merge($reviews, $products, $products_name);
+ $rInfo = new objectInfo($rInfo_array);
+ }
+?>
+ <?php echo tep_draw_form('update', FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $_GET['rID'] . '&action=update', 'post', 'enctype="multipart/form-data"'); ?>
+ <table width="100%" >
+ <tr>
+ <td class="main" valign="top"><b><?php echo ENTRY_PRODUCT; ?></b> <?php echo $rInfo->products_name; ?><br /><b><?php echo ENTRY_FROM; ?></b> <?php echo $rInfo->customers_name; ?><br /><br /><b><?php echo ENTRY_DATE; ?></b> <?php echo tep_date_short($rInfo->date_added); ?></td>
+ <td class="main" align="right" valign="top"><?php echo tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . $rInfo->products_image, $rInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"'); ?></td>
+ </tr>
+ <tr>
+ <td colspan="2"><b><?php echo ENTRY_REVIEW; ?></b><br /><br /><?php echo nl2br(tep_db_output(tep_break_string($rInfo->reviews_text, 15))); ?></td>
+ </tr>
+ <tr>
+ <td colspan="2"><b><?php echo ENTRY_RATING; ?></b> <?php echo tep_image(DIR_WS_CATALOG_IMAGES . 'stars_' . $rInfo->reviews_rating . '.gif', sprintf(TEXT_OF_5_STARS, $rInfo->reviews_rating)); ?> <small>[<?php echo sprintf(TEXT_OF_5_STARS, $rInfo->reviews_rating); ?>]</small></td>
+ </tr>
+</table>
+ <div class="button_nav">
+<?php
+ if (tep_not_null($_POST)) {
+/* Re-Post all POST'ed variables */
+ reset($_POST);
+ while(list($key, $value) = each($_POST)) echo tep_draw_hidden_field($key, '', $value);
+ echo '<a class="button" href="' . tep_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=edit') . '">' . IMAGE_BACK . '</a> ' . tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a class="button" href="' . tep_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id) . '">' .IMAGE_CANCEL . '</a>';
+ } else {
+ if (isset($_GET['origin'])) {
+ $back_url = $_GET['origin'];
+ $back_url_params = '';
+ } else {
+ $back_url = FILENAME_REVIEWS;
+ $back_url_params = 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id;
+ }
+ echo '<a class="button" href="' . tep_href_link($back_url, $back_url_params, 'NONSSL') . '">' . IMAGE_BACK . '</a>';
+ }
+?>
+ </div>
+ </form>
+
+<?php
+/** LIST */
+
+ } else {
+?>
+<div class="box_left">
+ <table style="width:100%" class="dataTable">
+ <thead>
+ <tr>
+ <th><?php echo TABLE_HEADING_PRODUCTS.tep_link_sort_by(FILENAME_COUNTRIES,'products_id'); ?></th>
+ <th><?php echo TABLE_HEADING_RATING.tep_link_sort_by(FILENAME_COUNTRIES,'reviews_rating'); ?></th>
+ <th><?php echo TABLE_HEADING_DATE_ADDED.tep_link_sort_by(FILENAME_COUNTRIES,'date_added'); ?></th>
+ <th><?php echo TABLE_HEADING_ACTION; ?></th>
+ </tr>
+ </thead>
+ <tbody>
+<?php
+ $clause_where ='';
+ $clause_where.=(isset($_GET['pID']))? " where products_id ='".$_GET['pID']."' " :'' ;
+ $reviews_query_raw = "select reviews_id, products_id, date_added, last_modified, reviews_rating from " . TABLE_REVIEWS . " ".$clause_where." order by ".((isset($_GET['sort_by'])) ? $_GET['sort_by'] : 'date_added DESC');
+ $reviews_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $reviews_query_raw, $reviews_query_numrows);
+ $reviews_query = tep_db_query($reviews_query_raw);
+ while ($reviews = tep_db_fetch_array($reviews_query)) {
+ if ((!isset($_GET['rID']) || (isset($_GET['rID']) && ($_GET['rID'] == $reviews['reviews_id']))) && !isset($rInfo)) {
+ $reviews_text_query = tep_db_query("select r.reviews_read, r.customers_name, length(rd.reviews_text) as reviews_text_size from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.reviews_id = '" . (int)$reviews['reviews_id'] . "' and r.reviews_id = rd.reviews_id");
+ $reviews_text = tep_db_fetch_array($reviews_text_query);
+
+ $products_image_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int)$reviews['products_id'] . "'");
+ $products_image = tep_db_fetch_array($products_image_query);
+
+ $products_name_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$reviews['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
+ $products_name = tep_db_fetch_array($products_name_query);
+
+ $reviews_average_query = tep_db_query("select (avg(reviews_rating) / 5 * 100) as average_rating from " . TABLE_REVIEWS . " where products_id = '" . (int)$reviews['products_id'] . "'");
+ $reviews_average = tep_db_fetch_array($reviews_average_query);
+
+ $review_info = array_merge($reviews_text, $reviews_average, $products_name);
+ $rInfo_array = array_merge($reviews, $review_info, $products_image);
+ $rInfo = new objectInfo($rInfo_array);
+ }
+
+ if (isset($rInfo) && is_object($rInfo) && ($reviews['reviews_id'] == $rInfo->reviews_id) ) $class_s=" Selected";
+ else $class_s='';
+?>
+ <tr class="view parent dataTableRow <?php echo $class_s ?>">
+ <td><?php echo '<a href="' . tep_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $reviews['reviews_id'] . '&action=preview') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . tep_get_products_name($reviews['products_id']); ?></td>
+ <td><?php echo tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . 'stars_' . $reviews['reviews_rating'] . '.gif'); ?></td>
+ <td><?php echo tep_date_short($reviews['date_added']); ?></td>
+ <td>
+ <span class="view fils fleft">
+ <?php echo '<a class="buttonimg" href="' . tep_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $reviews['reviews_id'] . '&action=edit') . '">' .tep_image(DIR_WS_ICONS . 'icon_edit.png',IMAGE_EDIT ). '</a> <a class="buttonimg" href="' . tep_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $reviews['reviews_id'] . '&action=delete') . '">' . tep_image(DIR_WS_ICONS . 'icon_delete.png',IMAGE_DELETE ). '</a>'; ?>
+ </span>
+ <span class="fright">
+ <?php if (isset($rInfo) && is_object($rInfo) && ($reviews['reviews_id'] == $rInfo->reviews_id) ) { echo tep_image(DIR_WS_ICONS . 'icon_arrow_right.gif'); } else { echo '<a href="' . tep_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $reviews['reviews_id']) . '">' . tep_image(DIR_WS_ICONS . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>
+ </span>
+ </td>
+ </tr>
+<?php
+ }
+?>
+ </tbody>
+ </table>
+
+ <p><?php echo $reviews_split->display_count($reviews_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_REVIEWS); ?></p>
+ <div class="fright"><?php echo $reviews_split->display_links($reviews_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?></div>
+
+</div>
+
+
+<?php
+ $heading = array();
+ $contents = array();
+
+ switch ($action) {
+ case 'delete':
+ $heading[] = array('text' => TEXT_INFO_HEADING_DELETE_REVIEW );
+
+ $contents = array('form' => tep_draw_form('reviews', FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=deleteconfirm'));
+ $contents[] = array('text' => TEXT_INFO_DELETE_REVIEW_INTRO);
+ $contents[] = array('text' => '<strong>' . $rInfo->products_name . '</strong>');
+ $contents[] = array('class' => 'button_nav', 'text' => tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a class="button" href="' . tep_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id) . '">' . IMAGE_CANCEL . '</a>');
+ break;
+ default:
+ if (isset($rInfo) && is_object($rInfo)) {
+ $heading[] = array('text' => $rInfo->products_name );
+
+// $contents[] = array('align' => 'center', 'text' => );
+ $contents[] = array('text' => TEXT_INFO_DATE_ADDED . tep_date_short($rInfo->date_added));
+ if (tep_not_null($rInfo->last_modified)) $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . tep_date_short($rInfo->last_modified));
+ $contents[] = array('text' => tep_info_image($rInfo->products_image, $rInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT));
+ $contents[] = array('text' => TEXT_INFO_REVIEW_AUTHOR . $rInfo->customers_name);
+ $contents[] = array('text' => TEXT_INFO_REVIEW_RATING . tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . 'stars_' . $rInfo->reviews_rating . '.gif'));
+ $contents[] = array('text' => TEXT_INFO_REVIEW_READ . $rInfo->reviews_read);
+ $contents[] = array('text' => TEXT_INFO_REVIEW_SIZE . $rInfo->reviews_text_size . ' bytes');
+ $contents[] = array('text' => TEXT_INFO_PRODUCTS_AVERAGE_RATING . number_format($rInfo->average_rating, 2) . '%');
+ }
+ break;
+ }
+?>
+<div class="box_right">
+<?php
+ if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
+ $box = new box;
+ echo $box->infoBox($heading, $contents);
+ }
+?>
+</div>
+<?php } ?>
+<!-- body_text_eof //-->
+<!-- body_eof //-->
\ No newline at end of file
Added: trunk/extensions/REVIEWS_stable/catalog/admin/includes/content/reviews.top.inc
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/admin/includes/content/reviews.top.inc (rev 0)
+++ trunk/extensions/REVIEWS_stable/catalog/admin/includes/content/reviews.top.inc 2013-10-17 06:35:36 UTC (rev 4891)
@@ -0,0 +1,42 @@
+<?php
+/*
+ $Id: reviews.php,v 1.3 25.07.2009 16:53:53 oscim Exp $
++-----------------------------------------------------------------------+
+| osCSS Open Source E-commerce |
++-----------------------------------------------------------------------+
+| Copyright (c) 2005-2009 The osCSS developers |
+| |
+| http://www.oscss.org |
+| |
+| Portions Copyright (c) 2003 osCommerce |
++-----------------------------------------------------------------------+
+| This source file is subject to version 2.0 of the GPL license, |
+| available at the following url: |
+| http://www.oscss.org/license/2_0.txt. |
++-----------------------------------------------------------------------+
+*/
+error_reporting(E_ALL);
+
+ if (tep_not_null($action)) {
+ switch ($action) {
+ case 'update':
+ $reviews_id = tep_db_prepare_input($_GET['rID']);
+ $reviews_rating = tep_db_prepare_input($_POST['reviews_rating']);
+ $reviews_text = tep_db_prepare_input($_POST['reviews_text']);
+
+ tep_db_query("update " . TABLE_REVIEWS . " set reviews_rating = '" . tep_db_input($reviews_rating) . "', last_modified = now() where reviews_id = '" . (int)$reviews_id . "'");
+ tep_db_query("update " . TABLE_REVIEWS_DESCRIPTION . " set reviews_text = '" . tep_db_input($reviews_text) . "' where reviews_id = '" . (int)$reviews_id . "'");
+
+ tep_redirect(tep_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $reviews_id));
+ break;
+ case 'deleteconfirm':
+ $reviews_id = tep_db_prepare_input($_GET['rID']);
+
+ tep_db_query("delete from " . TABLE_REVIEWS . " where reviews_id = '" . (int)$reviews_id . "'");
+ tep_db_query("delete from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int)$reviews_id . "'");
+
+ tep_redirect(tep_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page']));
+ break;
+ }
+ }
+?>
\ No newline at end of file
Added: trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/account/reviews.txt
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/account/reviews.txt (rev 0)
+++ trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/account/reviews.txt 2013-10-17 06:35:36 UTC (rev 4891)
@@ -0,0 +1,22 @@
+<?php
+/*
+ $Id: page.ckeckup_sys.php,v 1.3 27.08.2009 22:13:40 oscim osCSSTeam Exp $
+// kate: replace-trailing-space-save true; space-indent on; indent-width 2; mixedindent off; indent-mode cstyle; word-wrap-marker-color #41C2A4
++-----------------------------------------------------------------------+
+| osCSS Open Source E-commerce |
++-----------------------------------------------------------------------+
+ ENCODE UTF-8
+ */
+$lang['MODULE_ACA_REVIEWS_TEXT_TITLE'] = 'Autoriser Les commentaires' ;
+$lang['MODULE_ACA_REVIEWS_TEXT_DESCRIPTION'] = 'Permet à chaque client de commenter les produits ' ;
+
+$lang['MODULE_ACA_D_V_M_TITLE'] = 'Commentaire(s) membre(s)' ;
+$lang['MODULE_ACA_D_V_M_LINK'] = 'Voir' ;
+$lang['TEXT_PRODUCTS_COMMENT'] = 'nombre(s) de commentaire(s) :' ;
+$lang['MODULE_ACA_D_V_M_DELETE_CONFIRM'] = ' Supprimer les commentaire(s) liée' ;
+
+$lang['@reviews table heading rating'] = 'Vote' ;
+$lang['@reviews table heading date'] = 'Date' ;
+$lang['@reviews table heading text'] = 'Commentaire' ;
+
+?>
\ No newline at end of file
Added: trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/products/reviews.php
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/products/reviews.php (rev 0)
+++ trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/modules/products/reviews.php 2013-10-17 06:35:36 UTC (rev 4891)
@@ -0,0 +1,24 @@
+<?php
+/*
+ $Id: page.ckeckup_sys.php,v 1.3 27.08.2009 22:13:40 oscim osCSSTeam Exp $
+// kate: replace-trailing-space-save true; space-indent on; indent-width 2; mixedindent off; indent-mode cstyle; word-wrap-marker-color #41C2A4
++-----------------------------------------------------------------------+
+| osCSS Open Source E-commerce |
++-----------------------------------------------------------------------+
+ ENCODE UTF-8
+ */
+define('MODULE_ACA_REVIEWS_TEXT_TITLE', 'Autoriser Les commentaires');
+define('MODULE_ACA_REVIEWS_TEXT_DESCRIPTION', 'Permet à chaque client de commenter les produits ');
+
+define('MODULE_ACA_REVIEWS_TEXT_MAX_DISPLAY_REVIEWS_TITLE', '[listing] max des commentaire');
+define('MODULE_ACA_REVIEWS_TEXT_MAX_DISPLAY_DESCRIPTION', 'Le nombre de commentaire par page au maxi ');
+define('MODULE_ACA_REVIEWS_TEXT_MIN_DISPLAY_REVIEWS_TITLE', '[listing] min des commentaire');
+define('MODULE_ACA_REVIEWS_TEXT_MIN_DISPLAY_DESCRIPTION', 'Le nombre de commentaire par page au min ');
+define('MODULE_ACA_REVIEWS_TEXT_REVIEW_TEXT_MIN_LENGTH_TITLE', 'min de caratéres dans un commentaire');
+define('MODULE_ACA_REVIEWS_TEXT_REVIEW_TEXT_MIN_LENGTH_DESCRIPTION', 'Le nombre de caratéres par commentaire au min ');
+
+define('MODULE_ACA_D_V_M_TITLE', 'Commentaire(s) membre(s)');
+define('MODULE_ACA_D_V_M_LINK', 'Voir');
+define('TEXT_PRODUCTS_AVERAGE_RATING', 'Ratio moyen :');
+define('MODULE_ACA_D_V_M_DELETE_CONFIRM', ' Supprimer les commentaire(s) liée');
+?>
\ No newline at end of file
Added: trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/reviews.php
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/reviews.php (rev 0)
+++ trunk/extensions/REVIEWS_stable/catalog/admin/includes/languages/fr_FR/reviews.php 2013-10-17 06:35:36 UTC (rev 4891)
@@ -0,0 +1,44 @@
+<?php
+/*
+ $Id: .php,v 1.2 2009/07/13 14:51:01 oscim Exp $
++-----------------------------------------------------------------------+
+| osCSS Open Source E-commerce |
++-----------------------------------------------------------------------+
+| Copyright (c) 2005-2009 The osCSS developers |
+| |
+| http://www.oscss.org |
+| |
+| Portions Copyright (c) 2003 osCommerce |
++-----------------------------------------------------------------------+
+| This source file is subject to version 2.0 of the GPL license, |
+| available at the following url: |
+| http://www.oscss.org/license/2_0.txt. |
++-----------------------------------------------------------------------+
+
+ ENCODE UTF-8
+*/
+define('HEADING_TITLE', 'Critiques');
+define('TABLE_HEADING_PRODUCTS', 'Produits');
+define('TABLE_HEADING_RATING', 'Classement');
+define('TABLE_HEADING_DATE_ADDED', 'Date d\'ajout');
+define('TABLE_HEADING_ACTION', 'Action');
+define('ENTRY_PRODUCT', 'Produit :');
+define('ENTRY_FROM', 'De :');
+define('ENTRY_DATE', 'Date :');
+define('ENTRY_REVIEW', 'Critique :');
+define('ENTRY_REVIEW_TEXT', '<span class="info">REMARQUE :</span> Le HTML n\'est pas traduit ! ');
+define('ENTRY_RATING', 'Classement :');
+define('TEXT_INFO_DELETE_REVIEW_INTRO', 'Êtes vous sur de vouloir supprimer cette critique ?');
+define('TEXT_INFO_DATE_ADDED', 'Date d\'ajout :');
+define('TEXT_INFO_LAST_MODIFIED', 'Dernière modification :');
+define('TEXT_INFO_IMAGE_NONEXISTENT', 'L\'IMAGE N\'EXISTE PAS');
+define('TEXT_INFO_REVIEW_AUTHOR', 'Auteur :');
+define('TEXT_INFO_REVIEW_RATING', 'Classement :');
+define('TEXT_INFO_REVIEW_READ', 'Lu :');
+define('TEXT_INFO_REVIEW_SIZE', 'Taille :');
+define('TEXT_INFO_PRODUCTS_AVERAGE_RATING', 'Classement moyen :');
+define('TEXT_OF_5_STARS', '%s sur 5 étoiles !');
+define('TEXT_GOOD', '<span style="color:#ff0000">BON</span>');
+define('TEXT_BAD', '<span style="color:#ff0000">MAUVAIS</span>');
+define('TEXT_INFO_HEADING_DELETE_REVIEW', 'Supprimer critique');
+?>
\ No newline at end of file
Added: trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/account/reviews.php
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/account/reviews.php (rev 0)
+++ trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/account/reviews.php 2013-10-17 06:35:36 UTC (rev 4891)
@@ -0,0 +1,233 @@
+<?php
+/*
+ $Id: page.ckeckup_sys.php,v 1.3 27.08.2009 22:13:40 oscim osCSSTeam Exp $
+// kate: replace-trailing-space-save true; space-indent on; indent-width 2; mixedindent off; indent-mode cstyle; word-wrap-marker-color #41C2A4
++-----------------------------------------------------------------------+
+| osCSS Open Source E-commerce |
++-----------------------------------------------------------------------+
+ ENCODE UTF-8
+ */
+
+// error_reporting(E_ALL);
+/**
+ @package oscss-major
+ @author oscim <mail a...@os... /><web http://www.oscim.fr />
+
+ Class de gestion de reviews d'un produits.
+
+ Prend en charge La gestion et modération des comemntaire clients, et de la note associé.
+ Moduel jumeaux avec public/reviews.php
+*/
+class reviews
+ implements InterfaceModule{
+
+
+ public static $cInfo;
+
+ public static $action;
+
+ /**
+ Constructeur
+ */
+ function reviews(){
+
+ $this->code = 'reviews';
+ $this->title = __('module aca reviews text title');
+ $this->description = __('module_aca_reviews_text_description') ;
+ $this->sort_order = (defined('MODULE_ACA_REVIEWS_SORT_ORDER')) ? MODULE_ACA_REVIEWS_SORT_ORDER : '';
+ $this->enabled = true; //_cst_bool('MODULE_ACA_REVIEWS_STATUS');
+
+ global $language;
+ $this->language = $language;
+
+// var_dump(__file__);
+ require_once(DIR_FS_CATALOG . DIR_WS_COMMON_CLASSES /*. 'classes/'*/ .'common_reviews.php' );
+ $this->common=new common_reviews();
+
+ }
+
+
+
+ public function check_action($actions){
+ global $oscss;
+ self::$action=$actions['action'];
+ $languages = tep_get_languages();
+ $messageStack=messageStack::getInstance();
+
+// var_dump(__file__);
+ switch(self::$action){
+ case 'noedit':
+
+ break;
+ }
+
+ return $actions;
+ }
+
+ /**
+ Chargement des db
+
+ pInfo is an array [field name][language id]=value
+ */
+ public function load_db_values ($cID) {
+ global $language;
+
+ $this->common->load_db_values_for_cID($cID);
+
+// $this->reviews_rating=$this->common->reviews_rating ;
+// $this->reviews=$this->common->reviews;
+
+ return $this->common->reviews;
+ }
+
+ /**
+ Suppression des db liée au products_id
+ @param
+ @a int PID le product_ID
+ @a int $_POST['report_invesst_prod'] : value on ; pour autoriser suppression des elements
+ */
+// function delete_product ($pID){
+// if (!isset($_POST['report_invesst_prod']) || $_POST['report_invesst_prod'] !='on') return false;
+// if (!isset($this->reviews) || !is_array($this->reviews))$this->load_db_values($pID);
+//
+// foreach ($this->reviews as $reviews) {
+// tep_db_query("delete from " . TABLE_REVIEWS . " where reviews_id = '" . (int)$reviews['reviews_id'] . "'");
+// tep_db_query("delete from " . TABLE_CONTENT_DESCRIPTION . " where reviews_id = '" . (int)$content_id['reviews_id'] . "'");
+// }
+//
+// }
+
+
+ /**
+ Traitement affichage reduit colonne de droite
+ @param
+ @a array contents
+ @a int PID le product_ID
+ */
+// public function display_right_column($contents,$pID){
+// if (!isset($this->reviews) || !is_array($this->reviews))$this->load_db_values($pID);
+// $contents[] = array('text' => '<h4>'.MODULE_ACA_D_V_M_TITLE.' (<a href="'.tep_href_link(FILENAME_REVIEWS,'pID='.$pID.'&origin='.tep_href_link(FILENAME_PRODUCTS,tep_get_all_get_params()).'').'">'.MODULE_ACA_D_V_M_LINK.'</a>)</h4> ');
+// $contents[] = array( 'text' =>'<li style="padding-left:15px">'.TEXT_PRODUCTS_COMMENT .count($this->reviews).'</li>');
+// return $contents;
+// }
+
+ /**
+ Block confirmation de suppression
+ Colonne droite
+ */
+// public function display_right_delete_confirm ($contents, $products_id) {
+// $contents[] = array('text' => '<h4>'.MODULE_ACA_D_V_M_TITLE.'');
+// $contents[] = array( 'text' =>'<li class="block_input">'.tep_draw_checkbox_field('report_invesst_prod',"report_invesst_prod", 'on', true) .' '.MODULE_ACA_D_V_M_DELETE_CONFIRM.' </li>');
+// return $contents;
+// }
+
+//=====================================
+// Functions sepcific in modules
+//=====================================
+
+ public function display_edit(&$contents,$id) {
+ global $languages_id;
+
+// var_dump(__file__);
+// self::$cID =$id;
+//
+// $contents []= array(
+// 'title'=> __('extra fields'),
+// 'text'=> tep_get_include_contents(__CLASS__.'.form')
+// );
+
+ switch(self::$action){
+ case 'noedit':
+
+ self::$cInfo=$this->load_db_values($id);
+
+// var_dump(self::$cInfo);
+// exit;
+ $contents []= array(
+ 'title'=> __('@reviews tab history'),
+ 'text'=> tep_get_include_contents('customers/'.__CLASS__.'/'.__FUNCTION__.'.'.self::$action)
+ );
+ break;
+ }
+
+ return $contents;
+ }
+
+ /**
+ * \fn load_post_values ($post)
+ * @param $post array
+ */
+ public function load_post_values ($post) {
+ return $post;
+ }
+
+
+ /**
+ Detail des investisseur d'un produits
+ Apercu general
+ @param
+ @a object new box
+ @a int le product_ID
+ */
+// public function display_view_list($box,$pID){
+// $this->load_db_values ($pID);
+//
+// $customers_query_raw = "select * from " . TABLE_PRODUCTS_REVIEWS . " pn where pn.products_id = '" . $pID . "' order by date_added DESC";
+//
+// $customers_query = tep_db_query($customers_query_raw);
+// while ($customers = tep_db_fetch_array($customers_query))
+// $cust[$customers['customers_id']]=$customers;
+//
+//
+// $montant_tot=$csut=0;
+//
+// $row=0;
+// $box->add_pile($row,array('separator'=>array(0=>'',1=>'h3',2=>'span') ) );
+// $box->add_pile($row,array('text'=>'Client notifié de cet article' ) );
+// $row=1;
+// $box->add_pile($row,array('separator'=>array(0=>'thead',1=>'tr',2=>'th') ) );
+// $box->add_pile($row,array('text'=>'client n°' ) );
+// $box->add_pile($row,array('text'=>'client' ) );
+// $box->add_pile($row,array('text'=>'incsrit le ' ) );
+// $box->add_pile($row,array('text'=>'nbr de notification' ) );
+//
+// foreach($this->fans as $k) {
+// $row++;
+//
+// $box->add_pile($row,array('separator'=>array(0=>'tbody',1=>'tr',2=>'td'), 'class'=>'view parent dataTableRow ') );
+// $box->add_pile($row,array('text'=>''.$k['customers_id'] ) );
+// $box->add_pile($row,array('text'=>tep_customers_row_action($k['customers_id'], array('origin'=>tep_href_link(FILENAME_PRODUCTS,'pID='.$pID))) ) );
+// $box->add_pile($row,array('text'=>$cust[$k['customers_id']]['date_added'] ) );
+// $box->add_pile($row,array('text'=>$cust[$k['customers_id']]['count']) );
+// }
+//
+// return $box;
+// }
+
+
+
+//=====================================
+// Functions for modules administration
+//=====================================
+ function check() {
+ if (!isset($this->_check)) {
+ $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ACA_REVIEWS_STATUS'");
+ $this->_check = tep_db_num_rows($check_query);
+ }
+ return $this->_check;
+ }
+
+ function install() {
+ return false;
+ }
+
+ function remove() {
+ return false;
+ }
+
+ function keys() {
+ return false;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/account/reviews.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/products/reviews.php
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/products/reviews.php (rev 0)
+++ trunk/extensions/REVIEWS_stable/catalog/admin/includes/modules/products/reviews.php 2013-10-17 06:35:36 UTC (rev 4891)
@@ -0,0 +1,214 @@
+<?php
+/*
+ $Id: page.ckeckup_sys.php,v 1.3 27.08.2009 22:13:40 oscim osCSSTeam Exp $
+// kate: replace-trailing-space-save true; space-indent on; indent-width 2; mixedindent off; indent-mode cstyle; word-wrap-marker-color #41C2A4
++-----------------------------------------------------------------------+
+| osCSS Open Source E-commerce |
++-----------------------------------------------------------------------+
+ ENCODE UTF-8
+ */
+
+
+/**
+ @package oscss-major
+ @author oscim <mail a...@os... /><web http://www.oscim.fr />
+
+ Class de gestion de reviews d'un produits.
+
+ Prend en charge La gestion et modération des comemntaire clients, et de la note associé.
+ Moduel jumeaux avec public/reviews.php
+*/
+class reviews{
+
+ /**
+
+ */
+ var $cagnotte;
+
+ /**
+ Constructeur
+ */
+ function reviews(){
+
+ $this->code = 'reviews';
+ $this->title = MODULE_ACA_REVIEWS_TEXT_TITLE;
+ $this->description = MODULE_ACA_REVIEWS_TEXT_DESCRIPTION . ' (module v2.0)';
+ $this->sort_order = (defined('MODULE_ACA_REVIEWS_SORT_ORDER')) ? MODULE_ACA_REVIEWS_SORT_ORDER : '';
+ $this->enabled = _cst_bool('MODULE_ACA_REVIEWS_STATUS');
+
+ global $language;
+ $this->language = $language;
+
+ require_once(DIR_FS_CATALOG.DIR_WS_COMMON_CLASSES /*. 'classes/'*/ .'common_reviews.php' );
+ $this->common=new common_reviews();
+ }
+
+
+
+//=====================================
+// Functions for modules aca
+//=====================================
+
+ /**
+ Chargement des db
+
+ pInfo is an array [field name][language id]=value
+ */
+ public function load_db_values ($pID) {
+
+ global $language;
+ $this->common->load_db_values_for_pID($pID);
+
+ $this->reviews_rating=$this->common->reviews_rating ;
+ $this->reviews=$this->common->reviews;
+ }
+
+ /**
+ Suppression des db liée au products_id
+ @param
+ @a int PID le product_ID
+ @a int $_POST['report_invesst_prod'] : value on ; pour autoriser suppression des elements
+ */
+ function delete_product ($pID){
+ if (!isset($_POST['report_invesst_prod']) || $_POST['report_invesst_prod'] !='on') return false;
+ if (!isset($this->reviews) || !is_array($this->reviews))$this->load_db_values($pID);
+
+ foreach ($this->reviews as $reviews) {
+ tep_db_query("delete from " . TABLE_REVIEWS . " where reviews_id = '" . (int)$reviews['reviews_id'] . "'");
+ tep_db_query("delete from " . TABLE_CONTENT_DESCRIPTION . " where reviews_id = '" . (int)$content_id['reviews_id'] . "'");
+ }
+
+ }
+
+
+ /**
+ Traitement affichage reduit colonne de droite
+ @param
+ @a array contents
+ @a int PID le product_ID
+ */
+ public function display_right_column($contents,$pID){
+ if (!isset($this->reviews) || !is_array($this->reviews))$this->load_db_values($pID);
+ $contents[] = array('text' => '<h4>'.MODULE_ACA_D_V_M_TITLE.' (<a href="'.tep_href_link(FILENAME_REVIEWS,'pID='.$pID.'&origin='.tep_href_link(FILENAME_PRODUCTS,tep_get_all_get_params()).'').'">'.MODULE_ACA_D_V_M_LINK.'</a>)</h4> ');
+ $contents[] = array( 'text' =>'<li style="padding-left:15px">'.TEXT_PRODUCTS_AVERAGE_RATING . ' '.$this->reviews_rating.'% / '.count($this->reviews).'</li>');
+ return $contents;
+ }
+
+ /**
+ Block confirmation de suppression
+ Colonne droite
+ */
+ public function display_right_delete_confirm ($contents, $products_id) {
+ $contents[] = array('text' => '<h4>'.MODULE_ACA_D_V_M_TITLE.'');
+ $contents[] = array( 'text' =>'<li class="block_input">'.tep_draw_checkbox_field('report_invesst_prod',"report_invesst_prod", 'on', true) .' '.MODULE_ACA_D_V_M_DELETE_CONFIRM.' </li>');
+ return $contents;
+ }
+
+//=====================================
+// Functions sepcific in modules
+//=====================================
+
+ /**
+ Detail des investisseur d'un produits
+ Apercu general
+ @param
+ @a object new box
+ @a int le product_ID
+ */
+ public function display_view_list($box,$pID){
+ $this->load_db_values ($pID);
+
+ $customers_query_raw = "select * from " . TABLE_PRODUCTS_REVIEWS . " pn where pn.products_id = '" . $pID . "' order by date_added DESC";
+
+ $customers_query = tep_db_query($customers_query_raw);
+ while ($customers = tep_db_fetch_array($customers_query))
+ $cust[$customers['customers_id']]=$customers;
+
+
+ $montant_tot=$csut=0;
+
+ $row=0;
+ $box->add_pile($row,array('separator'=>array(0=>'',1=>'h3',2=>'span') ) );
+ $box->add_pile($row,array('text'=>'Client notifié de cet article' ) );
+ $row=1;
+ $box->add_pile($row,array('separator'=>array(0=>'thead',1=>'tr',2=>'th') ) );
+ $box->add_pile($row,array('text'=>'client n°' ) );
+ $box->add_pile($row,array('text'=>'client' ) );
+ $box->add_pile($row,array('text'=>'incsrit le ' ) );
+ $box->add_pile($row,array('text'=>'nbr de notification' ) );
+
+ foreach($this->fans as $k) {
+ $row++;
+
+ $box->add_pile($row,array('separator'=>array(0=>'tbody',1=>'tr',2=>'td'), 'class'=>'view parent dataTableRow ') );
+ $box->add_pile($row,array('text'=>''.$k['customers_id'] ) );
+ $box->add_pile($row,array('text'=>tep_customers_row_action($k['customers_id'], array('origin'=>tep_href_link(FILENAME_PRODUCTS,'pID='.$pID))) ) );
+ $box->add_pile($row,array('text'=>$cust[$k['customers_id']]['date_added'] ) );
+ $box->add_pile($row,array('text'=>$cust[$k['customers_id']]['count']) );
+ }
+
+ return $box;
+ }
+
+
+
+//=====================================
+// Functions for modules administration
+//=====================================
+ function check() {
+ if (!isset($this->_check)) {
+ $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ACA_REVIEWS_STATUS'");
+ $this->_check = tep_db_num_rows($check_query);
+ }
+ return $this->_check;
+ }
+
+ function install() {
+ //! key pour gestion menu conf
+ $key=6;
+
+ tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('".addslashes(MODULE_ACA_REVIEWS_TEXT_TITLE)."', 'MODULE_ACA_REVIEWS_STATUS', 'True', '".addslashes(MODULE_ACA_REVIEWS_TEXT_DESCRIPTION)."', '".$key."', '1', 'tep_cfg_Non_Edit(', now())");
+
+ tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of process.', 'MODULE_ACA_REVIEWS_SORT_ORDER', '0', 'Sort order of process.', '".$key."', '0', now())");
+
+ //! Split de page min/max
+ tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".addslashes(MODULE_ACA_REVIEWS_TEXT_MAX_DISPLAY_REVIEWS_TITLE)."', 'MAX_DISPLAY_REVIEWS', '10', '".addslashes(MODULE_ACA_REVIEWS_TEXT_MAX_DISPLAY_DESCRIPTION)."', '".$key."', '0', now())");
+ tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".addslashes(MODULE_ACA_REVIEWS_TEXT_MIN_DISPLAY_REVIEWS_TITLE)."', 'MIN_DISPLAY_REVIEWS', '1', '".addslashes(MODULE_ACA_REVIEWS_TEXT_MIN_DISPLAY_DESCRIPTION)."', '".$key."', '0', now())");
+ //! comment, carat min
+ tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('".addslashes(MODULE_ACA_REVIEWS_TEXT_REVIEW_TEXT_MIN_LENGTH_TITLE)."', 'REVIEW_TEXT_MIN_LENGTH', '40', '".addslashes(MODULE_ACA_REVIEWS_TEXT_REVIEW_TEXT_MIN_LENGTH_DESCRIPTION)."', '".$key."', '0', now())");
+
+// //! Liste des element actif
+// tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Application externe active, champs auto', 'MODULE_ACA_CUST_APPLI_EXT_ACTIV', '0', 'Application externe active, champs auto', '".$key."', '0', now())");
+//
+//
+// tep_db_query("CREATE TABLE IF NOT EXISTS ".TABLE_CUSTOMERS_TO_APPLICATION." (
+// customers_id INT(11) NOT NULL DEFAULT '0',
+// key_appli varchar(12) NOT NULL DEFAULT '0',
+// etat_appli varchar(1) NOT NULL default '0',
+// url_public_appli varchar(100) NOT NULL default '0',
+// url_prive_appli varchar(100) NOT NULL default '0',
+// PRIMARY KEY (customers_id,key_appli)
+// )");
+// tep_db_query("CREATE TABLE IF NOT EXISTS osc_application_ext (
+// id_appli INT(5) NOT NULL DEFAULT '0',
+// key_appli varchar(12) NOT NULL DEFAULT '0',
+// etat_appli varchar(1) NOT NULL default '0',
+// url_install_appli varchar(100) NOT NULL default 'E',
+// PRIMARY KEY (id_appli,key_appli)
+// )");
+ }
+
+ function remove() {
+ tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
+ }
+
+ function keys() {
+ return array( 'MODULE_ACA_REVIEWS_STATUS',
+ 'MODULE_ACA_REVIEWS_SORT_ORDER',
+ 'MAX_DISPLAY_REVIEWS',
+ 'MIN_DISPLAY_REVIEWS',
+ 'REVIEW_TEXT_MIN_LENGTH');
+ }
+}
+
+?>
\ No newline at end of file
Added: trunk/extensions/REVIEWS_stable/catalog/common/classes/common_reviews.php
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/common/classes/common_reviews.php (rev 0)
+++ trunk/extensions/REVIEWS_stable/catalog/common/classes/common_reviews.php 2013-10-17 06:35:36 UTC (rev 4891)
@@ -0,0 +1,147 @@
+<?php
+/**
+ @licence GPL 2005-2009 The osCSS developers - osCSS Open Source E-commerce
+ @package oscss-2 <www http://www.oscss.org>
+ @version Rc-3
+ @date 04/05/10, 10:45
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+
+ Class de centralisation des modules reviews
+*/
+class common_reviews {
+
+ /**
+ constrcuteur
+ */
+ public function common_reviews(){
+ if (!defined('TABLE_REVIEWS_TO_PRODUCTS') ){
+ define('TABLE_REVIEWS', DB_TABLE_PREFIX . 'reviews');
+ define('TABLE_REVIEWS_TO', DB_TABLE_PREFIX . 'reviews_to');
+// define('TABLE_REVIEWS_TO_PRODUCTS', DB_TABLE_PREFIX . 'reviews_to_products');
+// define('TABLE_REVIEWS_TO_CONTENT', DB_TABLE_PREFIX . 'reviews_to_content');
+ define('TABLE_REVIEWS_DESCRIPTION', DB_TABLE_PREFIX . 'reviews_description');
+ }
+
+ }
+
+
+
+ /**
+ @brief load value for link table_to
+
+ @param $type int 0:all 1:products, 2:content
+ @param $ID null id type =0; else int id content/ products
+ @return object result
+ */
+ public function load_db_values($type,$ID=''){
+ global $page,$language;
+
+ $DB=Database::getInstance();
+ $obj = new stdClass;
+ $tables='';
+ $where='';
+ if(is_object($page)) $this->language = $page->the_var('languages_id');
+ else $this->language = $language;
+
+// $this->reviews=array();
+// $reviews_query_average = tep_db_query("select (avg(reviews_rating) / 5 * 100) as average_rating from " . TABLE_REVIEWS . " where products_id = '" . (int)$pID . "'");
+// $reviews_average = tep_db_fetch_array($reviews_query_average);
+// $obj->reviews_rating = number_format($reviews_average['average_rating'],2);
+
+
+ switch($type){
+ case 2;
+// $tables .=" LEFT JOIN " . TABLE_REVIEWS_TO_CONTENT . " rtc on (r.reviews_id = rtc.reviews_id) ";
+ $tables .=" LEFT JOIN " . TABLE_REVIEWS_TO . " rtp on (r.reviews_id = rtp.reviews_id) ";
+
+ $where .= " AND rtc.data_id = '" . (int)$ID . "' ";
+// if(MODULE_REVIEWS_STATUS_MODERATION <= 0)
+ $where .= " AND r.reviews_status = '" . (int) ((MODULE_REVIEWS_STATUS_MODERATION> 0)? 1 : 0 ) . "' ";
+
+// $sql_rating = "select (avg(reviews_rating) / 5 * 100) as average_rating from " . TABLE_REVIEWS . " r JOIN " . TABLE_REVIEWS_TO_CONTENT . " rtc on (r.reviews_id = rtc.reviews_id) where data_id = '" . (int)$ID . "'";
+
+ $sql_rating = "select (avg(reviews_rating) / 5 * 100) as average_rating from " . TABLE_REVIEWS . " r JOIN " . TABLE_REVIEWS . " rtc on (r.reviews_id = rtc.reviews_id) where data_id = '" . (int)$ID . "'";
+
+ break;
+ case 1;
+// $tables .=" LEFT JOIN " . TABLE_REVIEWS_TO_PRODUCTS . " rtp on (r.reviews_id = rtp.reviews_id) ";
+ $tables .=" LEFT JOIN " . TABLE_REVIEWS_TO . " rtp on (r.reviews_id = rtp.reviews_id) ";
+
+ $where .= " AND rtp.data_id = '" . (int)$ID . "' ";
+// if(MODULE_REVIEWS_STATUS_MODERATION > 0)
+ $where .= " AND r.reviews_status = '" . (int) ((MODULE_REVIEWS_STATUS_MODERATION> 0)? 1 : 0 ) . "' ";
+
+// $sql_rating = "select (avg(reviews_rating) / 5 * 100) as average_rating from " . TABLE_REVIEWS . " r JOIN " . TABLE_REVIEWS_TO_PRODUCTS . " rtp on (r.reviews_id = rtp.reviews_id) where data_id = '" . (int)$ID . "'";
+ $sql_rating = "select (avg(reviews_rating) / 5 * 100) as average_rating from " . TABLE_REVIEWS . " r JOIN " . TABLE_REVIEWS_TO . " rtp on (r.reviews_id = rtp.reviews_id) where data_id = '" . (int)$ID . "'";
+ break;
+
+ default:
+ case 0;
+
+// $tables .=" LEFT JOIN " . TABLE_REVIEWS_TO_PRODUCTS . " rtp on (r.reviews_id = rtp.reviews_id) ".
+// " LEFT JOIN " . TABLE_REVIEWS_TO_CONTENT . " rtc on (r.reviews_id = rtc.reviews_id) ";
+
+ $tables .=" LEFT JOIN " . TABLE_REVIEWS_TO . " rtp on (r.reviews_id = rtp.reviews_id) ";
+
+ $where .= "";
+ // if(MODULE_REVIEWS_STATUS_MODERATION > 0)
+ $where .= " AND r.reviews_status = '" . (int) ((MODULE_REVIEWS_STATUS_MODERATION> 0)? 1 : 0 ) . "' ";
+ break;
+ }
+
+ if(isset($sql_rating)){
+ $rating_query = $DB->query($sql_rating);
+ $reviews_average = $rating_query->fetchAssoc();
+ $obj->rating = number_format($reviews_average['average_rating'],2);
+ }
+
+ $sql= "SELECT r.reviews_id, (rd.reviews_text) as comment, r.reviews_rating, r.date_added, r.pseudo, r.email, r.reviews_parent ".
+ " FROM " . TABLE_REVIEWS_DESCRIPTION . " rd , " . TABLE_REVIEWS . " r".
+ $tables.
+ " WHERE r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$this->language . "' ".
+ $where.
+ " ORDER BY reviews_parent ASC , r.reviews_id ASC, date_added ASC";
+
+ $reviews_query = $DB->query($sql);
+
+ if($reviews_query->__get('numRows'))
+ while ($reviews = tep_db_fetch_array($reviews_query))
+ $obj->reviews[$reviews['reviews_id']]=new objectInfo($reviews);
+ else
+ $obj->reviews =array();
+
+ return $obj;
+ }
+
+
+
+
+
+
+
+ /**
+ Chargement des db
+ */
+ public function load_db_values_for_cID($cID){
+ global $page,$languages_id;
+ if(is_object($page))
+ $this->language = $page->the_var('languages_id');
+ else
+ $this->language = $languages_id;
+
+ $this->reviews=array();
+
+ $reviews_query_average = tep_db_query("select (avg(reviews_rating) / 5 * 100) as average_rating from " . TABLE_REVIEWS . " where customers_id = '" . (int)$cID . "'");
+ $reviews_average = tep_db_fetch_array($reviews_query_average);
+ $this->reviews_rating = number_format($reviews_average['average_rating'],2);
+
+ $reviews_query = tep_db_query($sql="select r.reviews_id, (rd.reviews_text) as reviews_text, r.reviews_rating, r.date_added, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.customers_id = '" . (int)$cID . "' and r.reviews_id = rd.reviews_id order by r.reviews_id desc"); //and rd.languages_id = '" . (int)$this->language . "'
+
+ while ($reviews = tep_db_fetch_array($reviews_query))
+ $this->reviews[$reviews['reviews_id']]=$reviews;
+ }
+
+}
+
+?>
\ No newline at end of file
Added: trunk/extensions/REVIEWS_stable/catalog/includes/boxes/reviews.php
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/includes/boxes/reviews.php (rev 0)
+++ trunk/extensions/REVIEWS_stable/catalog/includes/boxes/reviews.php 2013-10-17 06:35:36 UTC (rev 4891)
@@ -0,0 +1,60 @@
+<?php
+/*
+ $Id: reviews.php,v 1.5 2005/08/30 18:05:11 manmachine Exp $
++-----------------------------------------------------------------------+
+| osCSS Open Source E-commerce |
++-----------------------------------------------------------------------+
+| Copyright (c) 2005 The osCSS developers |
+| |
+| http://www.oscss.org |
+| |
+| Portions Copyright (c) 2003 osCommerce |
++-----------------------------------------------------------------------+
+| This source file is subject to version 2.0 of the GPL license, |
+| available at the following url: |
+| http://www.oscss.org/license/2_0.txt. |
++-----------------------------------------------------------------------+
+*/
+?>
+
+<div class="boxes">
+ <h4 class="<?php echo $language ;?>"><?php echo BOX_HEADING_REVIEWS ;?></h4>
+
+<?php
+
+ $random_select = "select r.reviews_id, r.reviews_rating, p.products_id, p.products_image, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'";
+
+ if (isset($_GET['products_id'])) {
+ $random_select .= " and p.products_id = '" . (int)$_GET['products_id'] . "'";
+ }
+
+ $random_select .= " order by r.reviews_id desc limit " . MAX_RANDOM_SELECT_REVIEWS;
+ $random_product = tep_random_select($random_select);
+
+
+ if ($random_product) {
+// display random review box
+ $review_query = tep_db_query("select substring(reviews_text, 1, 60) as reviews_text from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int)$random_product['reviews_id'] . "' and languages_id = '" . (int)$languages_id . "'");
+ $review = tep_db_fetch_array($review_query);
+
+ $review = tep_break_string(tep_output_string_protected($review['reviews_text']), 15, '-<br />');
+
+ $info_box_contents = '<li><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . $review . ' ..</a><br />' . tep_image(DIR_WS_COMMON_IMAGES . 'stars_' . $random_product['reviews_rating'] . '.gif' , sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $random_product['reviews_rating'])) . '</li>' . "\n";
+
+ } elseif (isset($_GET['products_id'])) {
+
+// display 'write a review' box
+
+ $info_box_contents = '<li><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['products_id']) . '">' . IMAGE_BUTTON_WRITE_REVIEW . '</a></li>'."\n";
+
+ } else {
+
+// display 'no reviews' box
+ $info_box_contents = '<li>' . BOX_REVIEWS_NO_REVIEWS . '</li>'."\n";
+ }
+
+?>
+<ul>
+ <?php echo $info_box_contents ;?>
+</ul>
+</div>
\ No newline at end of file
Added: trunk/extensions/REVIEWS_stable/catalog/includes/content/listing_reviews.php
===================================================================
--- trunk/extensions/REVIEWS_stable/catalog/includes/content/listing_reviews.php (rev 0)
+++ trunk/extensions/REVIEWS_stable/catalog/includes/content/listing_reviews.php 2013-10-17 06:35:36 UTC (rev 4891)
@@ -0,0 +1,66 @@
+<?php
+/*
+ $Id: product_info.php,v 1.7 14.07.2009 19:51:18 oscim Exp $
+// kate: replace-trailing-space-save true; space-indent on; indent-width 2; mixedindent off; indent-mode cstyle; word-wrap-marker-color #41C2A4
++-----------------------------------------------------------------------+
+| osCSS Open Source E-commerce |
++-----------------------------------------------------------------------+
+| Copyright (c) 2005-2009 The osCSS developers |
+| |
+| http://www.oscss.org |
+| |
+| Portions Copyright (c) 2003-2009 osCommerce |
++-----------------------------------------------------------------------+
+| This source file is subject to version 2.0 of the GPL license, |
+| available at the following url: |
+| http://www.oscss.org/license/2_0.txt. |
++-----------------------------------------------------------------------+
+*/
+/**
+ @package oscss-major
+ @author oscim <mail a...@os... /><web http://www.oscim.fr />
+
+ Fonctionne Uniquement avec les module reviews actif
+*/
+$languages_id=$page->the_var('languages_id');
+$reviews_query = tep_db_query($sql="select r.reviews_id, rd.reviews_text, r.reviews_rating, r.date_added, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.products_id = '" . (int)$_GET['products_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id. "' order by r.reviews_id desc");
+?>
+<div id="productInfo">
+ <?php $page->messageStack->_draw('review');?>
+
+ <?php if (tep_db_num_rows($reviews_query) < $page->_conf_value('MIN_DISPLAY_REVIEWS')) : ?>
+ <p class="infoText"><?php echo TEXT_INFORMATION_DISPLAY_REVIEWS; ?></p>
+ <?php else :
+ $listing_split = new splitPageResults($sql, $page->_conf_value('MAX_DISPLAY_REVIEWS'));
+ $listing_query = tep_db_query($listing_split->sql_query);?>
+
+ <?php if ( ($listing_split->number_of_rows > 0) && (in_array(PREV_NEXT_BAR_LOCATION ,array('1','3') )) ) { ?>
+ <div id="splitPageTop" class="splitnav">
+ <p class="sP1"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></p>
+ <p class="sP2"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></p>
+ </div>
+ <?php } ?>
+
+ <?...
[truncated message content] |
|
From: <os...@us...> - 2013-10-15 14:22:24
|
Revision: 4890
http://sourceforge.net/p/oscss/svn/4890
Author: oscim
Date: 2013-10-15 14:22:21 +0000 (Tue, 15 Oct 2013)
Log Message:
-----------
create configuration module for categorie and group all config var
clean anf fix code in move config cat
adjust install
Fix bug
Modified Paths:
--------------
trunk/catalog/admin/includes/content/modules.top.inc
trunk/catalog/admin/includes/gabarit/products/display_view.inline.gab
trunk/catalog/admin/includes/languages/fr_FR/boxes/01_configuration.php
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_128.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_27.txt
trunk/catalog/includes/application_top.php
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/configuration/datatypecategorie.listing.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/datatypecategorie.txt
trunk/catalog/admin/includes/modules/configuration/datatypecategorie.php
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/data/91_osc_configuration.sql
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/data/91_osc_configuration_group.sql
Modified: trunk/catalog/admin/includes/content/modules.top.inc
===================================================================
--- trunk/catalog/admin/includes/content/modules.top.inc 2013-10-15 12:55:36 UTC (rev 4889)
+++ trunk/catalog/admin/includes/content/modules.top.inc 2013-10-15 14:22:21 UTC (rev 4890)
@@ -30,18 +30,12 @@
switch ($manager){
case 'process':
$code_inistalletd_array['checkout_process']=array('key'=>'MODULE_CHECKOUT_PROCESS_INSTALLED', 'value'=>MODULE_CHECKOUT_PROCESS_INSTALLED, 'module_directory'=> 'checkout/','key_BO'=>'MODULE_CHECKOUT_PROCESS_INSTALLED_BO', 'value_BO'=>MODULE_CHECKOUT_PROCESS_INSTALLED_BO, 'prefix'=>'Pr');
-// $code_inistalletd_array['shipping']=array('key'=>'MODULE_SHIPPING_INSTALLED', 'value'=>MODULE_SHIPPING_INSTALLED,'key_BO'=>'MODULE_SHIPPING_INSTALLED_BO', 'value_BO'=>MODULE_SHIPPING_INSTALLED_BO, 'module_directory'=>'shipping/', 'prefix'=>'');
-// $code_inistalletd_array['payment']=array('key'=>'MODULE_PAYMENT_INSTALLED', 'value'=>MODULE_PAYMENT_INSTALLED, 'key_BO'=>'MODULE_PAYMENT_INSTALLED_BO', 'value_BO'=>MODULE_PAYMENT_INSTALLED_BO,'module_directory'=> 'payment/', 'prefix'=>'');
-// $code_inistalletd_array['order_total']=array('key'=>'MODULE_ORDER_TOTAL_INSTALLED', 'value'=>MODULE_ORDER_TOTAL_INSTALLED, 'key_BO'=>'MODULE_ORDER_TOTAL_INSTALLED_BO', 'value_BO'=>MODULE_ORDER_TOTAL_INSTALLED_BO, 'module_directory'=> 'order_total/', 'prefix'=>'');
$code_inistalletd_array['orders']=array('key_BO'=>'MODULE_ORDERS_INSTALLED_BO', 'value_BO'=>MODULE_ORDERS_INSTALLED_BO, 'module_directory'=> 'orders/', 'prefix'=>'');
break;
case 'general':
default:
$code_inistalletd_array['generic']=array('key'=>'MODULE_GENERIC_INSTALLED', 'value'=>MODULE_GENERIC_INSTALLED, 'key_BO'=>'MODULE_GENERIC_INSTALLED_BO', 'value_BO'=>MODULE_GENERIC_INSTALLED_BO,'module_directory'=>'generic/','module_language'=>DIR_FS_ADMIN.'includes/languages/', 'prefix'=>'');
-// $code_inistalletd_array['products']=array('key'=>'MODULE_ACAPRO_INSTALLED', 'value'=>MODULE_ACAPRO_INSTALLED,'key_BO'=>'MODULE_ACAPRO_INSTALLED_BO', 'value_BO'=>MODULE_ACAPRO_INSTALLED_BO,'module_directory'=> 'products/','module_language'=>DIR_FS_ADMIN.'includes/languages/', 'prefix'=>'' );
- $code_inistalletd_array['content']=array('key'=>'MODULE_CONTENT_INSTALLED', 'value'=>MODULE_CONTENT_INSTALLED, 'key_BO'=>'MODULE_CONTENT_INSTALLED_BO', 'value_BO'=>MODULE_CONTENT_INSTALLED_BO,'module_directory'=>'content/','module_language'=>DIR_FS_ADMIN.'includes/languages/', 'prefix'=>'');
$code_inistalletd_array['categories']=array('key'=>'MODULE_ACACAT_INSTALLED', 'value'=>MODULE_ACACAT_INSTALLED ,'key_BO'=>'MODULE_ACACAT_INSTALLED_BO', 'value_BO'=>MODULE_ACACAT_INSTALLED_BO,'module_directory'=> 'categories/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES , 'prefix'=>'');
-// $code_inistalletd_array['account']=array('key'=>'MODULE_ACCOUNT_INSTALLED', 'value'=>MODULE_ACCOUNT_INSTALLED,'key_BO'=>'MODULE_ACCOUNT_INSTALLED_BO', 'value_BO'=>MODULE_ACCOUNT_INSTALLED_BO,'module_directory'=> 'account/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES , 'prefix'=>'');
$code_inistalletd_array['listing']=array('key'=>'MODULE_LISTING_INSTALLED', 'value'=>MODULE_LISTING_INSTALLED,'key_BO'=>'MODULE_LISTING_INSTALLED_BO', 'value_BO'=>@MODULE_LISTING_INSTALLED_BO,'module_directory'=> 'listing/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES , 'prefix'=>'');
$code_inistalletd_array['home']=array('key'=>'MODULE_HOME_INSTALLED', 'value'=>MODULE_HOME_INSTALLED, 'key_BO'=>'MODULE_HOME_INSTALLED_BO', 'value_BO'=>MODULE_HOME_INSTALLED_BO ,'module_directory'=>'home/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES , 'prefix'=>'');
Added: trunk/catalog/admin/includes/gabarit/configuration/datatypecategorie.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/datatypecategorie.listing.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/configuration/datatypecategorie.listing.gab 2013-10-15 14:22:21 UTC (rev 4890)
@@ -0,0 +1,138 @@
+<?php
+/**
+ @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.2
+ @date 01/10/2013, 20:05
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @brief mise en forme de la gestion du stock
+*/
+?>
+
+<div id="ssmenu">
+ <?php echo tep_ssmenu_configuration($_GET['gparentID']) ?>
+</div>
+
+
+
+<h3 class="main-title"><?php echo __('heading datatypecategorie configuration') ?></h3>
+
+
+
+
+<!-- <div class="block_form"> -->
+
+
+ <div id="tabs">
+ <ul>
+ <li><a href="#tabs-1"><?php echo __('datatypecategorie tab configuration'); ?></a></li>
+ <li><a href="#tabs-2"><?php echo __('datatypecategorie tab module'); ?></a></li>
+ </ul>
+
+
+ <div id="tabs-1" class="tabPage">
+<div class="edit">
+ <div class="tabs">
+ <ul>
+ <li><a href="#subtabs-1"><?php echo __('datatypecategorie tab environement'); ?></a></li>
+ </ul>
+
+ <div id="subtabs-1" class="tabPage">
+
+ <?php echo tep_draw_form('configuration', FILENAME_CONFIGURATION, FILENAME_CFG_45. '&action=save_mutli') ?>
+
+
+ <fieldset class="block_field">
+ <legend><?php //echo __('datatypecategorie legend warn') ?></legend>
+
+ <ul class="block_input">
+ <?php foreach(datatypecategorie::$list->config as $row):?>
+ <li id="nav_<?php echo $row->key ?>"><h5 title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->title). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></h5>
+
+ <div class="block_input tirroir">
+ <label><?php echo __($row->description); ?></label>
+ <p>
+ <?php echo $row->value_field ; ?>
+ </p>
+ </div>
+ </li>
+ <?php endforeach; ?>
+ </ul>
+ </fieldset>
+
+ <div class="button_nav">
+ <?php print tep_image_submit('button_copy.gif', IMAGE_UPDATE) .tep_js_back(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $_GET['gparentID'].'&gID=' . $_GET['gID'] )) ; ?>
+ </div>
+</form>
+ </div>
+
+
+ </div>
+<br class="clear" />
+</div>
+ </div>
+
+
+ <div id="tabs-2" class="tabPage">
+
+ <div id="datatypecategorie-module" class="block_form">
+ <h4 class="main-title"><?php echo __('datatypecategorie heading modules'); ?></h4>
+
+
+ <table class="dataTable">
+ <thead>
+ <tr>
+ <th><?php echo __('table heading module code'); ?></th>
+ <th><?php echo __('table heading module title'); ?></th>
+ <th><?php echo __('table heading module desc'); ?></th>
+ <th><?php echo __('table heading module sort'); ?></th>
+ <th><?php echo __('table heading module status'); ?></th>
+ <th><?php echo __('table heading action'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach(datatypecategorie::$module as $row): /*print_r($row)*/ ?>
+ <tr>
+ <td><?php echo $row->content->code; ?></td>
+ <td><?php echo $row->content->title; ?></td>
+ <td><?php echo $row->content->description; ?></td>
+ <td class="tcenter"><?php echo $row->content->sort_order; ?></td>
+ <td class="tcenter">
+ <?php echo datatypecategorie::GetStatusMod($row); ?>
+ </td>
+ <td class="tright">
+ <?php echo datatypecategorie::get_item_action($row); ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+
+
+
+
+
+ <?php if(isset(datatypecategorie::$moduleEdit)): ?>
+
+ <?php echo tep_draw_form('configuration', FILENAME_CONFIGURATION, FILENAME_CFG_45 . '&mod='.$_GET['mod'].'&action=modules-save') ?>
+ <fieldset class="block_field">
+ <legend><?php echo __('datatypecategorie heading Configuration du modules') ?></legend>
+ <?php echo datatypecategorie::$moduleEdit; ?>
+
+ <div class="button_nav">
+ <?php print tep_image_submit('button_copy.gif', IMAGE_UPDATE) .tep_js_back(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_45 )) ; ?>
+ </div>
+ </fieldset>
+ </form>
+
+ <?php endif; ?>
+
+
+ </div>
+
+ </div>
+ <div id="tabs-3" class="tabPage">
+ </div>
+ </div>
Modified: trunk/catalog/admin/includes/gabarit/products/display_view.inline.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/display_view.inline.gab 2013-10-15 12:55:36 UTC (rev 4889)
+++ trunk/catalog/admin/includes/gabarit/products/display_view.inline.gab 2013-10-15 14:22:21 UTC (rev 4890)
@@ -2,8 +2,8 @@
/**
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 17/07/10, 16:35
+ @version 2.1.2
+ @date 15/10/2013, 16:35
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -16,7 +16,7 @@
<td style="width:70%">
<div>
<ul>
- <li><?php echo __('product type :').products::NameVirtualID(products::$Info->products_virtual_typeID) ?></li>
+ <li><?php echo __('product type :').products::NameVirtualID(products::$Info->type) ?></li>
</ul>
</div>
</td>
Modified: trunk/catalog/admin/includes/languages/fr_FR/boxes/01_configuration.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/boxes/01_configuration.php 2013-10-15 12:55:36 UTC (rev 4889)
+++ trunk/catalog/admin/includes/languages/fr_FR/boxes/01_configuration.php 2013-10-15 14:22:21 UTC (rev 4890)
@@ -62,6 +62,8 @@
define('BOX_HEADING_CONF_PAYMENT',"Gestion des paiments" );
define('BOX_HEADING_CONF_OPTION_CONTENT',"Option des Pages Cms" );
define('BOX_HEADING_CONF_CONFIG_CONTENT',"Configuration" );
+ define('BOX_HEADING_CONF_OPTION_CATEGORIE',"Option des Categories" );
+ define('BOX_HEADING_CONF_CONFIG_CATEGORIE',"Configuration" );
define('BOX_HEADING_CONF_VIEW_SYSINFO',"info. systeme" );
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_128.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_128.txt 2013-10-15 12:55:36 UTC (rev 4889)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_128.txt 2013-10-15 14:22:21 UTC (rev 4890)
@@ -26,9 +26,6 @@
$lang['DATATYPES_DEFAULT_NOSELECTED_S']="le datatype par defaut" ;
$lang['DATATYPES_DEFAULT_NOSELECTED_L']="definit le datatype qui sera affiché par defaut" ;
-$lang['DATATYPES_ROOTLISTING_CATEGORIE_S']="les datatypes pris en charge par le datatype categorie" ;
-$lang['DATATYPES_ROOTLISTING_CATEGORIE_L']="la liste des datatypes couplé aux les categories" ;
-
$lang['DATATYPES_ROOTLISTING_MANUFACTURER_S']="les datatypes pris en charge par le datatype manufacturer" ;
$lang['DATATYPES_ROOTLISTING_MANUFACTURER_L']="la liste des datatypes couplé aux les fabricants" ;
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_27.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_27.txt 2013-10-15 12:55:36 UTC (rev 4889)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_27.txt 2013-10-15 14:22:21 UTC (rev 4890)
@@ -8,10 +8,7 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
-$lang['SHOW_COUNTS_S']="Décompte des catégories" ;
-$lang['SHOW_COUNTS_L']="Décompter combien de produits sont présents dans chaque catégorie." ;
-$lang['NOT_RECUP_CASSE_IN_TXT_CATEGORIES_S']="[general] Ne pas rattraper la casse des Noms de catégories" ;
-$lang['NOT_RECUP_CASSE_IN_TXT_CATEGORIES_L']="" ;
+
?>
\ No newline at end of file
Added: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/datatypecategorie.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/datatypecategorie.txt (rev 0)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/datatypecategorie.txt 2013-10-15 14:22:21 UTC (rev 4890)
@@ -0,0 +1,54 @@
+<?php
+/**
+ @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.2
+ @date 01/10/20103, 11:18
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+$lang['heading datatypecategorie configuration']="Configuration des pages Catégories" ;
+
+ /* tab */
+ $lang['datatypecategorie tab configuration']="Configuration" ;
+ $lang['datatypecategorie tab module']="Modules" ;
+ $lang['datatypecategorie tab environement']="Environement" ;
+
+/* tab configuration */
+ $lang['heading datatypecategorie manage type products']="Gestion des types de contenu cms" ;
+ $lang['datatypecategorie legend manage type']="Types de contenu" ;
+ $lang['datatypecategorie type txt intro']="Les types de contenu modifie le fonctionnement des contenu, et permettent de construire des extensions ciblées avec des caractéristiques particulières. L'ensemble des ces modifications peuvent impacter profondement le fonctionnement de vos page contenu. \n Ne manipuler ces options que si vous savez ce que vous faites !!! \n\n Pour manipuler les types de contenu disponible, utiliser la section 'Gestion status' " ;
+
+ $lang['datatypecategorie tableheading id']="Id" ;
+ $lang['datatypecategorie tableheading active']="Actif" ;
+ $lang['datatypecategorie tableheading name']="Nom" ;
+ $lang['datatypecategorie tableheading section edit active']="Section inactive" ;
+
+
+/* tab modules */
+ $lang['datatypecategorie heading modules']="Activer / desactiver l'ensemble des modules specifique aux contenu" ;
+
+ $lang['table heading module code']="Nom" ;
+ $lang['table heading module title']="Description" ;
+ $lang['table heading module desc']="crée/modifié" ;
+ $lang['table heading module sort']="Ordre" ;
+ $lang['table heading module status']="Etat" ;
+ $lang['table heading action']="Action" ;
+
+
+ /* Edit */
+ $lang['datatypecategorie heading Configuration du modules']="Options de ce module" ;
+
+
+
+ /* Config */
+ $lang['DATATYPES_ROOTLISTING_CATEGORIE_S']="les datatypes pris en charge par le datatype categorie" ;
+ $lang['DATATYPES_ROOTLISTING_CATEGORIE_L']="la liste des datatypes couplé aux les categories" ;
+
+ $lang['SHOW_COUNTS_S']="Décompte des catégories" ;
+ $lang['SHOW_COUNTS_L']="Décompter combien de produits sont présents dans chaque catégorie." ;
+ $lang['NOT_RECUP_CASSE_IN_TXT_CATEGORIES_S']="[general] Ne pas rattraper la casse des Noms de catégories" ;
+ $lang['NOT_RECUP_CASSE_IN_TXT_CATEGORIES_L']="" ;
+?>
\ No newline at end of file
Added: trunk/catalog/admin/includes/modules/configuration/datatypecategorie.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/datatypecategorie.php (rev 0)
+++ trunk/catalog/admin/includes/modules/configuration/datatypecategorie.php 2013-10-15 14:22:21 UTC (rev 4890)
@@ -0,0 +1,404 @@
+<?php
+/**
+ @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.2
+ @date 01/10/2013, 19:49
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class datatypecategorie
+*/
+
+define('FILENAME_CFG_45',"gparentID=45&gID=46&");
+
+
+Class datatypecategorie
+ implements ext_configuration
+ {
+
+ /**
+ @var object all config
+ */
+ public static $list;
+ /**
+ @var int Current Get gID
+ */
+ public static $gID;
+ /**
+ @var
+ */
+ public static $cfg;
+ /**
+ @var
+ */
+ public static $module;
+
+ /**
+ @var
+ */
+ public static $moduleEdit;
+
+ /**
+ @fn __construct()
+ @brief constructor
+ */
+ function __construct(){
+ global $oscss;
+ $this->code=__CLASS__;
+ global $messageStack, $language,$lang;
+
+ $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/configuration/'.$this->code.'.txt');
+
+// self::$cfg =new sqlconfiguration();
+ self::$gID = (int)$_GET['gID'];
+ }
+
+
+ /**
+ @fn draw_action()
+ @brief Action Prise en charge par le modules
+ */
+ public function draw_action(){
+ global $action,$messageStack;
+
+ $DB=Database::getInstance();
+ $gparentID = tep_db_prepare_input($_GET['gparentID']);
+ $gID= tep_db_prepare_input($_GET['gID']);
+
+ switch($action){
+ /**
+ @brief save page groupe
+ */
+ case 'save_mutli':
+
+ /// option de configuration classique
+ if(tep_not_null($gID) ){
+
+ $list=sqlconfiguration::fetch(array('group_id'=> (int)$gID), true);
+ if(is_object($list))
+ $list = array($list);
+
+ foreach($list as $row) {
+
+ if(isset($_POST['configuration'][$row->key])) {
+ $configuration_value = tep_db_prepare_input($_POST['configuration'][$row->key]);
+
+ if( ($res=sqlconfiguration::update(array('key'=>$row->key , 'value'=>tep_db_input($configuration_value) ))) == false)$erreur[]=false;
+ else $erreur[]=true;
+
+ }
+
+ }
+
+
+
+ if(!in_array(false,$erreur)) $messageStack->add_session(SAVE_CONFIG_OK, 'success');
+ else $messageStack->add_session(SAVE_CONFIG_NOT_OK, 'error');
+
+ }
+
+
+
+
+
+ /// configuration transversale
+ // prise en charge de la gestion des type de produits
+
+ // mise a jour
+ if(isset($_POST['types']) && is_array($_POST['types']) ){
+ $new_flag_virtual = '';
+ $status = sqlstatus::fetch(array('type'=>'categorie'), true);
+
+ foreach($status as $key=>$rows ) {
+
+ $data_array = array(
+ 'type'=>'categorie',
+ 'id'=>$rows->id,
+ 'status'=>(isset($_POST['types']['active'][$rows->id])? 1 : 0 ),
+ );
+
+ sqlstatus::update($data_array);
+
+
+// if( isset($_POST['types']['virtual'][$rows->id]) && (int)$_POST['types']['virtual'][$rows->id] == 2 )
+// $new_flag_virtual .= $rows->id.',';
+//
+// // Ajustement configuration CFG_CLASS_VIRTUAL_TYPE_xx
+// sqlconfiguration::update(array(
+// 'key'=>'CFG_CLASS_VIRTUAL_TYPE_'.$rows->id,
+// 'value'=>tep_db_prepare_input($_POST['types']['conf'][$rows->id]),
+// ));
+ }
+
+ // Ajustement configuration TYPE_VIRTUAL_PRODUCTS
+// sqlconfiguration::update(array(
+// 'key'=>'TYPE_VIRTUAL_PRODUCTS',
+// 'value'=>$new_flag_virtual
+// ));
+
+ }
+
+ // ajout d'un type de produits
+// if(isset($_POST['name_0']) && tep_not_null($_POST['name_0']) ){
+// $sql_data = array(
+// 'type'=>'categorie',
+// 'name'=>(string)tep_db_prepare_input($_POST['name_0']),
+// 'status'=>0,
+// );
+//
+// sqlstatus::create($sql_data);
+
+ // Ajustement configuration TYPE_VIRTUAL_PRODUCTS
+
+// }
+
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '&cID=' . $cID));
+ break;
+
+ /**
+ @brief Manage modules
+ */
+ case 'modules':
+
+
+ if(isset($_GET['flag'])){
+
+ $mod=tep_db_prepare_input($_GET['mod']);
+ $flag=(int)tep_db_prepare_input($_GET['flag']);
+
+ // call type module
+ $typeOri=modulesUtility::GetModttype('categorie');
+
+ // get current value
+ $current = sqlconfiguration::fetch(array('key'=>$typeOri->key), true);
+ $current_bo = sqlconfiguration::fetch(array('key'=>$typeOri->key_BO), true);
+
+
+ // call
+ $type=modulesUtility::LoadModule('categorie',$mod.'.php');
+ // force install
+ if( $flag ==1 && !$type->content->check()){
+ $type->content->remove();
+ $type->content->install();
+ }
+ // force remove
+ elseif( $flag == 0 && $type->content->check())
+ $type->content->remove();
+
+ // up module
+ $r=explode(';',$typeOri->value);
+ $result[]=( ($flag ==1 ) ? $mod.'.php;' : '' );
+
+ foreach($r as $v)
+ if(trim($v) !='')
+ if( (
+ $flag ==1
+ || ($flag == 0 && $v != trim($mod).'.php' )
+ )
+ && !in_array($v,$result)
+ ){
+ $result[]=$v;
+ }
+
+ sqlconfiguration::update(array('id'=>$current->id, 'value'=>implode(';',$result)) );
+
+ if($current_bo !=false)
+ sqlconfiguration::update(array('id'=>$current_bo->id, 'value'=>implode(';',$result)) );
+
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '#modorder-module' ));
+ }
+
+ break;
+ case 'modules-edit':
+
+ $mod=tep_db_prepare_input($_GET['mod']);
+ // call
+ $Mod=modulesUtility::LoadModule('categorie',$mod.'.php');
+ $ModCurr = $Mod->content;
+ $i=0;
+ foreach($ModCurr->keys() as $value){
+ $i++;
+ $current = sqlconfiguration::fetch(array('key'=>$value));
+
+ $keys_extra[$value]['title'] = $current['configuration_title'];
+ $keys_extra[$value]['value'] = $current['configuration_value'];
+ $keys_extra[$value]['description'] = $current['configuration_description'];
+ $keys_extra[$value]['use_function'] = $current['use_function'];
+ $keys_extra[$value]['set_function'] = $current['set_function'];
+ }
+
+ self::$moduleEdit = configUtility::FormatEditAuto(array('array'=>$keys_extra));
+ break;
+ /**
+ @brief save Config base page
+ */
+ case 'modules-save':
+ foreach($_POST['configuration'] as $key=>$value) {
+
+ $configuration_value = tep_db_prepare_input($value);
+
+ if( ($res=sqlconfiguration::update(array('key'=>$key , 'value'=>tep_db_input($value) ))) == false)$erreur[]=false;
+ else $erreur[]=true;
+
+ }
+
+ if(!in_array(false,$erreur)) $messageStack->add_session(SAVE_CONFIG_OK, 'success');
+ else $messageStack->add_session(SAVE_CONFIG_NOT_OK, 'error');
+
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '&action=modules-edit&mod='. $_GET['mod'] ));
+ break;
+
+ }
+ }
+
+ /**
+ @fn load_db_values($Id)
+ @return object
+ */
+ public function load_db_values($Id){
+ global $languages_id;
+
+ $DB = Database::getInstance();
+ $list=new stdClass();
+
+ $li=sqlconfiguration::fetch(array('group_id'=> (int)self::$gID), true);
+
+ if(is_object($li))
+ $li = array($li);
+
+ if(is_array($li))
+ foreach($li as $row) {
+
+ $cfgValue =configUtility::CallExecConfigLine($row->use, $row->key, $row->value);
+
+ if (!empty($row->set)){
+ if(strpos($row->set,'(') === false) $row->set.='(';
+ eval('$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ }
+ else $value_field = tep_draw_input_field('configuration['.$row->key.']', '',$row->value);
+
+ $conf = $row;
+ $row->cfgValue=$cfgValue;
+ $row->value_field=$value_field;
+
+ $list->config[$row->key]=$conf;
+ }
+
+
+
+ $li = sqlstatus::fetch(array('type'=>'categorie', 'language_id'=>$languages_id), true);
+ if(is_object($li))
+ $li = array($li);
+
+ $list->types = $li;
+
+ return $list;
+ }
+
+ /**
+ @brief Appelé dans le header de page
+ */
+ public static function draw_header(){
+ ?>
+ <style type="text/css">
+ #central form label {
+ display: inline-block;
+ font-weight: normal;
+ margin: 5px 10px;
+ text-align: left;
+ white-space: pre-wrap;
+ width: 90%;
+ }
+ </style>
+ <?php
+ }
+
+ /**
+ @brief Contenu central
+ */
+ public function draw(){
+
+ global $action,$gparentID;
+
+
+
+ switch($action){
+ case 'modules';
+ return self::GetStatusMod( new objectInfo( array('status'=>(int)$_GET['flag'], 'content'=> new objectInfo(array('mod'=>(int)$_GET['mod'])) )) );
+ break;
+
+ default:
+ self::$list = $this->load_db_values('');
+ $dbl = array();
+
+ foreach(scan(DIR_FS_ADMIN. DIR_WS_MODULES.'categories/') as $row){
+ if( substr($row,-3) =='php'){
+
+ $class = substr($row,0, -4);
+
+ $tmp = modulesUtility::LoadModule('categories', $row);
+ $dbl[]=$tmp->classe;
+ self::$module[]= $tmp;
+
+ }
+ }
+
+ foreach(scan(DIR_FS_CATALOG_MODULES.'categories/') as $row){
+ if( substr($row,-3) =='php'){
+
+ $class = substr($row,0, -4);
+
+ $tmp = modulesUtility::LoadModule('categories', $row);
+ if( !in_array($tmp->classe, $dbl) )
+ self::$module[]= $tmp;
+ }
+ }
+
+ return tep_get_include_contents('configuration/'.__CLASS__.'.listing');
+ }
+
+ }
+
+
+
+ /**
+ @fn get_item_action($orders)
+ @brief fonction qui construit l'affichage de la colonne action
+ La mise en forme est contenu dans les ressource xml du template en cours
+ @param $orders array
+ @return string
+ */
+ public static function get_item_action($row){
+ global $SecuKey;
+ return sprintf(
+ CsrtAction::getFormat('row_action'),
+ '',
+ (($row->status)
+ ? sprintf(CsrtAction::getLink('row_action_right', __('image config'), 'config'), '', tep_href_link(FILENAME_CONFIGURATION, 'FILENAME_CFG_45'.'action=modules-edit&mod='.$row->content->code ),'' )
+ : ''
+ )
+ );
+ }
+
+ /**
+ @brief return format html for row status
+ @param $content array restuts row
+ @return string html
+ */
+ public static function GetStatusMod($row){
+ $exclude=array('action','mod','forceajax','type','class','function','funct', 'mod');
+ $query_s='FILENAME_CFG_45'.'action=modules&mod=' . $row->content->code.'&flag=';
+
+ return '<a class="ajaxinline" href="' . tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params($exclude).$query_s.(($row->status == '1')? '0' : '1') ) . '">'.
+ sprintf(
+ CsrtAction::getFormat('row_flag'),
+ (int)$row->status,
+ ( ($row->status == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ ).
+ '</a>';
+ }
+}
+
+?>
\ No newline at end of file
Modified: trunk/catalog/includes/application_top.php
===================================================================
--- trunk/catalog/includes/application_top.php 2013-10-15 12:55:36 UTC (rev 4889)
+++ trunk/catalog/includes/application_top.php 2013-10-15 14:22:21 UTC (rev 4890)
@@ -305,7 +305,7 @@
$languages_id = $lng->language['id'];
/// force redirect for no view GET vars
- if (isset($_GET['language']))
+ if (isset($_GET['language']) && !_cst_bool('NOREDIRECTLANGUAGE') )
tep_redirect(tep_href_link());
}
else{
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2013-10-15 12:55:36 UTC (rev 4889)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2013-10-15 14:22:21 UTC (rev 4890)
@@ -299,9 +299,8 @@
-- 27 general appearance
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('SHOW_COUNTS_S', 'SHOW_COUNTS', 'false', 'SHOW_COUNTS_L', '27', '0', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),', '3');
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified,date_added, use_function, set_function) values ('NOT_RECUP_CASSE_IN_TXT_CATEGORIES_S', 'NOT_RECUP_CASSE_IN_TXT_CATEGORIES', 'false', 'NOT_RECUP_CASSE_IN_TXT_CATEGORIES_L', '27', '1', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),');
+
-- 36
-- insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('EXPECTED_PRODUCTS_SORT_S', 'EXPECTED_PRODUCTS_SORT', 'desc', 'EXPECTED_PRODUCTS_SORT_L', '20', '8', NULL, NOW(), NULL, 'tep_cfg_select_option(array(\'asc\', \'desc\'),');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('EXPECTED_PRODUCTS_FIELD_S', 'EXPECTED_PRODUCTS_FIELD', 'date_expected', 'EXPECTED_PRODUCTS_FIELD_L', '36', '9', NULL, NOW(), NULL, 'tep_cfg_select_option(array(\'prevorder\', \'publied\'),');
@@ -337,6 +336,11 @@
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('CUSTOMER_CITY_FORCE_STRTOUPPER_S', 'CUSTOMER_CITY_FORCE_STRTOUPPER', 'true', 'CUSTOMER_CITY_FORCE_STRTOUPPER_L', '28', '21', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','3');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('CUSTOMER_PUBLIC_PROFIL_S', 'CUSTOMER_PUBLIC_PROFIL', 'true', 'CUSTOMER_PUBLIC_PROFIL_L', '28', '21', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','3');
+ -- 46 option categorie
+insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('DATATYPES_ROOTLISTING_CATEGORIE_S', 'DATATYPES_ROOTLISTING_CATEGORIE', 'product,content,nested', 'DATATYPES_ROOTLISTING_CATEGORIE_L', '46', '0', NOW(), NOW(),NULL, NULL, 2);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('SHOW_COUNTS_S', 'SHOW_COUNTS', 'false', 'SHOW_COUNTS_L', '46', '0', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),', '3');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified,date_added, use_function, set_function) values ('NOT_RECUP_CASSE_IN_TXT_CATEGORIES_S', 'NOT_RECUP_CASSE_IN_TXT_CATEGORIES', 'false', 'NOT_RECUP_CASSE_IN_TXT_CATEGORIES_L', '46', '1', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),');
+
-- 128 General environement
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('USE_LOCAL_GENERAT_PDF_S', 'USE_LOCAL_GENERAT_PDF', 'false', 'USE_LOCAL_GENERAT_PDF_L', '128', '5', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','3');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('USE_MODELE_PDF_S', 'USE_MODELE_PDF', 'harry', 'USE_MODELE_PDF_L', '128', '5', NULL, NOW(), NULL, '','2');
@@ -345,9 +349,11 @@
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function ,set_function,configuration_type) values ('DATATYPES_DEFAULT_NOSELECTED_S', 'DATATYPES_DEFAULT_NOSELECTED', 'product', 'DATATYPES_DEFAULT_NOSELECTED_L', '128', '0', NOW(), NOW(),NULL, NULL, 2);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('PUBLIC_PAGE_TYPE_S', 'PUBLIC_PAGE_TYPE', 'listing,product,account,home,content', 'PUBLIC_PAGE_TYPE_L', '128', '0', NOW(), NOW(),NULL, NULL, 2);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('DATATYPES_S', 'DATATYPES', 'error,product,content,diver,featured,categorie,home,', 'DATATYPES_L', '128', '0', NOW(), NOW(),NULL, NULL, 2);
-insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('DATATYPES_ROOTLISTING_CATEGORIE_S', 'DATATYPES_ROOTLISTING_CATEGORIE', 'product,content,nested', 'DATATYPES_ROOTLISTING_CATEGORIE_L', '128', '0', NOW(), NOW(),NULL, NULL, 2);
insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('DATATYPES_ROOTLISTING_FEATURED_S', 'DATATYPES_ROOTLISTING_FEATURED', 'product', 'DATATYPES_ROOTLISTING_FEATURED_L', '128', '0', NOW(), NOW(),NULL, NULL, 2);
+
+
+
-- 129 option orders
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function,configuration_type) values ('DEFAULT_ORDERS_STATUS_ID_S', 'DEFAULT_ORDERS_STATUS_ID', '1', 'DEFAULT_ORDERS_STATUS_ID_L', '129', '2', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_cfg_pull_down_order_statuses(',2);
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql 2013-10-15 12:55:36 UTC (rev 4889)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql 2013-10-15 14:22:21 UTC (rev 4890)
@@ -77,6 +77,8 @@
insert into osc_configuration_group values (43 , 'OPTION_CONTENT', NULL, 0 , 1, 127, '1', 'OPTION_CONTENT');
insert into osc_configuration_group values (44, 'CONFIG_CONTENT', NULL , 0, 1, 43, '0', 'DATATYPECONTENT');
+ insert into osc_configuration_group values (45 , 'OPTION_CATEGORIE', NULL, 0 , 1, 127, '1', 'OPTION_CATEGORIE');
+ insert into osc_configuration_group values (46, 'CONFIG_CATEGORIE', NULL , 0, 1, 45, '0', 'DATATYPECATEGORIE');
-- hidden in menu configuration
insert into osc_configuration_group values (37 , 'VIEW_SYSINFO', NULL, 0 , 0, 120, '1', 'MODSYSINFO');
insert into osc_configuration_group values (38 , 'VIEW_SYSINFO', NULL, 0 , 0, 120, '1', 'MODCORECACHE');
Added: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/data/91_osc_configuration.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/data/91_osc_configuration.sql 2013-10-15 14:22:21 UTC (rev 4890)
@@ -0,0 +1,3 @@
+
+ -- 46 option categorie
+insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('DATATYPES_ROOTLISTING_CATEGORIE_S', 'DATATYPES_ROOTLISTING_CATEGORIE', 'product,content,nested', 'DATATYPES_ROOTLISTING_CATEGORIE_L', '46', '0', NOW(), NOW(),NULL, NULL, 2);
\ No newline at end of file
Added: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/data/91_osc_configuration_group.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/data/91_osc_configuration_group.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/data/91_osc_configuration_group.sql 2013-10-15 14:22:21 UTC (rev 4890)
@@ -0,0 +1,41 @@
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2011 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
+
+
+ insert into osc_configuration_group values (43 , 'OPTION_CONTENT', NULL, 0 , 1, 127, '1', 'OPTION_CONTENT');
+ insert into osc_configuration_group values (44, 'CONFIG_CONTENT', NULL , 0, 1, 43, '0', 'DATATYPECONTENT');
+
+ insert into osc_configuration_group values (45 , 'OPTION_CATEGORIE', NULL, 0 , 1, 127, '1', 'OPTION_CATEGORIE');
+ insert into osc_configuration_group values (46, 'CONFIG_CATEGORIE', NULL , 0, 1, 45, '0', 'DATATYPECATEGORIE');
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-15 12:55:42
|
Revision: 4889
http://sourceforge.net/p/oscss/svn/4889
Author: oscim
Date: 2013-10-15 12:55:36 +0000 (Tue, 15 Oct 2013)
Log Message:
-----------
Fix bug edit/create
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlcustomersextrafields.php
trunk/catalog/admin/includes/gabarit/configuration/modcustextra/draw.edit.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modcustextra.txt
trunk/catalog/admin/includes/modules/configuration/modcustextra.php
Modified: trunk/catalog/admin/includes/classes/drivers/sqlcustomersextrafields.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcustomersextrafields.php 2013-10-15 12:12:09 UTC (rev 4888)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcustomersextrafields.php 2013-10-15 12:55:36 UTC (rev 4889)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 03/07/2013, 15:46
+ @version 2.1.2
+ @date 15/10/2013, 15:46
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@@ -53,7 +53,8 @@
*/
public static function update($option){
- if(!isset($option['key']) && !isset($option['id'])) return 'key or id';
+ if(!isset($option['key']) && !isset($option['id']))
+ return false;
$where ='';
if(isset($option['id'])) $where .="AND fields_id = '".(int)$option['id']."' ";
@@ -77,6 +78,7 @@
if(isset($option['group_class'])) $sql_data_array['fields_group_class'] = $option['group_class'];
+
$res=tep_db_perform(TABLE_EXTRA_FIELDS, $sql_data_array, 'update' , substr($where,3) );
return $res;
Modified: trunk/catalog/admin/includes/gabarit/configuration/modcustextra/draw.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modcustextra/draw.edit.gab 2013-10-15 12:12:09 UTC (rev 4888)
+++ trunk/catalog/admin/includes/gabarit/configuration/modcustextra/draw.edit.gab 2013-10-15 12:55:36 UTC (rev 4889)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 03/07/2013, 15:46
+ @version 2.1.2
+ @date 15/10/2013, 15:46
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief form for add and manage extra field for customers
@@ -13,7 +13,7 @@
?>
<h3><?php echo __('text heading edit field') ?></h3>
-<?php echo tep_draw_form('update', modcustextra::FILENAME, FILENAME_CFG_33.(((modcustextra::$fInfo->fields_id > 0 )?'&cID=' . modcustextra::$fInfo->fields_id . '&action=update' :'&action=insert') ), 'post') ?>
+<?php echo tep_draw_form('update', modcustextra::FILENAME, FILENAME_CFG_33.(((modcustextra::$fInfo->fields_id > 0 )?'&cID=' . modcustextra::$fInfo->fields_id . '&action=update' :'&action=insert') )) ?>
<div class="block_form">
<p>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modcustextra.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modcustextra.txt 2013-10-15 12:12:09 UTC (rev 4888)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modcustextra.txt 2013-10-15 12:55:36 UTC (rev 4889)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 03/07/2013, 15:46
+ @version 2.1.2
+ @date 15/10/2013, 15:46
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -75,4 +75,15 @@
$lang['entry list type select']="Liste de selection" ;
$lang['entry list type select multi']="Liste de selection (choix multiple)" ;
+
+ $lang['@modcustextra error update for extra fields']=" Erreur lors de la mise à jour du champ" ;
+ $lang['@modcustextra succes update for extra fields']=" Succes de la mise à jour du champ" ;
+ $lang['@modcustextra error create for extra fields']=" Erreur lors de la creation du champ" ;
+ $lang['@modcustextra error create for extra fields']=" Succes lors de la creation du champ" ;
+ $lang['@modcustextra error update for extra fields label']=" Erreur lors de la mise à jour du label du champ" ;
+ $lang['@modcustextra succes update for extra fields label']=" Succes de la mise à jour du label du champ" ;
+ $lang['@modcustextra error create for extra fields label']=" Erreur lors de la creation du label du champ" ;
+ $lang['@modcustextra error create for extra fields label']=" Succes lors de la creation du label du champ" ;
+
+
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/modules/configuration/modcustextra.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modcustextra.php 2013-10-15 12:12:09 UTC (rev 4888)
+++ trunk/catalog/admin/includes/modules/configuration/modcustextra.php 2013-10-15 12:55:36 UTC (rev 4889)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 03/07/2013, 15:46
+ @version 2.1.2
+ @date 15/10/2013, 15:46
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class modcustextra
@@ -57,6 +57,7 @@
public function draw_action(){
global $action,$messageStack;
+ $DB=Database::getInstance();
switch ($action) {
case 'insert':
@@ -76,17 +77,30 @@
'group_class' => tep_db_prepare_input($_POST['fields_group_class'])
);
- if (isset(self::$cID)){
+ if (self::$cID > 0){
$fields_id = tep_db_prepare_input(self::$cID);
- $sql_data_array['id']=$fields_id;
- if ( sqlcustomersextrafields::fetch(array('id'=>$fields_id)) )
- sqlcustomersextrafields::update( $sql_data_array );
+ if ( (bool)sqlcustomersextrafields::fetch(array('id'=>$fields_id)) ){
+ $sql_data_array['id']=$fields_id;
+ if( ! sqlcustomersextrafields::update( $sql_data_array ) )
+ $messageStack->add_session('@modcustextra error update for extra fields', 'error');
+ else
+ $messageStack->add_session('@modcustextra succes update for extra fields', 'success');
+ }
}
- else
- $fields_id = sqlcustomersextrafields::create($sql_data_array);
+ else{
+ if( ! $fields_id = sqlcustomersextrafields::create($sql_data_array) )
+ $messageStack->add_session('@modcustextra error create for extra fields', 'error');
+ else
+ $messageStack->add_session('@modcustextra succes create for extra fields', 'success');
+ }
+
+ if($fields_id) {
+
+
+
foreach( tep_get_languages() as $rows){
$language_id = $rows['id'];
@@ -97,13 +111,25 @@
'format' => tep_db_prepare_input($_POST['fields_format'][$language_id]),
);
- if(! sqlcustomersextrafieldslabels::fetch($data_array) )
- sqlcustomersextrafieldslabels::create($data_array);
- else
- sqlcustomersextrafieldslabels::update($data_array);
+ if(! sqlcustomersextrafieldslabels::fetch($data_array) ){
+ if( ! sqlcustomersextrafieldslabels::create($data_array) )
+ $messageStack->add_session('@modcustextra error create for extra fields label', 'error');
+ else
+ $messageStack->add_session('@modcustextra succes create for extra fields label', 'success');
+ }
+ else{
+ if (! sqlcustomersextrafieldslabels::update($data_array) )
+ $messageStack->add_session('@modcustextra error update for extra fields label', 'error');
+ else
+ $messageStack->add_session('@modcustextra succes update for extra fields label', 'success');
+ }
}
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','fID'),false) . 'fID=' . $fields_id));
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','fID'),false) . 'action=edit&fID=' . $fields_id));
+
+ }
+
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_33 ));
break;
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-15 12:12:12
|
Revision: 4888
http://sourceforge.net/p/oscss/svn/4888
Author: oscim
Date: 2013-10-15 12:12:09 +0000 (Tue, 15 Oct 2013)
Log Message:
-----------
Fix
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlcontent.php
trunk/catalog/admin/includes/modules/pages/cms_content.php
Modified: trunk/catalog/admin/includes/classes/drivers/sqlcontent.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcontent.php 2013-10-14 08:49:47 UTC (rev 4887)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcontent.php 2013-10-15 12:12:09 UTC (rev 4888)
@@ -145,12 +145,11 @@
elseif(isset($post['cms_content']['content_text']) && is_string($post['cms_content']['content_text']) )
$sql_data_array['content_text'] = tep_db_prepare_input($post['cms_content']['content_text']) ;
- if(isset($post['cms_content']['content_title'][$language_id]) && is_array($post['content_title']['content_title']) )
+ if(isset($post['cms_content']['content_title'][$language_id]) && is_array($post['cms_content']['content_title']) )
$sql_data_array['content_title'] = tep_db_prepare_input($post['cms_content']['content_title'][$language_id]) ;
elseif(isset($post['cms_content']['content_title']) && is_string($post['cms_content']['content_title']) )
$sql_data_array['content_title'] = tep_db_prepare_input($post['cms_content']['content_title']) ;
-
$sql_data_array = array_merge($sql_data_array, self::$modules->get_update_table_content_description ($language_id));
if(count($sql_data_array) > 0)
@@ -373,8 +372,8 @@
);
for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
- $par['text'][$list_languages[$i]['id']] = '';
- $par['title'][$list_languages[$i]['id']] = '';
+ $par['text'][$list_languages[$i]['id']] = '';
+ $par['title'][$list_languages[$i]['id']] = '';
}
return self::CleanKey($par);
Modified: trunk/catalog/admin/includes/modules/pages/cms_content.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/cms_content.php 2013-10-14 08:49:47 UTC (rev 4887)
+++ trunk/catalog/admin/includes/modules/pages/cms_content.php 2013-10-15 12:12:09 UTC (rev 4888)
@@ -510,7 +510,10 @@
$params['language_id']= $languages_id;
$params['cPath']=(isset($_POST['cPath'])) ? tep_db_prepare_input($_POST['cPath']) : 0;
- sqlcontent::update($params);
+ if( ! sqlcontent::update($params) )
+ $messageStack->add_session(__('@cms_content error in update process'), 'error');
+ else
+ $messageStack->add_session(__('@cms_content success in update process'), 'success');
if(isset($_POST['up_and_close']) ) tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array( 'cID','flag','action'),false)) );
else tep_redirect(tep_href_link(self::FILENAME, 'page=' . $_GET['page'] . '&cID=' . $content_id.'&action=edit'));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-14 08:49:52
|
Revision: 4887
http://sourceforge.net/p/oscss/svn/4887
Author: oscim
Date: 2013-10-14 08:49:47 +0000 (Mon, 14 Oct 2013)
Log Message:
-----------
Fix install
Added Paths:
-----------
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_admin_users.sql
Added: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_admin_users.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_admin_users.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_admin_users.sql 2013-10-14 08:49:47 UTC (rev 4887)
@@ -0,0 +1,15 @@
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2012 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
+
+
+ALTER TABLE osc_admin_users ADD magic_url varchar(30) null ;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-14 08:18:39
|
Revision: 4886
http://sourceforge.net/p/oscss/svn/4886
Author: oscim
Date: 2013-10-14 08:18:34 +0000 (Mon, 14 Oct 2013)
Log Message:
-----------
Fixed nav_links and finish upgrade code
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlnavigation_links.php
trunk/catalog/admin/includes/gabarit/navigation_links/display_view.edit.gab
trunk/catalog/admin/includes/gabarit/navigation_links/filter.clause.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/navigation_links.txt
trunk/catalog/admin/includes/modules/pages/navigation_links.php
Modified: trunk/catalog/admin/includes/classes/drivers/sqlnavigation_links.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlnavigation_links.php 2013-10-14 07:01:47 UTC (rev 4885)
+++ trunk/catalog/admin/includes/classes/drivers/sqlnavigation_links.php 2013-10-14 08:18:34 UTC (rev 4886)
@@ -115,15 +115,14 @@
if(isset($sqlarray['type']))$sql_data_array['nav_link_type'] = tep_db_prepare_input($sqlarray['type']);
if(isset($sqlarray['status']))$sql_data_array['nav_link_status'] = tep_db_prepare_input($sqlarray['status']);
if(isset($sqlarray['mode']))$sql_data_array['nav_mode'] = tep_db_prepare_input($sqlarray['mode']);
-
if(isset($sqlarray['parent_id'])) $sql_data_array['parent_id'] = (int)tep_db_prepare_input($sqlarray['parent_id']);
if(isset($sqlarray['css_id'])) $sql_data_array['nav_css_id'] = (int)tep_db_prepare_input($sqlarray['css_id']);
if(isset($sqlarray['customers_status'])) $sql_data_array['customers_status'] = (int)tep_db_prepare_input($sqlarray['customers_status']);
if(isset($sqlarray['sort_order'])) $sql_data_array['nav_sort_order'] = (int)tep_db_prepare_input($sqlarray['sort_order']);
+ if(isset($sqlarray['file'])) $sql_data_array['nav_file'] = tep_db_prepare_input($sqlarray['file']);
-
if(count((array)$sql_data_array)> 0){
if( ! tep_db_perform(TABLE_NAVIGATION_LINKS, $sql_data_array, 'update' , substr($where,3) ) )
$error++;
@@ -141,13 +140,23 @@
foreach(tep_get_languages() as $lg) {
- $row = $sqlarray['langue'];
-
$where_lg .= $where. "AND language_id = '".(int)$lg['id']."' ";
$sql_data_array = array();
- if(isset($row['title'][$lg['id']]))
- $sql_data_array['nav_name'] = tep_db_prepare_input($row['title'][$lg['id']]) ;
+ if(isset($sqlarray['langue'] )){
+ $row = $sqlarray['langue'];
+
+ if(isset($row['name'][$lg['id']]))
+ $sql_data_array['nav_name'] = tep_db_prepare_input($row['name'][$lg['id']]) ;
+ }
+ elseif(isset($post['name']) ){
+ $sql_data_array['nav_name'] = tep_db_prepare_input($post['name']) ;
+ }
+
+
+
+
+
if(count((array)$sql_data_array)> 0)
if( !tep_db_perform(TABLE_NAVIGATION_LINKS_DESCRIPTION, $sql_data_array, 'update' , substr($where_lg,3)) )
$error++;
@@ -207,12 +216,8 @@
$sql="SELECT * FROM " . TABLE_NAVIGATION_LINKS . " a ";
+ $sql.=" WHERE ".substr($where,3);
- if($language_id)
- $sql.=" LEFT JOIN " . TABLE_NAVIGATION_LINKS_DESCRIPTION . " ad ON(ad.nav_link_id = a.nav_link_id AND ad.language_id='" . $language_id . "') ";
-
- $sql.=" WHERE ".substr($where,3);
-
$res=$DB->query($sql);
$num = $res->__get('numRows');
@@ -220,26 +225,45 @@
if($num == 1){
$result=$res->fetchAssoc();
- if(!$language_id)
+ if($language_id > 0){
+ $_query = $DB->query($sql="select fd.nav_name from " . TABLE_NAVIGATION_LINKS_DESCRIPTION . " fd where fd.nav_link_id = '" . (int)$result['nav_link_id'] . "' AND language_id='" . (int)$language_id . "'");
+ $descr = $_query->fetchAssoc();
+
+ $result['name'][$language_id] = $descr['nav_name'];
+
+ tep_db_free_result($_query);
+ }
+ else{
// call all langue for this post
- foreach(tep_get_languages() as $lg){
- $_query = $DB->query("select fd.nav_name as title from " . TABLE_NAVIGATION_LINKS_DESCRIPTION . " fd where fd.nav_link_id = '" . (int)$result['nav_link_id'] . "' AND language_id='" . $lg['id'] . "'");
- $descr = $_query->fetchAssoc();
+ $_query = $DB->query($sql="select fd.* from " . TABLE_NAVIGATION_LINKS_DESCRIPTION . " fd where fd.nav_link_id = '" . (int)$result['nav_link_id'] . "' ");
- $result['lg'][$lg['id']] = ((!$shortkey)? $descr : self::CleanKey($descr));
+ foreach($_query->fetchAllAssoc() as $descr){
+ $result['name'][$descr['language_id']] = $descr['nav_name'];
+ }
+ tep_db_free_result($_query);
- tep_db_free_result($_query);
+ foreach(tep_get_languages() as $lg){
+ if(!isset($result['name'][$lg['id']]))
+ $result['name'][$lg['id']] ='';
}
+ }
-
-
return ((!$shortkey)? $result : self::CleanKey($result));
}
elseif($num > 1){
$array=array();
- foreach($res->fetchAllAssoc() as $result)
+ foreach($res->fetchAllAssoc() as $result){
+
+ $_query = $DB->query($sql="select fd.nav_name from " . TABLE_NAVIGATION_LINKS_DESCRIPTION . " fd where fd.nav_link_id = '" . (int)$result['nav_link_id'] . "' AND language_id='" . (int)$language_id . "'");
+ $descr = $_query->fetchAssoc();
+
+ $result['name']/*[$language_id]*/ = $descr['nav_name'];
+
+ tep_db_free_result($_query);
+
$array[]= ((!$shortkey)? $result : self::CleanKey($result));
+ }
return $array;
}
Modified: trunk/catalog/admin/includes/gabarit/navigation_links/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/navigation_links/display_view.edit.gab 2013-10-14 07:01:47 UTC (rev 4885)
+++ trunk/catalog/admin/includes/gabarit/navigation_links/display_view.edit.gab 2013-10-14 08:18:34 UTC (rev 4886)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 10/05/2012 ,17:48:30
+ @version 2.1.2
+ @date 14/10/2013 ,17:48:30
@author oscim <mail os...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -33,20 +33,16 @@
<?php echo navigation_links::DisplayField('type'); ?>
- <p class="block_input">
+<!-- <p class="block_input">
<Label><?php echo __('@navigation_links text info parent') ?></label>
<?php echo tep_draw_pull_down_menu('parent_id', array_merge(array(array('id'=>0, 'text'=> '')),navigation_links::parent_item_nav()), navigation_links::$Info->parent_id); ?>
- </p>
+ </p>-->
- <?php echo navigation_links::DisplayField('parent_id', '%s'); ?>
+ <?php echo navigation_links::DisplayField('parent_id'); ?>
- <p class="block_input">
- <Label><?php echo __('@navigation_links text info file') ?></label>
- <?php echo tep_draw_input_field('file', '', navigation_links::$Info->file) ?>
- </p>
- <?php echo navigation_links::DisplayField('file', '%s'); ?>
+ <?php echo navigation_links::DisplayField('file'); ?>
</div>
Modified: trunk/catalog/admin/includes/gabarit/navigation_links/filter.clause.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/navigation_links/filter.clause.gab 2013-10-14 07:01:47 UTC (rev 4885)
+++ trunk/catalog/admin/includes/gabarit/navigation_links/filter.clause.gab 2013-10-14 08:18:34 UTC (rev 4886)
@@ -13,13 +13,13 @@
<fieldset>
<legend><?php echo __('@navigation_links filter legend choose display menu'); ?></legend>
<ul class="inline">
- <?php foreach(sqlnavigation_links::fetch(array('parent_id'=>0, 'language_id'=>$languages_id), true) as $row): ?>
+ <?php foreach(sqlnavigation_links::fetch(array('mode'=>1, 'language_id'=>$languages_id), true) as $row): ?>
- <?php $active = ((bool)(count($_SESSION['filters']['menus']) <=0 || (isset($_SESSION['filters']['menus'][$row->id]) && (string)$_SESSION['filters']['menus'][$row->id] == 'on' ))? 'select' : '' ) ; ?>
+ <?php $active = ((bool)(count(@$_SESSION['filters']['menus']) <=0 || (isset($_SESSION['filters']['menus'][$row->id]) && (string)@$_SESSION['filters']['menus'][$row->id] == 'on' ))? 'select' : '' ) ; ?>
<li class="<?php echo $active ?>">
<?php echo tep_draw_checkbox_field('filters[menus]['.$row->id.']', 'filters[menus]['.$row->id.']', 'on', (bool)(strlen($active)>0) ); ?>
- <?php echo$row->name ?>
+ <?php echo $row->name ?>
</li>
<?php endforeach; ?>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/navigation_links.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/navigation_links.txt 2013-10-14 07:01:47 UTC (rev 4885)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/navigation_links.txt 2013-10-14 08:18:34 UTC (rev 4886)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 10/05/2012 ,17:48:30
+ @version 2.1.2
+ @date 14/10/2013 ,17:48:30
@author genrated by GenerCode
@encode UTF-8
@class navigation_links
@@ -31,6 +31,7 @@
$lang['@navigation_links table heading parent_id'] = "Parent id";
$lang['@navigation_links table heading parent name'] = "Parent";
$lang['@navigation_links table heading status'] = "Etat";
+ $lang['@navigation_links table heading file'] = "Cible (fichier ou url)";
/* Edit */
$lang['@navigation_links heading title edit'] = "Edition d'un lien";
@@ -45,6 +46,9 @@
$lang['@navigation_links text info css id'] = "id CSS";
$lang['@navigation_links text info parent'] = "Parent";
+ /* message */
+ $lang['@sqlnavigation_links error in update process'] = "Erreur lors de la mise à jour";
+ $lang['@sqlnavigation_links success in update process'] = "Succés de la mise a jour";
/* Delete */
$lang['@navigation_links heading title delete'] = "Suppresion d'un lien";
Modified: trunk/catalog/admin/includes/modules/pages/navigation_links.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/navigation_links.php 2013-10-14 07:01:47 UTC (rev 4885)
+++ trunk/catalog/admin/includes/modules/pages/navigation_links.php 2013-10-14 08:18:34 UTC (rev 4886)
@@ -112,7 +112,8 @@
'default'=>true,
'width'=>'35%',
'edit'=>array(
- 'input_name'=>'nav_name',
+ 'input_name'=>__CLASS__.'[name]',
+ 'input_type'=>'input',
'input_size'=>'64',
'required_status'=>true,
'active_value_language'=>true,
@@ -127,8 +128,9 @@
'width'=>'6%',
'class'=>'tcenter',
'edit'=>array(
- 'input_name'=>'nav_link_type',
+ 'input_name'=>'type',
'input_type'=>'select',
+ 'class'=>'tleft',
'input_size'=>'1',
'required_status'=>true,
'select_values'=>tep_get_status_array('navigation_links',0,'status_name'),
@@ -141,7 +143,7 @@
'default'=>true,
'width'=>'8%',
'edit'=>array(
- 'input_name'=>'nav_link_type',
+ 'input_name'=>'type',
'input_type'=>'select',
'input_size'=>'1',
'required_status'=>true,
@@ -159,6 +161,7 @@
'edit'=>array(
'input_name'=>'customers_status',
'input_type'=>'select',
+ 'class'=>'tleft',
'input_size'=>'1',
'required_status'=>true,
'select_values'=>tep_get_status_array('customers_restrict_access',0,'status_name'),
@@ -184,6 +187,14 @@
'alias'=>'parent_id',
'class'=>'tcenter',
'text'=>__('@navigation_links table heading parent_id'),
+ 'edit'=>array(
+ 'input_name'=>'parent_id',
+ 'input_type'=>'select',
+ 'class'=>'tleft',
+ 'input_size'=>'1',
+ 'required_status'=>true,
+ 'select_values'=>array_merge(array(array('id'=>0, 'text'=> '')),self::parent_item_nav()),
+ ),
);
self::$allfields['cd2.nav_name'] = array(
@@ -206,15 +217,28 @@
),
);
- self::$allfields['c.nav_link_status'] = array(
+// self::$allfields['c.nav_link_status'] = array(
+// 'sort'=>true,
+// 'alias'=>'status',
+// 'class'=>'tcenter',
+// 'text'=>__('@navigation_links table heading status'),
+// 'default'=>true,
+// 'edit'=>array(
+// 'input_name'=>'sort_order',
+// 'input_size'=>'2',
+// ),
+// );
+
+ self::$allfields['c.nav_file'] = array(
'sort'=>true,
- 'alias'=>'status',
+ 'alias'=>'file',
'class'=>'tcenter',
- 'text'=>__('@navigation_links table heading status'),
+ 'text'=>__('@navigation_links table heading file'),
'default'=>true,
'edit'=>array(
- 'input_name'=>'sort_order',
- 'input_size'=>'2',
+ 'input_name'=>'file',
+ 'input_size'=>'64',
+ 'class'=>'tleft',
),
);
@@ -345,7 +369,9 @@
case 'update_cell':
try {
- $modele = array_keys(sqlnavigation_links::Specimen());
+ $modele = array();
+ foreach(sqlnavigation_links::Specimen(true) as $key=>$row)
+ $modele[] = $key;
$params = array();
$params['id'] = $_REQUEST['id'];
@@ -411,7 +437,7 @@
'file'=>tep_db_prepare_input($_POST['file']),
'css_id'=>tep_db_prepare_input($_POST['css_id']),
'sort_order'=>tep_db_prepare_input($_POST['sort_order']),
- 'restrict'=>tep_db_prepare_input($_POST['restrict']),
+ 'customers_status'=>tep_db_prepare_input($_POST['customers_status']),
);
foreach(tep_get_languages() as $row) {
@@ -424,27 +450,30 @@
break;
case 'update':
- $c_id =(int) tep_db_prepare_input($_GET['cID']);
-
- if ($c_id > 0){
+ if (self::$Id > 0){
$myarray = array(
- 'id'=>$c_id,
- 'new_parent_id'=>tep_db_prepare_input($_POST['parent_id']),
- 'new_type'=>tep_db_prepare_input($_POST['type']),
- 'file'=>tep_db_prepare_input($_POST['file']),
- 'css_id'=>tep_db_prepare_input($_POST['css_id']),
- 'sort_order'=>tep_db_prepare_input($_POST['sort_order']),
- 'restrict'=>tep_db_prepare_input($_POST['restrict']),
+ 'id'=>self::$Id ,
+ 'sqlarray'=>array(
+ 'parent_id'=>tep_db_prepare_input($_POST['parent_id']),
+ 'type'=>tep_db_prepare_input($_POST['type']),
+ 'file'=>tep_db_prepare_input($_POST['file']),
+ 'css_id'=>tep_db_prepare_input($_POST['css_id']),
+ 'sort_order'=>tep_db_prepare_input($_POST['sort_order']),
+ 'customers_status'=>tep_db_prepare_input($_POST['customers_status']),
+ )
);
- foreach(tep_get_languages() as $row) {
- $myarray['langue']['title'][$row['id']] = tep_db_prepare_input($_POST['title'][$row['id']]);
+ foreach($_POST[__CLASS__]['name'] as $key=>$row) {
+ $myarray['sqlarray']['langue']['name'][$key] = tep_db_prepare_input($row);
}
- sqlnavigation_links::update($myarray);
+ if( ! sqlnavigation_links::update($myarray) )
+ $messageStack->add_session(__('@sqlnavigation_links error in update process'), 'error');
+ else
+ $messageStack->add_session(__('@sqlnavigation_links success in update process'), 'success');
+
+ tep_redirect(tep_href_link(self::FILENAME, 'action=edit&cID=' . self::$Id ));
}
-
- tep_redirect(tep_href_link(self::FILENAME, 'action=edit&cID=' . $c_id ));
break;
case 'delete_confirm':
@@ -474,7 +503,7 @@
@return
*/
public static function GetDBValue(){
-
+ global $languages_id;
$DB= Database::getInstance();
switch (self::$action) {
@@ -483,7 +512,7 @@
case 'edit':
case 'new':
if( (int)self::$Id > 0) {
- $obj = sqlnavigation_links::fetch(array('id'=>self::$Id ), true);
+ $obj = sqlnavigation_links::fetch(array('id'=>self::$Id , 'language_id'=>$languages_id), true);
}
else{
$obj = sqlnavigation_links::Specimen(true);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-14 07:01:54
|
Revision: 4885
http://sourceforge.net/p/oscss/svn/4885
Author: oscim
Date: 2013-10-14 07:01:47 +0000 (Mon, 14 Oct 2013)
Log Message:
-----------
Next develop navigation_links
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlnavigation_links.php
trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab
trunk/catalog/install/includes/sql/mysql/tables/osc_navigation_links.sql
Added Paths:
-----------
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_navigation_links.sql
Modified: trunk/catalog/admin/includes/classes/drivers/sqlnavigation_links.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlnavigation_links.php 2013-10-12 15:28:57 UTC (rev 4884)
+++ trunk/catalog/admin/includes/classes/drivers/sqlnavigation_links.php 2013-10-14 07:01:47 UTC (rev 4885)
@@ -37,10 +37,11 @@
*/
public static function create($option){
self::getInstance();
+ $DB=Database::getInstance();
+ $error= 0;
+ $DB->beginTransaction();
-// if(!isset($option['name']))
-// return 'name';
-
+ $sql_data_array['nav_mode'] = (isset($option['mode'])) ? tep_db_prepare_input($option['mode']) :'2';
$sql_data_array['nav_link_type'] = (isset($option['type'])) ? tep_db_prepare_input($option['type']) :'0';
$sql_data_array['nav_link_status'] = (isset($option['status'])) ? tep_db_prepare_input($option['status']) :'0';
$sql_data_array['parent_id'] = (isset($option['parent_id'])) ? tep_db_prepare_input($option['parent_id']) :'0';
@@ -50,10 +51,18 @@
$sql_data_array['nav_file'] = (isset($option['file'])) ? tep_db_prepare_input($option['file']) :'';
- $res=tep_db_perform(TABLE_NAVIGATION_LINKS, $sql_data_array);
+ if( ($res=tep_db_perform(TABLE_NAVIGATION_LINKS, $sql_data_array) ) && !$res)
+ $error++;
$id = $res->__get('insertId');
+ $sql_data_array = array();
+ $sql_data_array['nav_cpath'] = self::GetcPath($id);
+
+ if( ! tep_db_perform(TABLE_NAVIGATION_LINKS, $sql_data_array, 'update' , " nav_link_id = '".$id."' " ) )
+ $error++;
+
+
foreach(tep_get_languages() as $lg) {
$row = $option['langue'];
@@ -64,13 +73,18 @@
'nav_name'=> ((isset($row['title'][$lg['id']])) ? tep_db_prepare_input($row['title'][$lg['id']]) : '' ),
);
- $res=tep_db_perform(TABLE_NAVIGATION_LINKS_DESCRIPTION, $sql_data_array_lg);
+ if( ! tep_db_perform(TABLE_NAVIGATION_LINKS_DESCRIPTION, $sql_data_array_lg) )
+ $error++;
}
- if(!$res)
- return $res;
- else
- return $res->$id;
+ if( $error > 0){
+ $DB->rollbackTransaction();
+ return false;
+ }
+ else{
+ $DB->commitTransaction();
+ return $res->$id;;
+ }
}
/**
@@ -90,27 +104,44 @@
if(isset($option['id'])) $where .="AND nav_link_id = '".(int)$option['id']."' ";
if(isset($option['type'])) $where .="AND nav_link_type = '".(int)$option['type']."' ";
if(isset($option['status'])) $where .="AND nav_link_status = '".(int)$option['status']."' ";
+ if(isset($option['mode'])) $where .="AND nav_mode = '".(int)$option['mode']."' ";
- if(isset($option['post'])){
+ if(isset($option['post']))
$post=$option['post'];
- }
- if(isset($post['type']))$sql_data_array['nav_link_type'] = tep_db_prepare_input($post['type']);
- if(isset($post['status']))$sql_data_array['nav_link_status'] = tep_db_prepare_input($post['status']);
- if(isset($post['parent_id'])) $sql_data_array['parent_id'] = (int)tep_db_prepare_input($post['parent_id']);
- if(isset($post['css_id'])) $sql_data_array['nav_css_id'] = (int)tep_db_prepare_input($post['css_id']);
- if(isset($post['customers_status'])) $sql_data_array['customers_status'] = (int)tep_db_prepare_input($post['customers_status']);
- if(isset($post['sort_order'])) $sql_data_array['nav_sort_order'] = (int)tep_db_prepare_input($post['sort_order']);
+ if(isset($option['sqlarray']))
+ $sqlarray=$option['sqlarray'];
+ if(isset($sqlarray['type']))$sql_data_array['nav_link_type'] = tep_db_prepare_input($sqlarray['type']);
+ if(isset($sqlarray['status']))$sql_data_array['nav_link_status'] = tep_db_prepare_input($sqlarray['status']);
+ if(isset($sqlarray['mode']))$sql_data_array['nav_mode'] = tep_db_prepare_input($sqlarray['mode']);
- if(count((array)$sql_data_array)> 0)
+ if(isset($sqlarray['parent_id'])) $sql_data_array['parent_id'] = (int)tep_db_prepare_input($sqlarray['parent_id']);
+ if(isset($sqlarray['css_id'])) $sql_data_array['nav_css_id'] = (int)tep_db_prepare_input($sqlarray['css_id']);
+ if(isset($sqlarray['customers_status'])) $sql_data_array['customers_status'] = (int)tep_db_prepare_input($sqlarray['customers_status']);
+ if(isset($sqlarray['sort_order'])) $sql_data_array['nav_sort_order'] = (int)tep_db_prepare_input($sqlarray['sort_order']);
+
+
+
+
+ if(count((array)$sql_data_array)> 0){
if( ! tep_db_perform(TABLE_NAVIGATION_LINKS, $sql_data_array, 'update' , substr($where,3) ) )
$error++;
+ $res = $DB->query("SELECT nav_link_id as id FROM " . TABLE_NAVIGATION_LINKS ." WHERE ". substr($where, 3 ).' LIMIT 1' );
+ $result = $res->fetchAssoc();
+
+ $sql_data_array = array();
+ $sql_data_array['nav_cpath'] = self::GetcPath($result['id']);
+
+ if( ! tep_db_perform(TABLE_NAVIGATION_LINKS, $sql_data_array, 'update' , " nav_link_id = '".$result['id']."' " ) )
+ $error++;
+ }
+
foreach(tep_get_languages() as $lg) {
- $row = $option['langue'];
+ $row = $sqlarray['langue'];
$where_lg .= $where. "AND language_id = '".(int)$lg['id']."' ";
$sql_data_array = array();
@@ -160,18 +191,28 @@
$DB=Database::getInstance();
$where ="";
+ $language_id = false;
if(isset($option['id'])) $where .="AND nav_link_id = '".(int)$option['id']."' ";
+ if(isset($option['mode'])) $where .="AND nav_mode = '".(int)$option['mode']."' ";
if(isset($option['type'])) $where .="AND nav_link_type = '".(int)$option['type']."' ";
if(isset($option['status'])) $where .="AND nav_link_status = '".(int)$option['status']."' ";
+ if(isset($option['parent_id'])) $where .="AND parent_id = '".(int)$option['parent_id']."' ";
-
if($where=='')
return false;
- $sql="SELECT * FROM " . TABLE_NAVIGATION_LINKS . " a ".
- " WHERE ".substr($where,3);
+ if(isset($option['language_id']))
+ $language_id = $option['language_id'];
+
+ $sql="SELECT * FROM " . TABLE_NAVIGATION_LINKS . " a ";
+
+ if($language_id)
+ $sql.=" LEFT JOIN " . TABLE_NAVIGATION_LINKS_DESCRIPTION . " ad ON(ad.nav_link_id = a.nav_link_id AND ad.language_id='" . $language_id . "') ";
+
+ $sql.=" WHERE ".substr($where,3);
+
$res=$DB->query($sql);
$num = $res->__get('numRows');
@@ -179,19 +220,18 @@
if($num == 1){
$result=$res->fetchAssoc();
+ if(!$language_id)
+ // call all langue for this post
+ foreach(tep_get_languages() as $lg){
+ $_query = $DB->query("select fd.nav_name as title from " . TABLE_NAVIGATION_LINKS_DESCRIPTION . " fd where fd.nav_link_id = '" . (int)$result['nav_link_id'] . "' AND language_id='" . $lg['id'] . "'");
+ $descr = $_query->fetchAssoc();
- // call all langue for this post
- foreach(tep_get_languages() as $lg){
+ $result['lg'][$lg['id']] = ((!$shortkey)? $descr : self::CleanKey($descr));
- $_query = $DB->query("select fd.nav_name as title from " . TABLE_NAVIGATION_LINKS_DESCRIPTION . " fd where fd.nav_link_id = '" . (int)$result['nav_link_id'] . "' AND language_id='" . $lg['id'] . "'");
- $descr = $_query->fetchAssoc();
+ tep_db_free_result($_query);
+ }
- $result['lg'][$lg['id']] = ((!$shortkey)? $descr : self::CleanKey($descr));
- tep_db_free_result($_query);
- }
-
-
return ((!$shortkey)? $result : self::CleanKey($result));
}
@@ -218,15 +258,15 @@
if(isset($option['id'])) $where .="AND nav_link_id = '".(int)$option['id']."' ";
if(isset($option['type'])) $where .="AND nav_link_type = '".(int)$option['type']."' ";
if(isset($option['status'])) $where .="AND nav_link_status = '".(int)$option['status']."' ";
+ if(isset($option['mode'])) $where .="AND nav_mode = '".(int)$option['mode']."' ";
-
if($where=='')
return false;
$res = $DB->query("SELECT nav_link_id as id FROM " . TABLE_NAVIGATION_LINKS ." WHERE ". substr($where, 3 ).' LIMIT 1' );
$result = $res->fetchAssoc();
-
+
// childs tables
$DB->query("delete from " . TABLE_NAVIGATION_LINKS_DESCRIPTION . " where nav_link_id = '" . (int)$result['id'] . "'");
@@ -244,6 +284,7 @@
public static function Specimen($shortkey=false){
$par = array(
'nav_link_id' => '',
+ 'nav_mode' => '2', // 1,2
'nav_sort_order' => '',
'nav_css_id' => '',
'nav_file' => '',
@@ -254,9 +295,7 @@
);
foreach(tep_get_languages() as $lg){
- $par['lg'][$lg['id']] = array(
- 'title'=>'',
- );
+ $par['name'][$lg['id']] ='';
}
return ((!$shortkey)? $par : self::CleanKey($par));
@@ -284,6 +323,28 @@
return $object;
}
+
+ /**
+ */
+ static function GetcPath($id, $array = array() ){
+
+ $DB=Database::getInstance();
+
+ $res = $DB->query("SELECT parent_id as id FROM " . TABLE_NAVIGATION_LINKS ." WHERE nav_link_id='".(int)$id."' LIMIT 1" );
+ $result = $res->fetchAssoc();
+
+
+
+ if($result['id'] == 0)
+ return implode(array_reverse($array), '_');
+ else{
+// if(!in_array($id, $array))
+// $array[] = $id;
+
+ $array[] = $result['id'];
+ return self::GetcPath($result['id'], $array );
+ }
+ }
}
Modified: trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab 2013-10-12 15:28:57 UTC (rev 4884)
+++ trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab 2013-10-14 07:01:47 UTC (rev 4885)
@@ -33,9 +33,9 @@
<div class="edit box_left w_70" >
<div id="tabs-1" class="tabPage">
- <?php echo cms_content::DisplayField('title', '%s'); ?>
+ <?php echo cms_content::DisplayField('title'); ?>
- <?php echo cms_content::DisplayField('text', '%s'); ?>
+ <?php echo cms_content::DisplayField('text'); ?>
</div>
<?php
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_navigation_links.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_navigation_links.sql 2013-10-12 15:28:57 UTC (rev 4884)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_navigation_links.sql 2013-10-14 07:01:47 UTC (rev 4885)
@@ -15,14 +15,16 @@
drop table if exists osc_navigation_links;
create table osc_navigation_links (
- nav_link_id int(11) NOT NULL auto_increment,
- nav_sort_order int(11) NOT NULL default '1',
+ nav_link_id int(11) NOT NULL AUTO_INCREMENT,
+ nav_mode int(1) NOT NULL DEFAULT '2',
+ nav_sort_order int(11) NOT NULL DEFAULT '1',
nav_css_id varchar(50) NOT NULL,
nav_file varchar(200) NOT NULL,
- nav_link_type int(1) NOT NULL default '0',
- customers_status int(1) NOT NULL default '1',
- nav_link_status int(1) NOT NULL default '1',
- parent_id int(3) NOT NULL default '0',
+ nav_link_type int(1) NOT NULL DEFAULT '0',
+ customers_status int(1) NOT NULL DEFAULT '1',
+ nav_link_status int(1) NOT NULL DEFAULT '1',
+ parent_id int(3) NOT NULL DEFAULT '0',
+ nav_cpath varchar(20) NOT NULL,
PRIMARY KEY (nav_link_id)
) DEFAULT CHARSET=utf8;
Added: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_navigation_links.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_navigation_links.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.1rc_2.1.2/tables/osc_navigation_links.sql 2013-10-14 07:01:47 UTC (rev 4885)
@@ -0,0 +1,15 @@
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2012 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
+
+ALTER TABLE osc_navigation_links ADD nav_mode int(1) NOT NULL DEFAULT '2' NULL AFTER nav_link_id ;
+ALTER TABLE osc_navigation_links ADD nav_cpath varchar(20) NOT NULL;
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-12 15:29:01
|
Revision: 4884
http://sourceforge.net/p/oscss/svn/4884
Author: oscim
Date: 2013-10-12 15:28:57 +0000 (Sat, 12 Oct 2013)
Log Message:
-----------
Clean code
Develop navigation_link tools
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/categorieUtility.php
trunk/catalog/admin/includes/gabarit/navigation_links/display_view.edit.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/navigation_links.txt
trunk/catalog/admin/includes/modules/pages/navigation_links.php
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/navigation_links/filter.clause.gab
Modified: trunk/catalog/admin/includes/classes/categorieUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/categorieUtility.php 2013-10-12 06:39:19 UTC (rev 4883)
+++ trunk/catalog/admin/includes/classes/categorieUtility.php 2013-10-12 15:28:57 UTC (rev 4884)
@@ -3,8 +3,8 @@
@licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 30/03/2012, 09:32
+ @version 2.1.2
+ @date 11/10/2013, 09:32
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class categorieUtility
@@ -23,17 +23,17 @@
$incre bool/int false par defaut, entier du niveau de la branche si appel recursif ,
$datatype string force datatype ,
)
- @return
+ @return
array (
- categories_id,
- categories_name,
- categories_image,
- parent_id,
- sort_order,
- date_added,
+ categories_id,
+ categories_name,
+ categories_image,
+ parent_id,
+ sort_order,
+ date_added,
last_modified,
categories_status,
- categories_hidden,
+ categories_hidden,
)
*/
public static function get_cat_list($option){
@@ -99,7 +99,7 @@
*/
public static function get_generated_category_path_ids($id, $from = 'category') {
$calculated_category_path_string = '';
- $calculated_category_path = tep_generate_category_path($id, $from);
+ $calculated_category_path = self::generate_category_path($id, $from);
$carr=$calculated_category_path[0];
@@ -117,10 +117,9 @@
/**
- @brief construct array categorie name for select menu
- @param $opt array for put params
+ @brief construct array categorie name for select menu
+ @param $opt array for put params
*/
-// public static function get_category_tree($parent_id = '0', $spacing = '', $exclude = '', $category_tree_array = '', $include_itself = false) {
public static function get_category_tree($opt) {
global $languages_id;
@@ -141,7 +140,7 @@
if(isset($opt['language_id'])){
$lg = $param['language_id'] = $opt['language_id'];
}
- else
+ else
$lg = $languages_id;
@@ -152,13 +151,6 @@
else
$res = $all;
-
-
-// if ($include_itself) {
-// $category_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " cd where cd.language_id = '" . (int)$languages_id . "' and cd.categories_id = '" . (int)$parent_id . "'");
-// $category = tep_db_fetch_array($category_query);
-// $category_tree_array[] = array('id' => $parent_id, 'text' => $category['categories_name']);
-// }
if(is_array($res))
foreach($res as $row){
if (! in_array($row->id, $exclude )){
@@ -221,26 +213,29 @@
if (!is_array($categories_array)) $categories_array = array();
+ /**
+ TODO Upgarde for use Datatype exts
+ */
if ($from == 'product') {
$categories_query = tep_db_query("select categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$id . "'");
while ($categories = tep_db_fetch_array($categories_query)) {
- if ($categories['categories_id'] == '0') {
- $categories_array[$index][] = array('id' => '0', 'text' => TEXT_TOP);
- } else {
- $category_query = tep_db_query("select cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$categories['categories_id'] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
- $category = tep_db_fetch_array($category_query);
- $categories_array[$index][] = array('id' => $categories['categories_id'], 'text' => $category['categories_name']);
- if ( (tep_not_null($category['parent_id'])) && ($category['parent_id'] != '0') ) $categories_array = tep_generate_category_path($category['parent_id'], 'category', $categories_array, $index);
- $categories_array[$index] = array_reverse($categories_array[$index]);
- }
- $index++;
+ if ($categories['categories_id'] == '0') {
+ $categories_array[$index][] = array('id' => '0', 'text' => TEXT_TOP);
+ } else {
+ $category_query = tep_db_query("select cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$categories['categories_id'] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
+ $category = tep_db_fetch_array($category_query);
+ $categories_array[$index][] = array('id' => $categories['categories_id'], 'text' => $category['categories_name']);
+ if ( (tep_not_null($category['parent_id'])) && ($category['parent_id'] != '0') ) $categories_array = self::generate_category_path($category['parent_id'], 'category', $categories_array, $index);
+ $categories_array[$index] = array_reverse($categories_array[$index]);
+ }
+ $index++;
}
} elseif ($from == 'category') {
$category_query = tep_db_query("select cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
$category = tep_db_fetch_array($category_query);
$categories_array[$index][] = array('id' => $id, 'text' => $category['categories_name']);
if ( (tep_not_null($category['parent_id'])) && ($category['parent_id'] != '0') )
- $categories_array = tep_generate_category_path($category['parent_id'], 'category', $categories_array, $index);
+ $categories_array = self::generate_category_path($category['parent_id'], 'category', $categories_array, $index);
}
return $categories_array;
Modified: trunk/catalog/admin/includes/gabarit/navigation_links/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/navigation_links/display_view.edit.gab 2013-10-12 06:39:19 UTC (rev 4883)
+++ trunk/catalog/admin/includes/gabarit/navigation_links/display_view.edit.gab 2013-10-12 15:28:57 UTC (rev 4884)
@@ -26,65 +26,44 @@
<div id="tabs-1" class="tabPage">
- <div class="tabs_lang">
- <ul>
- <?php foreach(tep_get_languages() as $lg): ?>
- <li>
- <a href="#fieldset_<?php echo $lg['id'] ?>">
- <?php echo tep_language_image($lg['directory'] . '/images/' .$lg['image'], $lg['name']); ?>
- </a>
- </li>
- <?php endforeach; ?>
- </ul>
- <?php foreach(tep_get_languages() as $lg): ?>
- <fieldset id="fieldset_<?php echo $lg['id'] ?>" class="block_field">
- <p class="block_input">
- <label for="<?php echo 'title' . $lg['id']; ?>"><?php echo __('@navigation_links entry title'); ?></label>
- <?php echo tep_draw_input_field('title[' . $lg['id'] . ']', 'title_' . $lg['id'], @navigation_links::$Info->lg[ $lg['id']]->title, 'size="70"', true) ; ?>
- </p>
- </fieldset>
- <?php endforeach; ?>
- </div>
- <p class="block_input">
- <label for="products_virtual_type_id"><?php echo __('@navigation_links text type'); ?></label>
- <?php //echo tep_draw_pull_down_menu('type', tep_get_status_array('navigation_links',0,'status_name'), navigation_links::$Info->type); ?>
+ <?php echo navigation_links::DisplayField('name'); ?>
-<?php echo navigation_links::DisplayField('type', '%s'); ?>
- </p>
+ <?php echo navigation_links::DisplayField('type'); ?>
+
+
<p class="block_input">
<Label><?php echo __('@navigation_links text info parent') ?></label>
<?php echo tep_draw_pull_down_menu('parent_id', array_merge(array(array('id'=>0, 'text'=> '')),navigation_links::parent_item_nav()), navigation_links::$Info->parent_id); ?>
</p>
+ <?php echo navigation_links::DisplayField('parent_id', '%s'); ?>
+
+
<p class="block_input">
<Label><?php echo __('@navigation_links text info file') ?></label>
<?php echo tep_draw_input_field('file', '', navigation_links::$Info->file) ?>
</p>
+ <?php echo navigation_links::DisplayField('file', '%s'); ?>
+
</div>
<div id="tabs-2" class="tabPage">
- <p class="block_input">
- <label for="type"><?php echo __('@navigation_links text restrict'); ?></label>
- <?php echo tep_draw_pull_down_menu('restrict', tep_get_status_array('customers_restrict_access',0,'status_name'), navigation_links::$Info->customers_status); ?>
- </p>
+ <?php echo navigation_links::DisplayField('customers_status'); ?>
- <p class="block_input">
- <Label for="sort_order"><?php echo __('@navigation_links text info sort order') ?></label>
- <?php echo tep_draw_input_field('sort_order', '', navigation_links::$Info->sort_order) ?>
- </p>
- <p class="block_input">
- <Label><?php echo __('@navigation_links text info css id') ?></label>
- <?php echo tep_draw_input_field('css_id', '', navigation_links::$Info->css_id) ?>
- </p>
+ <?php echo navigation_links::DisplayField('sort_order'); ?>
+
+ <?php echo navigation_links::DisplayField('css_id'); ?>
+
+
</div>
Added: trunk/catalog/admin/includes/gabarit/navigation_links/filter.clause.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/navigation_links/filter.clause.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/navigation_links/filter.clause.gab 2013-10-12 15:28:57 UTC (rev 4884)
@@ -0,0 +1,29 @@
+<?php
+/**
+ @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.2
+ @date 11/10/2013 ,22:50:08
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+global $languages_id;
+?>
+<fieldset>
+ <legend><?php echo __('@navigation_links filter legend choose display menu'); ?></legend>
+ <ul class="inline">
+ <?php foreach(sqlnavigation_links::fetch(array('parent_id'=>0, 'language_id'=>$languages_id), true) as $row): ?>
+
+ <?php $active = ((bool)(count($_SESSION['filters']['menus']) <=0 || (isset($_SESSION['filters']['menus'][$row->id]) && (string)$_SESSION['filters']['menus'][$row->id] == 'on' ))? 'select' : '' ) ; ?>
+
+ <li class="<?php echo $active ?>">
+ <?php echo tep_draw_checkbox_field('filters[menus]['.$row->id.']', 'filters[menus]['.$row->id.']', 'on', (bool)(strlen($active)>0) ); ?>
+ <?php echo$row->name ?>
+ </li>
+
+ <?php endforeach; ?>
+ </ul>
+</fieldset>
+
+
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/navigation_links.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/navigation_links.txt 2013-10-12 06:39:19 UTC (rev 4883)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/navigation_links.txt 2013-10-12 15:28:57 UTC (rev 4884)
@@ -10,20 +10,28 @@
@class navigation_links
*/
+/* Page */
+ $lang['@navigation_links filter menu'] = "Menus";
+ $lang['@navigation_links filter legend choose display menu'] = "Restreindre l'affichage par menu";
/* Listing */
- $lang['heading title navigation_links'] = "Gestionnaire du menu de navigation";
- $lang['@navigation_links image add'] = "Ajouter un liens";
+ $lang['heading title navigation_links'] = "Gestion des menus public";
- $lang['@tasks table heading title'] = "Titre";
- $lang['@tasks table heading type'] = "Type Id";
- $lang['@tasks table heading type name'] = "Type";
- $lang['@tasks table heading customers_status'] = "Conditions";
- $lang['@tasks table heading status'] = "Etat";
- $lang['@tasks table heading parent_id'] = "Parent id";
- $lang['@tasks table heading parent name'] = "Parent";
- $lang['table heading action'] = "Action";
+ $lang['@navigation_links image add'] = "Ajout d'un menu";
+ $lang['@navigation_links image add item'] = "Ajout d'une entrée à un menu";
+ $lang['@navigation_links table heading id'] = "Id";
+ $lang['@navigation_links table heading sort order'] = "Tri";
+ $lang['@navigation_links table heading action'] = "Action";
+ $lang['@navigation_links table heading title'] = "Nom / Titre";
+ $lang['@navigation_links table heading type'] = "Type Id";
+ $lang['@navigation_links table heading type name'] = "Type";
+ $lang['@navigation_links table heading action'] = "Action";
+ $lang['@navigation_links table heading customers_status'] = "Restriction";
+ $lang['@navigation_links table heading parent_id'] = "Parent id";
+ $lang['@navigation_links table heading parent name'] = "Parent";
+ $lang['@navigation_links table heading status'] = "Etat";
+
/* Edit */
$lang['@navigation_links heading title edit'] = "Edition d'un lien";
$lang['@navigation_links tab specification'] = "Caractéristiques";
@@ -37,10 +45,11 @@
$lang['@navigation_links text info css id'] = "id CSS";
$lang['@navigation_links text info parent'] = "Parent";
+
/* Delete */
$lang['@navigation_links heading title delete'] = "Suppresion d'un lien";
-?>
+?>
Modified: trunk/catalog/admin/includes/modules/pages/navigation_links.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/navigation_links.php 2013-10-12 06:39:19 UTC (rev 4883)
+++ trunk/catalog/admin/includes/modules/pages/navigation_links.php 2013-10-12 15:28:57 UTC (rev 4884)
@@ -88,18 +88,7 @@
}
- /**
- @remarks define var execution sql in GetDBValue()
- */
- self::$InitInfo['adjust']=array(
- 'languages_id'=>$languages_id,
- 'page'=>1,
- 'rowbyp'=>10,
- 'sOrder'=>'',
- 'sWhere'=>'',
- );
-
MGabCont::SetCurrentName(__CLASS__);
self::$allfields = array();
@@ -111,40 +100,51 @@
self::$allfields['c.nav_link_id'] = array(
'sort'=>true,
'alias'=>'id',
- 'text'=>__('@tasks table heading id'),
+ 'text'=>__('@navigation_links table heading id'),
'width'=>'6%',
'default'=>true,
'class'=>'tcenter',
);
self::$allfields['cd.nav_name'] = array(
'sort'=>true,
- 'alias'=>'title',
- 'text'=>__('@tasks table heading title'),
+ 'alias'=>'name',
+ 'text'=>__('@navigation_links table heading title'),
'default'=>true,
'width'=>'35%',
+ 'edit'=>array(
+ 'input_name'=>'nav_name',
+ 'input_size'=>'64',
+ 'required_status'=>true,
+ 'active_value_language'=>true,
+ ),
);
/* Db Type */
self::$allfields['c.nav_link_type'] = array(
'sort'=>true,
'alias'=>'type',
- 'text'=>__('@tasks table heading type'),
+ 'text'=>__('@navigation_links table heading type'),
'width'=>'6%',
+ 'class'=>'tcenter',
'edit'=>array(
'input_name'=>'nav_link_type',
'input_type'=>'select',
+ 'input_size'=>'1',
+ 'required_status'=>true,
'select_values'=>tep_get_status_array('navigation_links',0,'status_name'),
),
);
self::$allfields['s.status_name'] = array(
'sort'=>true,
'alias'=>'type_name',
- 'text'=>__('@tasks table heading type name'),
+ 'text'=>__('@navigation_links table heading type name'),
'default'=>true,
'width'=>'8%',
'edit'=>array(
'input_name'=>'nav_link_type',
'input_type'=>'select',
+ 'input_size'=>'1',
+ 'required_status'=>true,
'select_values'=>tep_get_status_array('navigation_links',0,'status_name'),
),
);
@@ -153,11 +153,14 @@
self::$allfields['c.customers_status'] = array(
'sort'=>true,
'alias'=>'customers_status',
- 'text'=>__('@tasks table heading customers_status'),
+ 'text'=>__('@navigation_links table heading customers_status'),
'default'=>true,
+ 'class'=>'tcenter',
'edit'=>array(
'input_name'=>'customers_status',
'input_type'=>'select',
+ 'input_size'=>'1',
+ 'required_status'=>true,
'select_values'=>tep_get_status_array('customers_restrict_access',0,'status_name'),
),
@@ -166,8 +169,9 @@
self::$allfields['c.nav_sort_order'] = array(
'sort'=>true,
'alias'=>'sort_order',
- 'text'=>__('@tasks table heading sort order'),
+ 'text'=>__('@navigation_links table heading sort order'),
'default'=>true,
+ 'class'=>'tcenter',
'edit'=>array(
'input_name'=>'sort_order',
'input_size'=>'2',
@@ -178,13 +182,14 @@
self::$allfields['c.parent_id'] = array(
'sort'=>true,
'alias'=>'parent_id',
- 'text'=>__('@tasks table heading parent_id'),
+ 'class'=>'tcenter',
+ 'text'=>__('@navigation_links table heading parent_id'),
);
self::$allfields['cd2.nav_name'] = array(
'sort'=>true,
'alias'=>'parent_name',
- 'text'=>__('@tasks table heading parent name'),
+ 'text'=>__('@navigation_links table heading parent name'),
'default'=>true,
);
/* Db parent */
@@ -192,27 +197,28 @@
self::$allfields['c.nav_link_status'] = array(
'sort'=>true,
'alias'=>'status',
- 'text'=>__('@tasks table heading status'),
+ 'class'=>'tcenter',
+ 'text'=>__('@navigation_links table heading status'),
'default'=>true,
+ 'edit'=>array(
+ 'input_name'=>'sort_order',
+ 'input_size'=>'2',
+ ),
+ );
+ self::$allfields['c.nav_link_status'] = array(
+ 'sort'=>true,
+ 'alias'=>'status',
+ 'class'=>'tcenter',
+ 'text'=>__('@navigation_links table heading status'),
+ 'default'=>true,
+ 'edit'=>array(
+ 'input_name'=>'sort_order',
+ 'input_size'=>'2',
+ ),
);
- /**
- @remarks Construct all list , fields , th/td
- */
-// self::$InitInfo['theader']['listing']=array(
-// // array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
-// // array('width'=>'2%', 'class'=>'tcenter', 'txt'=>' ' ),
-// );
-// self::$InitInfo['tfooter']['listing']=self::$InitInfo['theader']['listing'];
-//
-// self::$InitInfo['modele']['listing']=array(
-// // 0=>false,
-// // 1=>false,
-// );
-
-
/// @remarks min fields and not view directly colonne fields
$listfield = ' c.nav_link_id as id,';
@@ -240,99 +246,14 @@
]
*/
$tab = array();
+ $tab['mod'][] = array(
+ 'title'=>__('@navigation_links filter menu'),
+ 'content'=>tep_get_include_contents(__CLASS__.'/filter.clause'),
+ );
- // min fields and not view directly colonne fields
-// $listfield = " c.nav_link_id as id, ";
-// $_SESSION['filters']['allfields'] = array();
-// // put in
-// if(isset($_SESSION['filters'][__CLASS__]['allfields']))
-// $_SESSION['filters']['allfields'] = $_SESSION['filters'][__CLASS__]['allfields'];
-// else
-// $_SESSION['filters']['allfields'] = array();
-//
-// $in_session = $_SESSION['filters']['allfields'];
-// // check and appli
-// foreach(self::$allfields as $key=>$row){
-// $clean = substr($key, (strpos($key, '.')+1));
-//
-// if(is_array($row)){
-// $txt = $row['text'];
-// $alias = (isset($row['alias'])? $row['alias'] : $clean);
-// $css = (isset($row['class'])? $row['class'] : 'tcenter');
-// $width = (isset($row['width'])? $row['width'] : '5%');
-// }
-// else{
-// $txt = $row;
-// $alias = $clean;
-// $css = 'tcenter';
-// $width = '5%';
-// }
-//
-// if(
-// ( isset($in_session[$clean]) && (string)$in_session[$clean] == 'on' )
-// || ( count($in_session) <=1 && ( is_array($row) && isset($row['default']) && $row['default'] == true) )
-// ) {
-// $_SESSION['filters']['allfields'][$clean] = 'on';
-// /**
-// @remarks this define col theader title, and ajust html code
-// */
-// self::$InitInfo['theader']['listing'][]= array( 'width'=>$width, 'class'=>$css, 'txt'=>$txt);
-// self::$InitInfo['tfooter']['listing'][]= array( 'width'=>$width, 'class'=>$css, 'txt'=>$txt );
-// /**
-// @remarks this define col in table, and if is possible sort
-// */
-// self::$InitInfo['modele']['listing'][$alias]=true;
-//
-//
-// if($clean !=$alias)
-// $listfield .=$key.' as '.$alias.',';
-// else
-// $listfield .=$key.',';
-// }
-// }
-//
-//
-// self::$InitInfo['modele']['listing']['action']=false;
-// self::$InitInfo['theader']['listing']['action']= array( 'class'=>'row_action', 'txt'=>__('table heading action') );
-// self::$InitInfo['tfooter']['listing']['action']= array( 'class'=>'row_action', 'txt'=>__('table heading action') );
-//
-// self::$InitInfo['allfields']['listing'] = self::$allfields ;
-
/**
- @remarks Active forms filter
- */
-// self::$InitInfo['tfilter']['listing']=array(
-// array(
-// 'type'=>'listfield'
-// ),
-// );
-
- /**
- @remarks Put detail for listing methode
- */
-// self::$InitInfo['adjust']['listfields'] = substr($listfield, 0,-1);
-
-
- /**
@remarks this define menu master module in page
- */
-// if(self::$action =='listing'){
-// $i = 0;
-// self::$InitInfo['MenuModule'][$i]=array(
-// 'type'=>'getLink',
-// 'format'=>'button_nav',
-// 'image'=>'',
-// 'cssclass'=>'',
-// 'title'=>__('@navigation_links image add'),
-// 'url'=>tep_href_link(self::FILENAME, 'action=new'),
-// );
-//
-// }
-
-
- /**
- @remarks this define menu master module in page
@note use $boutons[action][] = array(params)
params :
@@ -353,6 +274,23 @@
'url'=>tep_href_link(self::FILENAME, 'action=new'),
);
+ $boutons['listing'][]=array(
+ 'type'=>'getLink',
+ 'format'=>'button_nav',
+ 'image'=>'',
+ 'cssclass'=>'',
+ 'title'=>__('@navigation_links image add item'),
+ 'url'=>tep_href_link(self::FILENAME, 'action=newitem'),
+ );
+
+
+
+ if(isset($_SESSION['filters'][__CLASS__]['menus'])){
+ $_SESSION['filters']['menus'] = $_SESSION['filters'][__CLASS__]['menus'];
+
+ self::$InitInfo['adjust']['sWhere'] .=" AND parent_id IN (".implode(array_keys($_SESSION['filters']['menus']),',').") ";
+ }
+
/**
Call Base Init and construct $InitInfo for process Filter
$listfield string list row in db
@@ -383,16 +321,17 @@
@remarks specific save in session value filters
*/
case 'filters':
-// $_SESSION['filters'] =array();
-//
-// foreach($_POST['filters']['listfield'] as $key=>$row){
-// if( $row =='on' )
-// $_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
-// }
/*
Call Prev Process
*/
self::actionFilter();
+
+ unset($_SESSION['filters'][self::$code]['menus']);
+ foreach($_POST['filters']['menus'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][self::$code]['menus'][$key] = 'on';
+ }
+
tep_redirect(tep_href_link(self::FILENAME));
break;
@@ -544,16 +483,21 @@
case 'edit':
case 'new':
if( (int)self::$Id > 0) {
- self::$Info = sqlnavigation_links::fetch(array('id'=>self::$Id ), true);
+ $obj = sqlnavigation_links::fetch(array('id'=>self::$Id ), true);
}
else{
- self::$Info = sqlnavigation_links::Specimen(true);
+ $obj = sqlnavigation_links::Specimen(true);
}
+
+ $obj = self::FormatDBValue($obj);
+
+ return self::$Info= $obj;
break;
case 'listing':
default:
+ self::GetConf();
/**
@remarks retrun object load one inventaire
*/
@@ -585,7 +529,8 @@
" LEFT JOIN ".TABLE_NAVIGATION_LINKS_DESCRIPTION." cd ON( cd.nav_link_id = c.nav_link_id AND cd.language_id ='".$adjust->languages_id."' ) ".
" LEFT JOIN ".TABLE_NAVIGATION_LINKS_DESCRIPTION." cd2 ON( cd2.nav_link_id = c.parent_id AND cd.language_id ='".$adjust->languages_id."' ) ".
" LEFT JOIN ".TABLE_STATUS." s ON( s.status_id = c.nav_link_type AND s.status_type = 'navigation_links' AND s.language_id ='".$adjust->languages_id."' ) ".
- ((!empty($adjust->sWhere)) ? " WHERE ".substr($adjust->sWhere, 3) : '').
+ " WHERE nav_mode = 2 ".
+ ((!empty($adjust->sWhere)) ? /*substr(*/$adjust->sWhere/*, 3)*/ : '').
" GROUP BY c.nav_link_id ".
" ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' parent_id ASC ');
@@ -620,15 +565,15 @@
@remarks Normal View Page
*/
case 'new':
- self::load_db_values(0);
+ self::$Info = self::GetDBValue();
return MGabCont::CallGab('edit',__FUNCTION__,__CLASS__);
break;
case 'edit':
- self::load_db_values(self::$Id);
+ self::$Info = self::GetDBValue();
return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
break;
case 'delete':
- self::load_db_values(self::$Id);
+ self::$Info = self::GetDBValue();
return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__);
break;
case 'listing':
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-12 06:39:22
|
Revision: 4883
http://sourceforge.net/p/oscss/svn/4883
Author: oscim
Date: 2013-10-12 06:39:19 +0000 (Sat, 12 Oct 2013)
Log Message:
-----------
Fix css , less, and gabarit html upgraded by new code or normalise code
Fix bug
Add file for language
Modified Paths:
--------------
trunk/catalog/includes/classes/page.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.less
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/article-product.less
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/element.less
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/generic.less
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/login.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/gabarit/box.search_suggest.gab
trunk/catalog/login.php
trunk/catalog/templates/defaut/includes/boxes/recently_viewed_content.php
trunk/catalog/templates/defaut/includes/content/login.php
trunk/catalog/templates/defaut/includes/content/logoff.php
Added Paths:
-----------
trunk/catalog/includes/languages/fr_FR/boxes/recently_viewed_content.txt
Removed Paths:
-------------
trunk/catalog/templates/defaut/includes/gabarit/box.recently_viewed.gab
trunk/catalog/templates/defaut/includes/gabarit/box.recently_viewed_content.gab
Modified: trunk/catalog/includes/classes/page.php
===================================================================
--- trunk/catalog/includes/classes/page.php 2013-10-12 05:41:26 UTC (rev 4882)
+++ trunk/catalog/includes/classes/page.php 2013-10-12 06:39:19 UTC (rev 4883)
@@ -506,16 +506,6 @@
$res=$aca->check_action('',@$_GET['action']);
- /// add category names to the breadcrumb trail
-/// TODO A deporter dans le datatype mode transversal
-// if (isset($this->page['var']['cPath_array'])) {
-// for ($i=0, $n=sizeof($this->page['var']['cPath_array']); $i<$n; $i++) {
-// if( ($categories=categorie::get_item((int)$this->page['var']['cPath_array'][$i])) !=false)
-// $this->breadcrumb->add($categories->categories_name, tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($this->page['var']['cPath_array'], 0, ($i+1)))));
-// else break;
-// }
-// }
-
}
@@ -557,17 +547,24 @@
$this->page['plugins']['present']=$this->oscss_plugins->plugins_active('generic');
$this->page['plugins']['type']=$this->oscss_plugins->plugins_active($this->the_type());
- //! fil rouge
+ /// @remarks breadcumb
if($bread) {
if(($this->page['type']=='account')&& $this->page['script'] !=FILENAME_ACCOUNT ) $this->breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));
if (!in_array($this->page['script'],$this->file_not_breadcrumb)) {
$mode=(in_array($this->page['script'],$this->file_registered))? 'SSL': 'NONSSL';
- $this->title=(defined('NAVBAR_TITLE')) ? NAVBAR_TITLE: ((defined('NAVBAR_TITLE_2')) ? NAVBAR_TITLE_2 : NAVBAR_TITLE_1 );
- $this->breadcrumb->add($this->title, tep_href_link($this->page['script'], '',$mode));
+
+ if(defined('NAVBAR_TITLE')&& tep_not_null(NAVBAR_TITLE))
+ $this->title= NAVBAR_TITLE;
+ elseif(defined('NAVBAR_TITLE_2')&& tep_not_null(NAVBAR_TITLE_2))
+ $this->title= NAVBAR_TITLE_2;
+ elseif(defined('NAVBAR_TITLE_1') && tep_not_null(NAVBAR_TITLE_1))
+ $this->title= NAVBAR_TITLE_1;
+
+ if(tep_not_null($this->title))
+ $this->breadcrumb->add($this->title, tep_href_link($this->page['script'], '',$mode));
}
}
-
//! Class permanente
$this->new_class('oscss_modules');
$this->new_class('oscss_boxes');
Added: trunk/catalog/includes/languages/fr_FR/boxes/recently_viewed_content.txt
===================================================================
--- trunk/catalog/includes/languages/fr_FR/boxes/recently_viewed_content.txt (rev 0)
+++ trunk/catalog/includes/languages/fr_FR/boxes/recently_viewed_content.txt 2013-10-12 06:39:19 UTC (rev 4883)
@@ -0,0 +1,11 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.2
+ @date 11/10/2013, 17:52
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+$lang['box heading viewed content']="Derniers articles vus" ;
+?>
\ No newline at end of file
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.less
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.less 2013-10-12 05:41:26 UTC (rev 4882)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.less 2013-10-12 06:39:19 UTC (rev 4883)
@@ -12,39 +12,39 @@
nav{
position: absolute;
width: inherit;
-
+
background: #000;
.border-radius(5px,5px,5px,5px);
-
+
ul {
margin: 0 auto;
width: inherit;
-
+
list-style: none;
-
-
+
+
li {
float: left;
-
+
a {
// font:20px "SourceSansPro",Arial;
display: inline-block;
margin-right: 20px;
padding: 0 10px;
line-height: 44px;
-
+
// font-size: 16px;
font-weight: normal;
line-height: 44px;
text-align: center;
text-decoration: none;
color: #b4e3ec;
-
+
&:hover{
color: #fff;
}
}
-
+
&.selected a{
color: #fff;
}
@@ -58,13 +58,13 @@
header#top{
height:105px;
-
-
+
+
div#logo {
width:250px;
float:left;
-
+
p,
h1 {
padding: 20px 0;
@@ -72,7 +72,7 @@
font-size: 28px;
}
}
-
+
div#top_bar {
float:left;
position:relative;
@@ -80,22 +80,22 @@
width: 450px;
padding:0;
height:45px;
-
+
background: black;
.border-radius(0,5px,5px,0);
-
+
div{
float:left;
-
+
.boxe{
header{display:none;}
margin:0.5em 0.5em;
}
-
+
&.languages,
&#currenciesBox {
padding-top:0.4em;
-
+
a{
padding:0 0.15em;
border:1px solid transparent;
@@ -104,26 +104,26 @@
img{
padding-top:0.15em;
}
-
+
&:hover{
text-decoration:none;
- background: @bg_input_hover ;
+ background: @bg_input_hover ;
border:1px solid @bg_input_border_hover;
.border-radius(5px,5px,5px,5px);
}
-
+
&.Selected{
color:@bg_input_hover;
cursor: default;
-
+
&:hover{
- background: transparent ;
+ background: transparent ;
border:1px solid transparent;
}
}
}
}
-
+
&.search_suggest div#search_suggest{
position:absolute;
z-index:99999;
@@ -133,29 +133,29 @@
background:#DDEEEE;
border:1px solid white;
.border-radius(5px,5px,5px,5px);
-
+
a{
color:black;
font-size:0.8em;
}
-
+
ul{
width:250px;
// padding:0.5em;
list-style:circle;
-
-
+
+
li{
// padding:
}
-
+
.smenufull_arbas,
.smenufull_arhaut{
display:none;
}
}
}
-
+
}
}
}
@@ -168,8 +168,8 @@
/*
- * Slider Home page
- */
+ * Slider Home page
+ */
@@ -179,23 +179,23 @@
background: #778899 url("../images/introbkg.png") repeat-x;
.background-size(100%);
.border-radius(5px,5px,5px,5px);
-
+
section{
width:100%;
}
-
+
ul li {
width:960px;
height:220px;
margin:0;
padding:0;
-
+
.one.product section.outerblock {
height:inherit;
width:inherit;
}
}
-
+
h1,
h2,
p {
@@ -204,32 +204,48 @@
width: 800px;
padding: 0 0 20px 0;
}
-
+
h1,
h2 {
font-weight: normal;
color: #333;
}
-
+
p {
color: #5D4A3D;
}
-
+
.intro.content{
padding: 0;
height:220px;
.border-radius(5px,5px,5px,5px);
-
+
div{
- font-size: 0.9em;
- font-weight:bold;
+ font-size: 0.9em;
+ font-weight:bold;
width:936px;
- margin:0;
+ margin:0;
padding:0;
-
+
+
+ .innerblock{
+
+ p{
+ &.title{
+ text-align:left;
+ }
+
+ &.img{
+ width:20%;
+ text-align:center;
+ float:right;
+ }
+ }
+
+ }
}
}
-
+
ol#controls {
float: right;
height: 28px;
@@ -238,7 +254,7 @@
right: 0;
text-align: right;
top: -30px;
-
+
li {
float: left;
height: 28px;
@@ -247,7 +263,7 @@
margin: 0 10px 0 0;
padding: 0;
-
+
a {
height: 28px;
line-height: 28px;
@@ -255,28 +271,28 @@
text-decoration: none;
border:1px solid white;
.border-radius(5px,5px,5px,5px);
-
+
:focus{
}
}
-
+
&.current a{
background: none repeat scroll 0 0 #0FA4C5;
color: #FFFFFF;
text-decoration: underline;
-
+
&:hover {
background: none repeat scroll 0 0 #11BCE1;
}
}
}
-
+
}
}
/*
- * BreadCrumb
+ * BreadCrumb
*/
nl#breadcrumbs {
margin-top: 5px;
@@ -288,14 +304,14 @@
position: relative;
top: 22px;
width: inherit;
-
- a {
- text-decoration:none;
+
+ a {
+ text-decoration:none;
padding:1em 0.3em;
font-size:1em;
- font-weight:
- bold;color: #777;
-
+ font-weight:
+ bold;color: #777;
+
&:hover{
color:black;
}
@@ -315,63 +331,64 @@
padding:1.5em;
position: relative;
top: 12px;
-
+
background: #778899 url("../images/footer.png") repeat-x;
color: #fff;
.border-radius(5px,5px,5px,5px);
-
+
p {
padding: 2em;
text-align: right;
font-size: 11px;
-
+
a {
color: #999;
text-decoration: none;
-
+
&:hover {
color: #FFF;
text-decoration: none;
}
}
}
-
+
div{
- margin:0;
- padding:0;
+ margin:0;
+ padding:0;
-
- &.left_footer {
- width:0;
- float:left;
- display:block;
- height:100%;
+
+ &.left_footer {
+ width:0;
+ float:left;
+ display:block;
+ height:100%;
}
-
+
&.center_footer {
- width:33%%;
- float:left;
- display:block;
- height:100%;
-
+ width:33%%;
+ float:left;
+ display:block;
+ height:100%;
+
text-align:left;
font-size:0.8em;
}
-
+
&.right_footer a{
- font-size: 1.2em;
- color:#fff;
- padding:1.2em;
+ float:right;
+ font-size: 1.2em;
+ color:#fff;
+ padding:1.2em;
text-align:right;
-
+
&:hover{
- font-size: 1.2em;
- color:#B4E3EC;
- padding:1.2em;
-
+ font-size: 1.2em;
+ color:#B4E3EC;
+ padding:1.2em;
+
}
}
-
+
}
}
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/article-product.less
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/article-product.less 2013-10-12 05:41:26 UTC (rev 4882)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/article-product.less 2013-10-12 06:39:19 UTC (rev 4883)
@@ -10,29 +10,27 @@
/*
- * Specific block price
+ * Specific block price
*/
-// p#price_master,
.price{
font-family:"SourceSansPro",Arial;
font-size:1.7em;
font-weight:bold;
color:black;
padding:0 5px;
-// background:;
-// border:1px solid #0E9FC0;
-// .border-radius(5px, 5px, 5px, 5px);
-
+
.tax_symbol {
font-size:0.4em;
+ display:inline;
}
-
+
del {
font-size:0.6em;
+ white-space:nowrap;
}
del:after {
content: "\D";
- }
+ }
}
@@ -40,7 +38,7 @@
form input[type=text]#products_quantity,
form input[type=text].CartQty{
width:25px;
-
+
}
@@ -50,32 +48,32 @@
*/
article{
&.product{
-
+
header{
-
+
a {
font-size: 14px;
font-style: italic;
color: #777;
-
+
&:hover {
text-decoration: none;
color: #000;
}
}
}
-
+
figure{
display: block;
float: left;
width: 50%;
-
+
p{
text-align:center;
-
+
a {
color: #0e9fc0;
-
+
&:hover {
color: #000;
}
@@ -84,64 +82,64 @@
ul{
list-style:none;
-
+
li{
float:left;
}
}
-
- div#productImagelistMini{
+
+ div#productImagelistMini{
height:70px;
}
-
+
div#productImage {
height:200px;
-
+
}
}
-
-
+
+
p#price_master {
font-family:"SourceSansPro",Arial;
font-weight:bold;
font-size:2em;
-
+
del{
font-size:0.6em;
}
del:after {
content: "\D";
- }
+ }
}
-
-
+
+
/*
* Loop sub mod
*/
section.childsmod{
clear:both;
margin-top: 0.5em;
-
+
p {
padding:0.5em 2em;
color: #555;
font-size: 0.8em;
}
}
-
-
+
+
/*
* Extra critere
*/
.criteres{
table {
border-collapse: collapse;
-
+
td{
display: table;
width:100%;
border:1px solid #DCDBDB;
-
+
label{
display: table-cell;
width:30%;
@@ -149,7 +147,7 @@
padding-left:0.5em;
margin-left:0.5em;
}
-
+
.values{
padding-left:0.5em;
}
@@ -157,40 +155,40 @@
}
}
}
-
-
-
+
+
+
/*
- * Section in listing
+ * Section in listing
*/
section{
-
- // name of generic module
+
+ // name of generic module
&.dataproduct{
.module {
-
+
header{
h4{
border-bottom:1px solid #00A3C5;
}
}
-
+
// .outerblock {
// height: 158px;
// }
-
+
.innerblock {
// height: 135px;
-
+
p {
padding-bottom:0;
-
+
&.price,
&.title{
height:42px;
}
}
-
+
.title,
.innerblock-more {
display:none;
@@ -198,14 +196,14 @@
.price {
display:block;
}
-
+
&:hover{
-
+
.title,
.innerblock-more {
display:block;
}
-
+
.price {
display:none;
}
@@ -223,10 +221,10 @@
* sidebar --aside--
*/
aside{
-
+
section {
&.dataproduct{
-
+
p {
&.preview {
font-size: 0.85em;
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/element.less
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/element.less 2013-10-12 05:41:26 UTC (rev 4882)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/element.less 2013-10-12 06:39:19 UTC (rev 4883)
@@ -7,7 +7,7 @@
* Benoit Adam,
* Portenart Emile-Victor,
* Ryan Faerman
- *
+ *
* More info at: http://lesselements.com
* -----------------------------------------------------*/
@@ -67,7 +67,7 @@
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
- -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;
+ -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;
}
.border-radius(@topright: 0, @bottomright: 0, @bottomleft: 0, @topleft: 0) {
-webkit-border-top-right-radius: @topright;
@@ -82,7 +82,7 @@
border-bottom-right-radius: @bottomright;
border-bottom-left-radius: @bottomleft;
border-top-left-radius: @topleft;
- -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;
+ -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;
}
.opacity(@opacity: 0.5) {
-moz-opacity: @opacity;
@@ -148,7 +148,7 @@
transform: translate(@x, @y);
}
.background-size(@size:100%){
- /* background size */
+ background-size: @size;
-webkit-background-size: @size;
-o-background-size: @size;
-khtml-background-size: @size;
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/generic.less
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/generic.less 2013-10-12 05:41:26 UTC (rev 4882)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/generic.less 2013-10-12 06:39:19 UTC (rev 4883)
@@ -120,10 +120,17 @@
.notice,
.required{color:red}
+.left,
.alignleft { float: left; }
-
+.right,
.alignright { float: right; }
+
+.colum{
+ width:49%;
+ clear:none;
+}
+
.text,
h4,
p {
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/login.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/login.php 2013-10-12 05:41:26 UTC (rev 4882)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/login.php 2013-10-12 06:39:19 UTC (rev 4883)
@@ -4,7 +4,7 @@
@subpackage 2cShopHtml5Oscim
@package osCSS-2 <www http://www.oscss.org>
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @date 23/06/2012, 21:54
+ @date 07/10/2013, 21:54
@encode UTF-8
*\group content
*\file
@@ -14,11 +14,15 @@
?>
<header>
- <h1 class="content title <?php echo $language ;?>"><?php echo HEADING_TITLE; ?></h1>
+ <h1 class="content title <?php echo $language ;?>"><?php echo __('@login heading title'); ?></h1>
</header>
-<div id="login">
+<!-- <div id="login"> -->
+<section id="login" class="colum left">
+ <header>
+ <h2 class="content title <?php echo $language ;?>"><?php echo __('@login heading title login'); ?></h2>
+ </header>
<?php $page->messageStack->_draw('login');?>
@@ -27,56 +31,64 @@
else { echo '<p id="text_visitor_cart" class="infoText">'. TEXT_VISITORS_CART .'</p>'; }
?>
-
-<!-- <h3><?php //echo HEADING_RETURNING_CUSTOMER; ?></h3> -->
-
<?php echo tep_draw_form('login_form', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?>
<fieldset class="returningCustomer">
- <legend><?php echo TEXT_RETURNING_CUSTOMER; ?></legend>
+ <legend><?php echo __('@login text returning customer'); ?></legend>
<p class="inputBlock">
- <label for="email_address"><?php echo ENTRY_EMAIL_ADDRESS; ?></label>
+ <label for="email_address"><?php echo __('@login entry email address'); ?></label>
<?php echo tep_draw_input_field('email_address','email_address'); ?>
</p>
<p class="inputBlock">
- <label for="password"><?php echo ENTRY_PASSWORD; ?></label>
+ <label for="password"><?php echo __('@login entry password'); ?></label>
<?php echo tep_draw_password_field('password'); ?>
</p>
<p class="infoText">
- <?php echo '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a>'; ?>
+ <?php printf(__('@login password forgotten %s'), '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . __('@login password forgotten text') . '</a>' ); ?>
</p>
<p class="formBt">
- <input type="submit" class="submitBt" value="<?php echo IMAGE_BUTTON_LOGIN; ?>" />
+ <input type="submit" class="submitBt" value="<?php echo __('@login image button login'); ?>" />
</p>
</fieldset>
</form>
-</article>
+</section>
-<article>
+<section class="colum right">
+<header>
+ <h2 class="content title <?php echo $language ;?>"><?php echo __('@login heading new customer'); ?></h2>
+</header>
- <header>
- <h1 class="content title <?php echo $language ;?>"><?php echo HEADING_NEW_CUSTOMER; ?></h1>
- </header>
-
<div class="contentBox newCustomer">
- <h4><?php echo TEXT_NEW_CUSTOMER ; ?></h4>
+ <h4><?php echo __('@login text new customer') ; ?></h4>
+ <div class="infoText"><?php echo __('@login text new customer introduction'); ?></div>
- <div class="text infoText">
- <?php echo TEXT_NEW_CUSTOMER_INTRODUCTION; ?>
- </div>
+ <?php echo tep_draw_form('login_form', tep_href_link(FILENAME_CREATE_ACCOUNT, 'action=checkmail', 'SSL')); ?>
+ <fieldset class="returningCustomer">
+ <legend><?php echo __('@login LegendCreatAccount'); ?></legend>
+
+ <p class="inputBlock">
+ <label for="email_address"><?php echo __('@login entry email address'); ?></label>
+ <?php echo tep_draw_input_field('email_address','email_address'); ?>
+ </p>
+
+
+ <p class="formBt">
+ <input type="submit" class="submitBt" value="<?php echo IMAGE_BUTTON_LOGIN; ?>" />
+ </p>
+ </fieldset>
+ </form>
+
<div class="navBt">
<?php echo '<a class="navBt" href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '">' . IMAGE_BUTTON_CONTINUE . '</a>'; ?>
</div>
</div>
+</div>
-
-
-
-</div>
\ No newline at end of file
+</section>
\ No newline at end of file
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/gabarit/box.search_suggest.gab
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/gabarit/box.search_suggest.gab 2013-10-12 05:41:26 UTC (rev 4882)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/gabarit/box.search_suggest.gab 2013-10-12 06:39:19 UTC (rev 4883)
@@ -3,8 +3,8 @@
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 16/09/10, 17:23
+ @version 2.1.2
+ @date 11/10/2013, 17:23
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -13,7 +13,7 @@
<?php echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH), 'get')."\n"; ?>
<p>
<?php echo tep_draw_input_field('keywords','keywords', __('box search input'),'onfocus="this.value=\'\'" onkeyup="searchSuggest()"') ?>
- <input class="search_bt" type="image" src="<?php echo tep_get_httpdir().'templates/'.$template.'/' ?>images/search.gif" />
+ <input class="search_bt" type="submit" />
</p>
</form>
<div id="search_suggest"></div>
\ No newline at end of file
Modified: trunk/catalog/login.php
===================================================================
--- trunk/catalog/login.php 2013-10-12 05:41:26 UTC (rev 4882)
+++ trunk/catalog/login.php 2013-10-12 06:39:19 UTC (rev 4883)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.2
- @date 007/10/2013, 21:44
+ @date 07/10/2013, 21:44
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief Page for login account member
@@ -71,6 +71,7 @@
}
+ $page->breadcrumb->add(__('@login heading title'), tep_href_link(basename(__FILE__)));
$page->post_init();
Modified: trunk/catalog/templates/defaut/includes/boxes/recently_viewed_content.php
===================================================================
--- trunk/catalog/templates/defaut/includes/boxes/recently_viewed_content.php 2013-10-12 05:41:26 UTC (rev 4882)
+++ trunk/catalog/templates/defaut/includes/boxes/recently_viewed_content.php 2013-10-12 06:39:19 UTC (rev 4883)
@@ -19,53 +19,61 @@
@remarks Check display this box
depend Data_product active
*/
- if( ! DataTypes::is_active('product'))
+ if( ! DataTypes::is_active('content'))
return false;
- //! @remarks cf config
+ //! @remarks cf config
if( ! $page->_conf_value('OSCSS__B_RECENTLY_VIEWED'))
return false;
/**
- @remarks Process Specific Boxes
+ @remarks Process Specific Boxes
*/
-global $page,$recent_content;
+global $page,$type, $list;
-
$count=0;
+$type = 'content';
if(tep_session_is_registered('recently_viewed') )
$recently_viewed = $_SESSION['recently_viewed']['content'];
-if( isset($recently_viewed)&& tep_not_null($recently_viewed) ) {
+if( isset($recently_viewed) && tep_not_null($recently_viewed) ) {
$rec_products = explode(';',$recently_viewed );
$recent_products = array();
if (count($rec_products) >=1) {
- $s = '<div id="recently_viewed_inbox">'."\n".'<ul>'."\n";;
foreach ($rec_products as $recent) {
if (strlen($recent) >0 && $count<=$page->_conf_value('MAX_DISPLAY_RECENTLY_VIEWED') && ( !isset($_GET['content']) || (isset($_GET['content']) && (int)$_GET['content'] !=$recent)) ) {
- $recent_info_values = content::get_item((int)$recent, true);
- if($recent_info_values !=false) {
- $recent_content[]=$recent_info_values;
- $count++;
- }
+ $count++;
+
+ $obj = content::get_item((int)$recent, true);
+
+ $tmp = new stdClass;
+ $tmp->type = $type;
+ $tmp->name = $obj->title;
+ $tmp->title = $obj->title;
+ $tmp->href = $obj->href;
+ $tmp->image = $obj->orginial;
+ $tmp->price = false ;
+
+ $list[] = $tmp;
}
}
- $s .= '</ul>'."\n".'</div>'."\n";
+ if($count<=0)
+ return false;
/**
- @remarks Transmit var array for master construtor boxes
+ @remarks Transmit var array for master construtor boxes
*/
$array= array(
- 'type'=>'content',
+ 'type'=>$type,
'title'=>__('box heading viewed content'),
- 'content'=>tep_output_string_protected(tep_get_include_contents('box.recently_viewed_content'),false,true)
+ 'content'=>tep_output_string_protected(tep_get_include_contents('box.generic'),false,true),
);
}
else
Modified: trunk/catalog/templates/defaut/includes/content/login.php
===================================================================
--- trunk/catalog/templates/defaut/includes/content/login.php 2013-10-12 05:41:26 UTC (rev 4882)
+++ trunk/catalog/templates/defaut/includes/content/login.php 2013-10-12 06:39:19 UTC (rev 4883)
@@ -14,7 +14,7 @@
?>
<header>
- <h1 class="content title <?php echo $language ;?>"><?php echo HEADING_TITLE; ?></h1>
+ <h1 class="content title <?php echo $language ;?>"><?php echo __('@login heading title'); ?></h1>
</header>
<!-- <div id="login"> -->
Modified: trunk/catalog/templates/defaut/includes/content/logoff.php
===================================================================
--- trunk/catalog/templates/defaut/includes/content/logoff.php 2013-10-12 05:41:26 UTC (rev 4882)
+++ trunk/catalog/templates/defaut/includes/content/logoff.php 2013-10-12 06:39:19 UTC (rev 4883)
@@ -9,13 +9,13 @@
@encode UTF-8
*/
?>
-<div id="logoff">
- <h2 class="content title <?php echo $language ;?>"><?php echo HEADING_TITLE; ?></h2>
+<header>
+ <h1 class="content title <?php echo $language ;?>"><?php echo HEADING_TITLE; ?></h1>
+</header>
+<div id="logoff">
<p class="infoText"><?php echo TEXT_MAIN; ?></p>
-
-
<div class="navBt">
<?php echo '<a class="navBt" href="' . tep_href_link(FILENAME_DEFAULT) . '">' . IMAGE_BUTTON_CONTINUE . '</a>'; ?>
</div>
Deleted: trunk/catalog/templates/defaut/includes/gabarit/box.recently_viewed.gab
===================================================================
--- trunk/catalog/templates/defaut/includes/gabarit/box.recently_viewed.gab 2013-10-12 05:41:26 UTC (rev 4882)
+++ trunk/catalog/templates/defaut/includes/gabarit/box.recently_viewed.gab 2013-10-12 06:39:19 UTC (rev 4883)
@@ -1,46 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 26/04/2013, 15:13
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-global $recent_products,$language;
-?>
-<div class="inner-boxe">
- <?php if(count($recent_products)>1): ?>
- <ul class="recently_viewed">
- <?php foreach ($recent_products as $item):?>
- <li class="item">
- <span class="title product">
- <a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $item['products_id']) ?>"><?php echo $item['products_name'] ?></a>
- </span>
-
- <span class="img product">
- <a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $item['products_id']) ?>"><?php echo tep_image(DIR_WS_IMAGES . $item['products_image'], '', $page->_conf_value('SIDEBAR_IMG_WIDTH'), $page->_conf_value('SIDEBAR_IMG_HEIGHT') ) ?></a>
- </span>
-
- <span class="price product">
- <?php echo print_products_price_rv($item) ?>
- </span>
- </li>
- <?php endforeach; ?>
- </ul>
- <?php else:
- $item = $recent_products[0]; ?>
- <p class="title product">
- <a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $item['products_id']) ?>"><?php echo $item['products_name'] ?></a>
- </p>
-
- <p class="img product">
- <a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $item['products_id']) ?>"><?php echo tep_image(DIR_WS_IMAGES . $item['products_image'], '', $page->_conf_value('SIDEBAR_IMG_WIDTH'), $page->_conf_value('SIDEBAR_IMG_HEIGHT') ) ?></a>
- </p>
-
- <p class="price product">
- <?php echo print_products_price_rv($item) ?>
- </p>
- <?php endif; ?>
-</div>
\ No newline at end of file
Deleted: trunk/catalog/templates/defaut/includes/gabarit/box.recently_viewed_content.gab
===================================================================
--- trunk/catalog/templates/defaut/includes/gabarit/box.recently_viewed_content.gab 2013-10-12 05:41:26 UTC (rev 4882)
+++ trunk/catalog/templates/defaut/includes/gabarit/box.recently_viewed_content.gab 2013-10-12 06:39:19 UTC (rev 4883)
@@ -1,38 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2013 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 26/04/2013, 15:13
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-global $recent_content,$language;
-?>
-<div class="inner-boxe">
- <?php if(count($recent_content)>1): ?>
- <ul class="recently_viewed">
- <?php foreach ($recent_content as $item):?>
- <li class="item">
- <span class="title content">
- <a href="<?php echo $item->href ?>"><?php echo $item->title ?></a>
- </span>
-
- <span class="preview content">
- <?php echo truncate(strip_tags(unhtmlentities($item->original)), 100) ?>
- </span>
- </li>
- <?php endforeach; ?>
- </ul>
- <?php else:
- $item = $recent_content[0]; ?>
- <p class="title content">
- <a href="<?php echo $item->href ?>"><?php echo $item->title ?></a>
- </p>
-
- <p class="preview content">
- <?php echo truncate(strip_tags(unhtmlentities($item->original)), 100) ?>
- </p>
- <?php endif; ?>
-</div>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-12 05:41:29
|
Revision: 4882
http://sourceforge.net/p/oscss/svn/4882
Author: oscim
Date: 2013-10-12 05:41:26 +0000 (Sat, 12 Oct 2013)
Log Message:
-----------
Fix
Clean theme
Modified Paths:
--------------
trunk/catalog/includes/functions/template.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/generic.less
Removed Paths:
-------------
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.css
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/Sitemap.css
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/habillage.css
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/js/less-1.3.0.min.js
Modified: trunk/catalog/includes/functions/template.php
===================================================================
--- trunk/catalog/includes/functions/template.php 2013-10-11 12:34:27 UTC (rev 4881)
+++ trunk/catalog/includes/functions/template.php 2013-10-12 05:41:26 UTC (rev 4882)
@@ -110,7 +110,6 @@
$osC_CategoryTree->setRootString('<li %s>', '</li>'."\n");
$osC_CategoryTree->setSpacerString(' ', 1);
$osC_CategoryTree->setMaximumLevel($max_level);
- $osC_CategoryTree->setCategoryProductCountString(' (',')');
return $osC_CategoryTree->buildTree($catID) ;
}
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php 2013-10-11 12:34:27 UTC (rev 4881)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php 2013-10-12 05:41:26 UTC (rev 4882)
@@ -75,7 +75,7 @@
<!--[if lte IE 8]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
+ <![endif]-->
<script type="text/javascript" src="includes/general.js" ></script>
Deleted: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.css
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.css 2013-10-11 12:34:27 UTC (rev 4881)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.css 2013-10-12 05:41:26 UTC (rev 4882)
@@ -1,159 +0,0 @@
-/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
- @subpackage Template 2cShopHtml5Oscim
- @package osCSS-2 <www http://www.oscss.org>
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-
-
-
-/* Hx tags */
-
-/* ------------ Structure ------------ */
-
- header#top {
- height:130px;
- }
-
- #logo {
- width:250px;
- float:left;
- }
-
- #logo p,
- #logo h1 {
- padding: 20px 0;
- }
-
-
-
-
- #top_bar {
- float:left;
- position:relative;
- left:260px
- }
-
-
-
- nav {
- position: absolute;
- width: inherit;
-
- }
-
-
-
- section#intro {
- margin-top: 57px;
- width: inherit;
- }
-
- #intro .intro.content {padding: 0;color:#fff;-webkit-border-radius: 5px; -webkit-border-radius: 5px;height:220px;}
- #intro .intro.content div{font-size: 0.9em; font-weight:bold; width:936px;margin:0; padding:0;}
-
-
- nl#breadcrumbs {
- margin-top: 12px;
- margin-bottom: 12px;
- clear: both;
- float: left;
- height: 25px;
- padding: 1.5em;
- position: relative;
- top: 22px;
- width: inherit;
-}
- nl#breadcrumbs a { text-decoration:none; padding:1em;font-size:1.5em;font-weight: bold;color: #777; }
-
-/* ------------ Habillage ------------ */
-/* voir fichier Habillage.css */
-
- /*header {
- }*/
-
- #logo p,
- #logo h1 {
- padding: 20px 0;
- }
-
-
- /* #top_bar {
- }*/
-
-
-
- nav ul {
- margin: 0 auto;
- width: inherit;
- }
-
- nav ul li {
- float: left;
- }
-
- nav ul li a {
- display: inline-block;
- margin-right: 20px;
- padding: 0 10px;
- line-height: 44px;
- }
-
-
-
- div#top_bar {
- width: 450px;
- padding:0;
- height:45px;
- }
- div#top_bar div{float:left;}
-
-
-
-
- #intro h1,
- #intro h2,
- #intro p {
- position: relative;
- z-index: 9999;
- width: 800px;
- }
-
- #intro h1,
- #intro h2 {
- padding: 0 0 20px 0;
- }
-
-
-
-
-
-
-
-/* Bottom */
-
- /* footer */
- footer {
- clear: both;
- height:60px;
- margin-bottom: 10px;
- padding:1.5em;
- position: relative;
- top: 12px;
- }
-
- footer p {
- padding: 2em;
- }
-
-
- footer div.left_footer {margin:0; padding:0; width:0; float:left; display:block; height:100%; }
- footer div.center_footer {margin:0; padding:0; width:33%%; float:left; display:block; height:100%; }
- footer div.right_footer a{font-size: 1.2em; color:#fff; padding:1.2em; }
- footer div.right_footer a:hover{font-size: 1.2em; color:#B4E3EC; padding:1.2em; }
-
-
-
-
-
Deleted: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/Sitemap.css
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/Sitemap.css 2013-10-11 12:34:27 UTC (rev 4881)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/Sitemap.css 2013-10-12 05:41:26 UTC (rev 4882)
@@ -1,16 +0,0 @@
-/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
- @subpackage Template 2cShopHtml5Oscim
- @package osCSS-2 <www http://www.oscss.org>
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-
-
-/* ------------------------------------------------------------
- Site Map Styles
------------------------------------------------------------- */
-
-
-
-
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/generic.less
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/generic.less 2013-10-11 12:34:27 UTC (rev 4881)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/generic.less 2013-10-12 05:41:26 UTC (rev 4882)
@@ -29,7 +29,7 @@
/* reset */
* { margin: 0; padding: 0; }
-br.clear {height:0; width:0;}
+br.clear {height:0; width:0;}
/* render html5 elements as block */
@@ -64,26 +64,24 @@
/*
- * Normal html balise
+ * Normal html balise
*/
+
h1 {
- padding: 20px 0;
+ padding: 10px 0;
color: #FFF;
- font-size: 28px;
-// font-family:"SourceSansPro",Arial;
+ font-size: 26px;
}
h2 {
- padding: 20px 0;
- font-size: 24px;
-// font-family:"SourceSansPro",Arial;
+ padding: 10px 0;
+ font-size: 22px;
}
h3 {
padding: 10px 0;
font-size: 18px;
-// font-family:"SourceSansPro",Arial;
}
ul,ol {
@@ -92,11 +90,11 @@
}
a {
- text-decoration:none;
- color:#0E9FC0;
+ text-decoration:none;
+ color:#0E9FC0;
font-weight:normal;
font-size:1.2em;
-
+
&:hover{
text-decoration:underline;
}
@@ -104,18 +102,18 @@
img{
border: none;
-
- &.alignleft {
+
+ &.alignleft {
margin: 5px 10px 0 0;
}
-
- &.alignright {
+
+ &.alignright {
margin: 5px 0 0 10px;
}
}
/*
- * Class color / align
+ * Class color / align
*/
.center { text-align: center; }
@@ -134,11 +132,11 @@
/*
- *
+ *
*/
table{
width:100%;
-
+
}
@@ -156,20 +154,20 @@
float: none;
height: 30px;
width: 100%;
-
+
p.sP1{
float:left;
width:38%;
}
-
+
p.sP2{
float:right;
// width:58%;
-
+
a{
margin:0 0.1em;
padding: 0.12em 0.3em;
-
+
background: none repeat scroll 0 0 padding-box #FFFFFF;
border: 1px solid #ACAAAC;
.border-radius(5px,5px,5px,5px);
@@ -177,18 +175,18 @@
font-size: 14.3px;
font-weight:normal;
color:black;
-
+
&:hover{
- text-decoration:none;
+ text-decoration:none;
border:1px solid @bg_input_border_hover;
- background: @bg_input_hover ;
+ background: @bg_input_hover ;
}
}
-
+
.jump{
display:inline-block;
padding: 0.02em 0.3em;
-
+
background: #A0A0A0;
border: 1px solid #A0A0A0;
.border-radius(5px,5px,5px,5px);
@@ -204,7 +202,7 @@
/*
- * Bouton basé sur des liens
+ * Bouton basé sur des liens
*/
a{
&.submitBt,
@@ -212,7 +210,7 @@
&.navBt{
margin: 0.3em;
padding: 0.12em 0.3em;
-
+
background: none repeat scroll 0 0 padding-box #FFFFFF;
border: 1px solid #ACAAAC;
.border-radius(5px,5px,5px,5px);
@@ -220,12 +218,12 @@
font-size: 14.3px;
font-weight:normal;
color:black;
-
-
+
+
&:hover{
- text-decoration:none;
+ text-decoration:none;
border:1px solid @bg_input_border_hover;
- background: @bg_input_hover ;
+ background: @bg_input_hover ;
}
}
}
@@ -233,20 +231,20 @@
/*
- *
+ *
*/
.messageStack{
- margin:5px 0;
+ margin:5px 0;
padding:0;
color: #FFF;
background-color: #f18f7e;
.border-radius(5px,5px,5px,5px);
*{
- list-style:none;
- margin:0;
+ list-style:none;
+ margin:0;
padding:0;
}
-
+
li{
padding:5px 12px;
}
@@ -257,7 +255,7 @@
/*
- * Sitemap
+ * Sitemap
*/
/*
@@ -266,123 +264,123 @@
body#Page_sitemap div#main-tpl,
.Type_checkout div#main-tpl {
aside {
- width:0;
+ width:0;
display:none;
}
-
+
div#content {
- width:100%;
- padding-right:0;
+ width:100%;
+ padding-right:0;
padding-left:0;
-
+
/*
- * view
+ * view
*/
}
}
/*
- * Detail reel sitemap
+ * Detail reel sitemap
*/
ul#primaryNav {
list-style:none;
- margin:20px 0 0 0;
- float: left;
+ margin:20px 0 0 0;
+ float: left;
width: 100%;
list-style:none;
-
-
+
+
li {
-
+
/* -------- Top Level --------- */
-
- list-style:none;
- float: left;
- background: url('../images/sitmap/L1-center.png') center top no-repeat;
- padding: 30px 0;
- margin-top: -30px;
-
- a {
- margin: 0 20px 0 0;
- padding: 10px 0;
- display: block;
+
+ list-style:none;
+ float: left;
+ background: url('../images/sitmap/L1-center.png') center top no-repeat;
+ padding: 30px 0;
+ margin-top: -30px;
+
+ a {
+ margin: 0 20px 0 0;
+ padding: 10px 0;
+ display: block;
text-decoration:none;
- font-size: 12px;
- font-weight: bold;
- text-align: center;
- color: #504b4b;
- background: #6fa8b2 url('../images/sitmap/white-highlight.png') top left repeat-x;
- border: 2px solid #44808b;
+ font-size: 12px;
+ font-weight: bold;
+ text-align: center;
+ color: #504b4b;
+ background: #6fa8b2 url('../images/sitmap/white-highlight.png') top left repeat-x;
+ border: 2px solid #44808b;
.border-radius(5px,5px,5px,5px);
-
+
&:hover { background-color: #e2f4fd; border-color: #97bdcf; }
-
+
&:link:before,
&:visited:before { color: #78a9c0; }
}
-
+
&:last-child { background: url('../images/sitmap/L1-right.png') center top no-repeat; }
-
+
.rows {clear:both}
-
-
+
+
/* -------- Second Level --------- */
-
- li {
- width: 100%;
- clear: left;
- margin-top: 0;
- padding: 10px 0 0 0;
- background: url('../images/sitmap/vertical-line.png') center bottom repeat-y;
-
+
+ li {
+ width: 100%;
+ clear: left;
+ margin-top: 0;
+ padding: 10px 0 0 0;
+ background: url('../images/sitmap/vertical-line.png') center bottom repeat-y;
+
a {
- background-color: #cee3ac;
- border-color: #b8da83;
-
- &:hover {
- border-color: #94b75f;
- background-color: #e7f1d7;
-
+ background-color: #cee3ac;
+ border-color: #b8da83;
+
+ &:hover {
+ border-color: #94b75f;
+ background-color: #e7f1d7;
+
}
-
+
&:link:before,
&:visited:before { color: #8faf5c; }
}
-
+
&:first-child { padding-top: 30px; }
-
+
&:last-child { background: url('../images/sitmap/vertical-line.png') center bottom repeat-y; }
-
+
/* -------- Third Level --------- */
-
+
ul {
- margin: 10px 0 0 0;
- width: 100%;
- float: right;
- padding: 9px 0 10px 0;
- background: #ffffff url('../images/sitmap/L3-ul-top.png') center top no-repeat;
-
- li {
- background: url('../images/sitmap/L3-center.png') left center no-repeat;
- padding: 5px 0;
-
- a {
+ margin: 10px 0 0 0;
+ width: 100%;
+ float: right;
+ padding: 9px 0 10px 0;
+ background: #ffffff url('../images/sitmap/L3-ul-top.png') center top no-repeat;
+
+ li {
+ background: url('../images/sitmap/L3-center.png') left center no-repeat;
+ padding: 5px 0;
+
+ a {
background-color: #fff7aa;
- border-color: #e3ca4b;
- font-size: 12px;
- padding: 5px 0;
- width: 80%;
- float: right;
-
+ border-color: #e3ca4b;
+ font-size: 12px;
+ padding: 5px 0;
+ width: 80%;
+ float: right;
+
&:hover { background-color: #fffce5; border-color: #d1b62c; }
-
+
&:link:before,
&:visited:before { color: #ccae14; font-size: 9px; }
}
-
+
&:first-child { padding: 15px 0 5px 0; background: url('../images/sitmap/L3-li-top.png') left center no-repeat; }
-
+
&:last-child { background: url('../images/sitmap/L3-bottom.png') left center no-repeat; }
}
}
Deleted: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/habillage.css
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/habillage.css 2013-10-11 12:34:27 UTC (rev 4881)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/habillage.css 2013-10-12 05:41:26 UTC (rev 4882)
@@ -1,371 +0,0 @@
-/**
- @ licence GPL 2005-2011 The osC*S*S developers - osCSS Open Source E-commerce
- @subpackage Template 2cShopHtml5Oscim
- @package osCSS-2 <www http://www.oscss.org>
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
- */
-
-
-/* standard body */
-body {
- font: 14px/20px "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
- background: #eee;
-}
-
-/* standard alignments */
-img { border: none; }
-.center { text-align: center; }
-
-.notice,
-.required{color:red}
-
-/* Hx tags */
-
-
-h1 {
- color: #FFF;
- font-size: 28px;
-}
-
-h2 {
- font-size: 24px;
-}
-
-h3 {
- font-size: 18px;
-}
-ul {list-style:none;}
-fieldest,
-form,
- fieldset.ListFilterType,
- fieldset.manufacturerFilter {border:0;font-size:0.9em;padding:0.5em}
- del {font-size:0.6em;}
-
- .messageStack {
- color: #FFF;
- background-color: #f18f7e;
- /* curved border radius */
- -webkit-border-radius: 5px;
- -webkit-border-radius: 5px;
- }
-
-
- div.CguView {
- text-align: justify;
- border:1px solid black;
- background:white;
- }
-
- a {text-decoration:none; color:#0E9FC0; font-weight:bold;font-size:1.2em;}
-
-
- /* content and sidebar layout */
-
- #content {
- background:#fff url("../images/bg_content.jpg") no-repeat top right;
- /* curved border radius */
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- }
-
- /* article */
-
- .product header p, .blogPost header p a {
- font-size: 14px;
- font-style: italic;
- color: #777;
- }
-
- .product p a {
- color: #0e9fc0;
- }
-
- .product p a:hover {
- color: #000;
- }
-
- .product header p a:hover {
- text-decoration: none;
- color: #000;
- }
-
- article h1/*,
- .product h2,
- .product h1*/ {
- background:transparent url("../images/bg_header.jpg") no-repeat top left;
- /* curved border radius */
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- }
-
- /* sidebar */
- aside section {
- background-color: #fff;
-
- /* curved border radius */
- -webkit-border-radius: 5px;
- -webkit-border-radius: 5px;
- }
-
- aside section ul {
- list-style: square;
- color: #0e9fc0;
- }
-
- aside section ul li {
- border-bottom: 1px #0e9fc0 dotted;
- }
-
- aside section ul li a {
- text-decoration: none;
- color: #000;
- font-size: 16px;
- font-variant: small-caps;
- }
-
- aside section ul li a:hover {
- text-decoration: underline;
- }
-
- aside section header h3 {
- background: url("../images/introbkg.png") repeat-x scroll bottom right #778899;
- color:#fff;
- /* curved border radius */
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- }
-
-
- aside section div.inner-boxe{
- text-align:center;
- }
-
-
- /* columns */
-
- .module h4.title {font-size: 1.5em;font-weight:bold;margin:1.2em;color:#0E9FC0;}
-
-
- .module ul {
- list-style: none;
- }
-
-
- .module .outerblock {
- font-size: 1em;
- background: #dee;
- /* curved border radius */
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- }
-
- .module .innerblock {
- font-size: 1em;
-
- text-align:center;
- /* curved border radius */
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- }
-
- .module .innerblock img {
- border: none;
- }
-
- .module .innerblock a {
- color: #0e9fc0;
- }
-
- .module .innerblock h2 {
- font-size: 16px;
- }
-
-
-
-
- .module .innerblock .innerblock-more{
- text-align:left;
- }
-
-
- .module .innerblock .innerblock-more a.details{
- color:#fff;
- background:#0E9FC0;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- }
-
- .module .innerblock .innerblock-more a.details:hover{
- color:#0E9FC0;
- background:#fff;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- }
-
-
-
-
- .boxe { -moz-border-radius: 5px;-webkit-border-radius: 5px}
-
- /* end of column configuration */
-
-
-
- article.product.single figure p{
- text-align:center;
- }
- article.product.single figure ul{
- list-style:none;
- }
-
-
- #headingCatImg { background: url("../images/bg_product.png") 0px 0px no-repeat;}
- .innerblock { background: url("../images/bg_product_list.png") 0px 0px no-repeat;}
-
-
-
-
-
- /* -- panier -- */
-
- .invoice {background: url("../images/bg_product.png") 0px 0px no-repeat;}
- .cart-header {background:#eee;border:1px solid #fff;}
- .cart-line {border:1px solid #eee;}
- .cart-line input{border:1px solid #eee;font-weight:bold;}
- .cart-line .puht {font-weight:bold;font-size:0.8em;}
- .cart-line .totttc {font-weight:bold;font-size:1.2em;}
- #TotCart{list-style:none;background: url("../images/bg_soustotal.png") top right no-repeat; -moz-border-radius: 5px; -webkit-border-radius: 5px;}
- #TotCart li span.value{font-size:1.5em;text-align:right;}
- #TotCart li span.text{font-size:0.8em;color:#888;}
-
- /* panier short */
- #shopping_cart_shortBox {font-size:0.5em;}
-
- #Box-shopping_cart_short h3 {font-size:12px;}
- #Box-shopping_cart_short span {font-size:12px;}
- #Box-shopping_cart_short ul,
- #Box-shopping_cart_short ul li ul {list-style:none;}
- #Box-shopping_cart_short ul li ul,
- #Box-shopping_cart_short ul li,
- ul.cart{font-size:12px;font-weight:bold;color:#000;}
- #Box-shopping_cart_short ul li span,
- ul.cart li{font-size:10px;font-weight:bold;}
- ul.cart a,
- .cart_details a {color:#000;font-size:10px;}
-
-
- /* Section habillage Top.css */
-
-
- /*header {
- } */ *
-
- #logo p,
- #logo h1 {
- color: #FFF;
- font-size: 28px;
- }
-
-
- /* #top_bar {
- } */ *
-
-
- nav {
- background: url("../images/navbg.png") no-repeat top right #000;
- /* curved border radius */
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- }
-
- nav ul {
- list-style: none;
- }
-
-
- nav ul li a {
- font-size: 16px;
- font-weight: bold;
- line-height: 44px;
- text-align: center;
- text-decoration: none;
- color: #b4e3ec;
- }
-
- nav ul li a:hover {
- color: #fff;
- }
-
- nav ul li.selected a {
- color: #fff;
- }
-
-
- div#top_bar {
- -moz-border-radius: 0px 0px 10px 10px;
- background: url("../images/navbg.png") repeat scroll 0 0 transparent;
- }
-
-
- section#intro {
- background: #778899 url("../images/introbkg.png") repeat-x;
-
- /* background size */
- -webkit-background-size: 100%;
- -o-background-size: 100%;
- -khtml-background-size: 100%;
-
-
- /* curved border radius */
- -webkit-border-radius: 5px;
- -webkit-border-radius: 5px;
- }
-
-
-
- #intro h1,
- #intro h2 {
- font-weight: normal;
- color: #333;
- }
-
- #intro p {
- color: #5D4A3D;
- }
-
-
-
-
-
- /* Footer habillage section*/
- /* footer */
- footer {
- background: #778899 url("../images/footer.png") repeat-x;
- color: #fff;
-
- /* curved border radius */
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- }
-
- footer p {
- text-align: right;
- font-size: 11px;
- }
-
- footer a {
- color: #999;
- }
-
- footer a:hover {
- color: #FFF;
- text-decoration: none;
- }
-
- footer div.right_footer { text-align:right;}
-
- footer div.center_footer{
- text-align:left;font-size:0.8em;
- }
- footer a {text-decoration: none;}
\ No newline at end of file
Deleted: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/js/less-1.3.0.min.js
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/js/less-1.3.0.min.js 2013-10-11 12:34:27 UTC (rev 4881)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/js/less-1.3.0.min.js 2013-10-12 05:41:26 UTC (rev 4882)
@@ -1,9 +0,0 @@
-//
-// LESS - Leaner CSS v1.3.0
-// http://lesscss.org
-//
-// Copyright (c) 2009-2011, Alexis Sellier
-// Licensed under the Apache 2.0 License.
-//
-(function(a,b){function c(b){return a.less[b.split("/")[1]]}function l(){var a=document.getElementsByTagName("style");for(var b=0;b<a.length;b++)a[b].type.match(j)&&(new d.Parser).parse(a[b].innerHTML||"",function(c,d){var e=d.toCSS(),f=a[b];f.type="text/css",f.styleSheet?f.styleSheet.cssText=e:f.innerHTML=e})}function m(a,b){for(var c=0;c<d.sheets.length;c++)n(d.sheets[c],a,b,d.sheets.length-(c+1))}function n(b,c,e,f){var h=a.location.href.replace(/[#?].*$/,""),i=b.href.replace(/\?.*$/,""),j=g&&g.getItem(i),k=g&&g.getItem(i+":timestamp"),l={css:j,timestamp:k};/^(https?|file):/.test(i)||(i.charAt(0)=="/"?i=a.location.protocol+"//"+a.location.host+i:i=h.slice(0,h.lastIndexOf("/")+1)+i);var m=i.match(/([^\/]+)$/)[1];q(b.href,b.type,function(a,g){if(!e&&l&&g&&(new Date(g)).valueOf()===(new Date(l.timestamp)).valueOf())p(l.css,b),c(null,null,a,b,{local:!0,remaining:f});else try{(new d.Parser({optimization:d.optimization,paths:[i.replace(/[\w\.-]+$/,"")],mime:b.type,filename:m})).parse(a,function(d,e){if(d)return u(d,i);try{c(d,e,a,b,{local:!1,lastModified:g,remaining:f}),s(document.getElementById("less-error-message:"+o(i)))}catch(d){u(d,i)}})}catch(h){u(h,i)}},function(a,b){throw new Error("Couldn't load "+b+" ("+a+")")})}function o(a){return a.replace(/^[a-z]+:\/\/?[^\/]+/,"").replace(/^\//,"").replace(/\?.*$/,"").replace(/\.[^\.\/]+$/,"").replace(/[^\.\w-]+/g,"-").replace(/\./g,":")}function p(a,b,c){var d,e=b.href?b.href.replace(/\?.*$/,""):"",f="less:"+(b.title||o(e));(d=document.getElementById(f))===null&&(d=document.createElement("style"),d.type="text/css",d.media=b.media||"screen",d.id=f,document.getElementsByTagName("head")[0].appendChild(d));if(d.styleSheet)try{d.styleSheet.cssText=a}catch(h){throw new Error("Couldn't reassign styleSheet.cssText.")}else(function(a){d.childNodes.length>0?d.firstChild.nodeValue!==a.nodeValue&&d.replaceChild(a,d.firstChild):d.appendChild(a)})(document.createTextNode(a));c&&g&&(t("saving "+e+" to cache."),g.setItem(e,a),g.setItem(e+":timestamp",c))}function q(a,b,c,e){function i(b,c,d){b.status>=200&&b.status<300?c(b.responseText,b.getResponseHeader("Last-Modified")):typeof d=="function"&&d(b.status,a)}var g=r(),h=f?!1:d.async;typeof g.overrideMimeType=="function"&&g.overrideMimeType("text/css"),g.open("GET",a,h),g.setRequestHeader("Accept",b||"text/x-less, text/css; q=0.9, */*; q=0.5"),g.send(null),f?g.status===0||g.status>=200&&g.status<300?c(g.responseText):e(g.status,a):h?g.onreadystatechange=function(){g.readyState==4&&i(g,c,e)}:i(g,c,e)}function r(){if(a.XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(b){return t("browser doesn't support AJAX."),null}}function s(a){return a&&a.parentNode.removeChild(a)}function t(a){d.env=="development"&&typeof console!="undefined"&&console.log("less: "+a)}function u(a,b){var c="less-error-message:"+o(b),e='<li><label>{line}</label><pre class="{class}">{content}</pre></li>',f=document.createElement("div"),g,h,i=[],j=a.filename||b;f.id=c,f.className="less-error-message",h="<h3>"+(a.message||"There is an error in your .less file")+"</h3>"+'<p>in <a href="'+j+'">'+j+"</a> ";var k=function(a,b,c){a.extract[b]&&i.push(e.replace(/\{line\}/,parseInt(a.line)+(b-1)).replace(/\{class\}/,c).replace(/\{content\}/,a.extract[b]))};a.stack?h+="<br/>"+a.stack.split("\n").slice(1).join("<br/>"):a.extract&&(k(a,0,""),k(a,1,"line"),k(a,2,""),h+="on line "+a.line+", column "+(a.column+1)+":</p>"+"<ul>"+i.join("")+"</ul>"),f.innerHTML=h,p([".less-error-message ul, .less-error-message li {","list-style-type: none;","margin-right: 15px;","padding: 4px 0;","margin: 0;","}",".less-error-message label {","font-size: 12px;","margin-right: 15px;","padding: 4px 0;","color: #cc7777;","}",".less-error-message pre {","color: #dd6666;","padding: 4px 0;","margin: 0;","display: inline-block;","}",".less-error-message pre.line {","color: #ff0000;","}",".less-error-message h3 {","font-size: 20px;","font-weight: bold;","padding: 15px 0 5px 0;","margin: 0;","}",".less-error-message a {","color: #10a","}",".less-error-message .error {","color: red;","font-weight: bold;","padding-bottom: 2px;","border-bottom: 1px dashed red;","}"].join("\n"),{title:"error-message"}),f.style.cssText=["font-family: Arial, sans-serif","border: 1px solid #e00","background-color: #eee","border-radius: 5px","-webkit-border-radius: 5px","-moz-border-radius: 5px","color: #e00","padding: 15px","margin-bottom: 15px"].join(";"),d.env=="development"&&(g=setInterval(function(){document.body&&(document.getElementById(c)?document.body.replaceChild(f,document.getElementById(c)):document.body.insertBefore(f,document.body.firstChild),clearInterval(g))},10))}typeof define=="function"&&define.amd&&define("less",[],function(){return d}),Array.isArray||(Array.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"||a instanceof Array}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c=this.length>>>0;for(var d=0;d<c;d++)d in this&&a.call(b,this[d],d,this)}),Array.prototype.map||(Array.prototype.map=function(a){var b=this.length>>>0,c=new Array(b),d=arguments[1];for(var e=0;e<b;e++)e in this&&(c[e]=a.call(d,this[e],e,this));return c}),Array.prototype.filter||(Array.prototype.filter=function(a){var b=[],c=arguments[1];for(var d=0;d<this.length;d++)a.call(c,this[d])&&b.push(this[d]);return b}),Array.prototype.reduce||(Array.prototype.reduce=function(a){var b=this.length>>>0,c=0;if(b===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)var d=arguments[1];else do{if(c in this){d=this[c++];break}if(++c>=b)throw new TypeError}while(!0);for(;c<b;c++)c in this&&(d=a.call(null,d,this[c],c,this));return d}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length,c=arguments[1]||0;if(!b)return-1;if(c>=b)return-1;c<0&&(c+=b);for(;c<b;c++){if(!Object.prototype.hasOwnProperty.call(this,c))continue;if(a===this[c])return c}return-1}),Object.keys||(Object.keys=function(a){var b=[];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c);return b}),String.prototype.trim||(String.prototype.trim=function(){return String(this).replace(/^\s\s*/,"").replace(/\s\s*$/,"")});var d,e;typeof environment=="object"&&{}.toString.call(environment)==="[object Environment]"?(typeof a=="undefined"?d={}:d=a.less={},e=d.tree={},d.mode="rhino"):typeof a=="undefined"?(d=exports,e=c("./tree"),d.mode="node"):(typeof a.less=="undefined"&&(a.less={}),d=a.less,e=a.less.tree={},d.mode="browser"),d.Parser=function v(a){function q(){h=k[g],i=f,l=f}function r(){k[g]=h,f=i,l=f}function s(){f>l&&(k[g]=k[g].slice(f-l),l=f)}function t(a){var c,d,e,h,i,j,n,o;if(a instanceof Function)return a.call(m.parsers);if(typeof a=="string")c=b.charAt(f)===a?a:null,e=1,s();else{s();if(c=a.exec(k[g]))e=c[0].length;else return null}if(c){o=f+=e,j=f+k[g].length-e;while(f<j){h=b.charCodeAt(f);if(h!==32&&h!==10&&h!==9)break;f++}return k[g]=k[g].slice(e+(f-o)),l=f,k[g].length===0&&g<k.length-1&&g++,typeof c=="string"?c:c.length===1?c[0]:c}}function u(a,c){var d=t(a);if(!d)v(c||(typeof a=="string"?"expected '"+a+"' got '"+b.charAt(f)+"'":"unexpected token"));else return d}function v(a,b){throw{index:f,type:b||"Syntax",message:a}}function w(a){return typeof a=="string"?b.charAt(f)===a:a.test(k[g])?!0:!1}function x(a){return d.mode==="node"?c("path").basename(a):a.match(/[^\/]+$/)[0]}function y(a,c){return a.filename&&c.filename&&a.filename!==c.filename?m.imports.contents[x(a.filename)]:b}function z(a,b){for(var c=a,d=-1;c>=0&&b.charAt(c)!=="\n";c--)d++;return{line:typeof a=="number"?(b.slice(0,a).match(/\n/g)||"").length:null,column:d}}function A(a,b){var c=y(a,b),d=z(a.index,c),e=d.line,f=d.column,g=c.split("\n");this.type=a.type||"Syntax",this.message=a.message,this.filename=a.filename||b.filename,this.index=a.index,this.line=typeof e=="number"?e+1:null,this.callLine=a.call&&z(a.call,c).line+1,this.callExtract=g[z(a.call,c).line],this.stack=a.stack,this.column=f,this.extract=[g[e-1],g[e],g[e+1]]}var b,f,g,h,i,j,k,l,m,n=this,o=function(){},p=this.imports={paths:a&&a.paths||[],queue:[],files:{},contents:{},mime:a&&a.mime,error:null,push:function(b,c){var e=this;this.queue.push(b),d.Parser.importer(b,this.paths,function(a,d,f){e.queue.splice(e.queue.indexOf(b),1),e.files[b]=d,e.contents[b]=f,a&&!e.error&&(e.error=a),c(a,d),e.queue.length===0&&o()},a)}};return this.env=a=a||{},this.optimization="optimization"in this.env?this.env.optimization:1,this.env.filename=this.env.filename||null,m={imports:p,parse:function(h,i){var n,p,q,r,s,u,v=[],w,x=null;f=g=l=j=0,b=h.replace(/\r\n/g,"\n"),k=function(c){var d=0,e=/[^"'`\{\}\/\(\)\\]+/g,f=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,g=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`\\\r\n]|\\.)*)`/g,h=0,i,j=c[0],k;for(var l=0,m,n;l<b.length;l++){e.lastIndex=l,(i=e.exec(b))&&i.index===l&&(l+=i[0].length,j.push(i[0])),m=b.charAt(l),f.lastIndex=g.lastIndex=l,(i=g.exec(b))&&i.index===l&&(l+=i[0].length,j.push(i[0]),m=b.charAt(l)),!k&&m==="/"&&(n=b.charAt(l+1),(n==="/"||n==="*")&&(i=f.exec(b))&&i.index===l&&(l+=i[0].length,j.push(i[0]),m=b.charAt(l)));switch(m){case"{":if(!k){h++,j.push(m);break};case"}":if(!k){h--,j.push(m),c[++d]=j=[];break};case"(":if(!k){k=!0,j.push(m);break};case")":if(k){k=!1,j.push(m);break};default:j.push(m)}}return h>0&&(x=new A({index:l,type:"Parse",message:"missing closing `}`",filename:a.filename},a)),c.map(function(a){return a.join("")})}([[]]);if(x)return i(x);try{n=new e.Ruleset([],t(this.parsers.primary)),n.root=!0}catch(y){return i(new A(y,a))}n.toCSS=function(b){var f,g,h;return function(f,g){var h=[],i;f=f||{},typeof g=="object"&&!Array.isArray(g)&&(g=Object.keys(g).map(function(a){var b=g[a];return b instanceof e.Value||(b instanceof e.Expression||(b=new e.Expression([b])),b=new e.Value([b])),new e.Rule("@"+a,b,!1,0)}),h=[new e.Ruleset(null,g)]);try{var j=b.call(this,{frames:h}).toCSS([],{compress:f.compress||!1})}catch(k){throw new A(k,a)}if(i=m.imports.error)throw i instanceof A?i:new A(i,a);return f.yuicompress&&d.mode==="node"?c("./cssmin").compressor.cssmin(j):f.compress?j.replace(/(\s)+/g,"$1"):j}}(n.eval);if(f<b.length-1){f=j,u=b.split("\n"),s=(b.slice(0,f).match(/\n/g)||"").length+1;for(var z=f,B=-1;z>=0&&b.charAt(z)!=="\n";z--)B++;x={type:"Parse",message:"Syntax Error on line "+s,index:f,filename:a.filename,line:s,column:B,extract:[u[s-2],u[s-1],u[s]]}}this.imports.queue.length>0?o=function(){i(x,n)}:i(x,n)},parsers:{primary:function(){var a,b=[];while((a=t(this.mixin.definition)||t(this.rule)||t(this.ruleset)||t(this.mixin.call)||t(this.comment)||t(this.directive))||t(/^[\s\n]+/))a&&b.push(a);return b},comment:function(){var a;if(b.charAt(f)!=="/")return;if(b.charAt(f+1)==="/")return new e.Comment(t(/^\/\/.*/),!0);if(a=t(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))return new e.Comment(a)},entities:{quoted:function(){var a,c=f,d;b.charAt(c)==="~"&&(c++,d=!0);if(b.charAt(c)!=='"'&&b.charAt(c)!=="'")return;d&&t("~");if(a=t(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/))return new e.Quoted(a[0],a[1]||a[2],d)},keyword:function(){var a;if(a=t(/^[_A-Za-z-][_A-Za-z0-9-]*/))return e.colors.hasOwnProperty(a)?new e.Color(e.colors[a].slice(1)):new e.Keyword(a)},call:function(){var b,c,d=f;if(!(b=/^([\w-]+|%|progid:[\w\.]+)\(/.exec(k[g])))return;b=b[1].toLowerCase();if(b==="url")return null;f+=b.length;if(b==="alpha")return t(this.alpha);t("("),c=t(this.entities.arguments);if(!t(")"))return;if(b)return new e.Call(b,c,d,a.filename)},arguments:function(){var a=[],b;while(b=t(this.entities.assignment)||t(this.expression)){a.push(b);if(!t(","))break}return a},literal:function(){return t(this.entities.dimension)||t(this.entities.color)||t(this.entities.quoted)},assignment:function(){var a,b;if((a=t(/^\w+(?=\s?=)/i))&&t("=")&&(b=t(this.entity)))return new e.Assignment(a,b)},url:function(){var a;if(b.charAt(f)!=="u"||!t(/^url\(/))return;return a=t(this.entities.quoted)||t(this.entities.variable)||t(this.entities.dataURI)||t(/^[-\w%@$\/.&=:;#+?~]+/)||"",u(")"),new e.URL(a.value||a.data||a instanceof e.Variable?a:new e.Anonymous(a),p.paths)},dataURI:function(){var a;if(t(/^data:/)){a={},a.mime=t(/^[^\/]+\/[^,;)]+/)||"",a.charset=t(/^;\s*charset=[^,;)]+/)||"",a.base64=t(/^;\s*base64/)||"",a.data=t(/^,\s*[^)]+/);if(a.data)return a}},variable:function(){var c,d=f;if(b.charAt(f)==="@"&&(c=t(/^@@?[\w-]+/)))return new e.Variable(c,d,a.filename)},color:function(){var a;if(b.charAt(f)==="#"&&(a=t(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new e.Color(a[1])},dimension:function(){var a,c=b.charCodeAt(f);if(c>57||c<45||c===47)return;if(a=t(/^(-?\d*\.?\d+)(px|%|em|rem|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn)?/))return new e.Dimension(a[1],a[2])},javascript:function(){var a,c=f,d;b.charAt(c)==="~"&&(c++,d=!0);if(b.charAt(c)!=="`")return;d&&t("~");if(a=t(/^`([^`]*)`/))return new e.JavaScript(a[1],f,d)}},variable:function(){var a;if(b.charAt(f)==="@"&&(a=t(/^(@[\w-]+)\s*:/)))return a[1]},shorthand:function(){var a,b;if(!w(/^[@\w.%-]+\/[@\w.-]+/))return;if((a=t(this.entity))&&t("/")&&(b=t(this.entity)))return new e.Shorthand(a,b)},mixin:{call:function(){var c=[],d,g,h,i=f,j=b.charAt(f),k=!1;if(j!=="."&&j!=="#")return;while(d=t(/^[#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/))c.push(new e.Element(g,d,f)),g=t(">");t("(")&&(h=t(this.entities.arguments))&&t(")"),t(this.important)&&(k=!0);if(c.length>0&&(t(";")||w("}")))return new e.mixin.Call(c,h||[],i,a.filename,k)},definition:function(){var a,c=[],d,g,h,i,j,k=!1;if(b.charAt(f)!=="."&&b.charAt(f)!=="#"||w(/^[^{]*(;|})/))return;q();if(d=t(/^([#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+)\s*\(/)){a=d[1];do{if(b.charAt(f)==="."&&t(/^\.{3}/)){k=!0;break}if(!(h=t(this.entities.variable)||t(this.entities.literal)||t(this.entities.keyword)))break;if(h instanceof e.Variable)if(t(":"))i=u(this.expression,"expected expression"),c.push({name:h.name,value:i});else{if(t(/^\.{3}/)){c.push({name:h.name,variadic:!0}),k=!0;break}c.push({name:h.name})}else c.push({value:h})}while(t(","));u(")"),t(/^when/)&&(j=u(this.conditions,"expected condition")),g=t(this.block);if(g)return new e.mixin.Definition(a,c,g,j,k);r()}}},entity:function(){return t(this.entities.literal)||t(this.entities.variable)||t(this.entities.url)||t(this.entities.call)||t(this.entities.keyword)||t(this.entities.javascript)||t(this.comment)},end:function(){return t(";")||w("}")},alpha:function(){var a;if(!t(/^\(opacity=/i))return;if(a=t(/^\d+/)||t(this.entities.variable))return u(")"),new e.Alpha(a)},element:function(){var a,b,c,d;c=t(this.combinator),a=t(/^(?:\d+\.\d+|\d+)%/)||t(/^(?:[.#]?|:*)(?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/)||t("*")||t(this.attribute)||t(/^\([^)@]+\)/),a||t("(")&&(d=t(this.entities.variable))&&t(")")&&(a=new e.Paren(d));if(a)return new e.Element(c,a,f);if(c.value&&c.value.charAt(0)==="&")return new e.Element(c,null,f)},combinator:function(){var a,c=b.charAt(f);if(c===">"||c==="+"||c==="~"){f++;while(b.charAt(f)===" ")f++;return new e.Combinator(c)}if(c==="&"){a="&",f++,b.charAt(f)===" "&&(a="& ");while(b.charAt(f)===" ")f++;return new e.Combinator(a)}return b.charAt(f-1)===" "?new e.Combinator(" "):new e.Combinator(null)},selector:function(){var a,c,d=[],g,h;if(t("("))return a=t(this.entity),u(")"),new e.Selector([new e.Element("",a,f)]);while(c=t(this.element)){g=b.charAt(f),d.push(c);if(g==="{"||g==="}"||g===";"||g===",")break}if(d.length>0)return new e.Selector(d)},tag:function(){return t(/^[a-zA-Z][a-zA-Z-]*[0-9]?/)||t("*")},attribute:function(){var a="",b,c,d;if(!t("["))return;if(b=t(/^[a-zA-Z-]+/)||t(this.entities.quoted))(d=t(/^[|~*$^]?=/))&&(c=t(this.entities.quoted)||t(/^[\w-]+/))?a=[b,d,c.toCSS?c.toCSS():c].join(""):a=b;if(!t("]"))return;if(a)return"["+a+"]"},block:function(){var a;if(t("{")&&(a=t(this.primary))&&t("}"))return a},ruleset:function(){var b=[],c,d,g;q();while(c=t(this.selector)){b.push(c),t(this.comment);if(!t(","))break;t(this.comment)}if(b.length>0&&(d=t(this.block)))return new e.Ruleset(b,d,a.strictImports);j=f,r()},rule:function(){var a,c,d=b.charAt(f),h,l;q();if(d==="."||d==="#"||d==="&")return;if(a=t(this.variable)||t(this.property)){a.charAt(0)!="@"&&(l=/^([^@+\/'"*`(;{}-]*);/.exec(k[g]))?(f+=l[0].length-1,c=new e.Anonymous(l[1])):a==="font"?c=t(this.font):c=t(this.value),h=t(this.important);if(c&&t(this.end))return new e.Rule(a,c,h,i);j=f,r()}},"import":function(){var a,b,c=f;if(t(/^@import\s+/)&&(a=t(this.entities.quoted)||t(this.entities.url))){b=t(this.mediaFeatures);if(t(";"))return new e.Import(a,p,b,c)}},mediaFeature:function(){var a,b,c=[];do if(a=t(this.entities.keyword))c.push(a);else if(t("(")){b=t(this.property),a=t(this.entity);if(!t(")"))return null;if(b&&a)c.push(new e.Paren(new e.Rule(b,a,null,f,!0)));else if(a)c.push(new e.Paren(a));else return null}while(a);if(c.length>0)return new e.Expression(c)},mediaFeatures:function(){var a,b=[];do if(a=t(this.mediaFeature)){b.push(a);if(!t(","))break}else if(a=t(this.entities.variable)){b.push(a);if(!t(","))break}while(a);return b.length>0?b:null},media:function(){var a,b;if(t(/^@media/)){a=t(this.mediaFeatures);if(b=t(this.block))return new e.Media(b,a)}},directive:function(){var a,c,d,g,h,i;if(b.charAt(f)!=="@")return;if(c=t(this["import"])||t(this.media))return c;if(a=t(/^@page|@keyframes/)||t(/^@(?:-webkit-|-moz-|-o-|-ms-)[a-z0-9-]+/)){g=(t(/^[^{]+/)||"").trim();if(d=t(this.block))return new e.Directive(a+" "+g,d)}else if(a=t(/^@[-a-z]+/))if(a==="@font-face"){if(d=t(this.block))return new e.Directive(a,d)}else if((c=t(this.entity))&&t(";"))return new e.Directive(a,c)},font:function(){var a=[],b=[],c,d,f,g;while(g=t(this.shorthand)||t(this.entity))b.push(g);a.push(new e.Expression(b));if(t(","))while(g=t(this.expression)){a.push(g);if(!t(","))break}return new e.Value(a)},value:function(){var a,b=[],c;while(a=t(this.expression)){b.push(a);if(!t(","))break}if(b.length>0)return new e.Value(b)},important:function(){if(b.charAt(f)==="!")return t(/^! *important/)},sub:function(){var a;if(t("(")&&(a=t(this.expression))&&t(")"))return a},multiplication:function(){var a,b,c,d;if(a=t(this.operand)){while(!w(/^\/\*/)&&(c=t("/")||t("*"))&&(b=t(this.operand)))d=new e.Operation(c,[d||a,b]);return d||a}},addition:function(){var a,c,d,g;if(a=t(this.multiplication)){while((d=t(/^[-+]\s+/)||b.charAt(f-1)!=" "&&(t("+")||t("-")))&&(c=t(this.multiplication)))g=new e.Operation(d,[g||a,c]);return g||a}},conditions:function(){var a,b,c=f,d;if(a=t(this.condition)){while(t(",")&&(b=t(this.condition)))d=new e.Condition("or",d||a,b,c);return d||a}},condition:function(){var a,b,c,d,g=f,h=!1;t(/^not/)&&(h=!0),u("(");if(a=t(this.addition)||t(this.entities.keyword)||t(this.entities.quoted))return(d=t(/^(?:>=|=<|[<=>])/))?(b=t(this.addition)||t(this.entities.keyword)||t(this.entities.quoted))?c=new e.Condition(d,a,b,g,h):v("expected expression"):c=new e.Condition("=",a,new e.Keyword("true"),g,h),u(")"),t(/^and/)?new e.Condition("and",c,t(this.condition)):c},operand:function(){var a,c=b.charAt(f+1);b.charAt(f)==="-"&&(c==="@"||c==="(")&&(a=t("-"));var d=t(this.sub)||t(this.entities.dimension)||t(this.entities.color)||t(this.entities.variable)||t(this.entities.call);return a?new e.Operation("*",[new e.Dimension(-1),d]):d},expression:function(){var a,b,c=[],d;while(a=t(this.addition)||t(this.entity))c.push(a);if(c.length>0)return new e.Expression(c)},property:function(){var a;if(a=t(/^(\*?-?[-a-z_0-9]+)\s*:/))return a[1]}}}};if(d.mode==="browser"||d.mode==="rhino")d.Parser.importer=function(a,b,c,d){!/^([a-z]+:)?\//.test(a)&&b.length>0&&(a=b[0]+a),n({href:a,title:a,type:d.mime},function(e){e&&typeof d.errback=="function"?d.errback.call(null,a,b,c,d):c.apply(null,arguments)},!0)};(function(a){function b(b){return a.functions.hsla(b.h,b.s,b.l,b.a)}function c(b){if(b instanceof a.Dimension)return parseFloat(b.unit=="%"?b.value/100:b.value);if(typeof b=="number")return b;throw{error:"RuntimeError",message:"color functions take numbers as parameters"}}function d(a){return Math.min(1,Math.max(0,a))}a.functions={rgb:function(a,b,c){return this.rgba(a,b,c,1)},rgba:function(b,d,e,f){var g=[b,d,e].map(function(a){return c(a)}),f=c(f);return new a.Color(g,f)},hsl:function(a,b,c){return this.hsla(a,b,c,1)},hsla:function(a,b,d,e){function h(a){return a=a<0?a+1:a>1?a-1:a,a*6<1?g+(f-g)*a*6:a*2<1?f:a*3<2?g+(f-g)*(2/3-a)*6:g}a=c(a)%360/360,b=c(b),d=c(d),e=c(e);var f=d<=.5?d*(b+1):d+b-d*b,g=d*2-f;return this.rgba(h(a+1/3)*255,h(a)*255,h(a-1/3)*255,e)},hue:function(b){return new a.Dimension(Math.round(b.toHSL().h))},saturation:function(b){return new a.Dimension(Math.round(b.toHSL().s*100),"%")},lightness:function(b){return new a.Dimension(Math.round(b.toHSL().l*100),"%")},alpha:function(b){return new a.Dimension(b.toHSL().a)},saturate:function(a,c){var e=a.toHSL();return e.s+=c.value/100,e.s=d(e.s),b(e)},desaturate:function(a,c){var e=a.toHSL();return e.s-=c.value/100,e.s=d(e.s),b(e)},lighten:function(a,c){var e=a.toHSL();return e.l+=c.value/100,e.l=d(e.l),b(e)},darken:function(a,c){var e=a.toHSL();return e.l-=c.value/100,e.l=d(e.l),b(e)},fadein:function(a,c){var e=a.toHSL();return e.a+=c.value/100,e.a=d(e.a),b(e)},fadeout:function(a,c){var e=a.toHSL();return e.a-=c.value/100,e.a=d(e.a),b(e)},fade:function(a,c){var e=a.toHSL();return e.a=c.value/100,e.a=d(e.a),b(e)},spin:function(a,c){var d=a.toHSL(),e=(d.h+c.value)%360;return d.h=e<0?360+e:e,b(d)},mix:function(b,c,d){var e=d.value/100,f=e*2-1,g=b.toHSL().a-c.toHSL().a,h=((f*g==-1?f:(f+g)/(1+f*g))+1)/2,i=1-h,j=[b.rgb[0]*h+c.rgb[0]*i,b.rgb[1]*h+c.rgb[1]*i,b.rgb[2]*h+c.rgb[2]*i],k=b.alpha*e+c.alpha*(1-e);return new a.Color(j,k)},greyscale:function(b){return this.desaturate(b,new a.Dimension(100))},e:function(b){return new a.Anonymous(b instanceof a.JavaScript?b.evaluated:b)},escape:function(b){return new a.Anonymous(encodeURI(b.value).replace(/=/g,"%3D").replace(/:/g,"%3A").replace(/#/g,"%23").replace(/;/g,"%3B").replace(/\(/g,"%28").replace(/\)/g,"%29"))},"%":function(b){var c=Array.prototype.slice.call(arguments,1),d=b.value;for(var e=0;e<c.length;e++)d=d.replace(/%[sda]/i,function(a){var b=a.match(/s/i)?c[e].value:c[e].toCSS();return a.match(/[A-Z]$/)?encodeURIComponent(b):b});return d=d.replace(/%%/g,"%"),new a.Quoted('"'+d+'"',d)},round:function(a){return this._math("round",a)},ceil:function(a){return this._math("ceil",a)},floor:function(a){return this._math("floor",a)},_math:function(b,d){if(d instanceof a.Dimension)return new a.Dimension(Math[b](c(d)),d.unit);if(typeof d=="number")return Math[b](d);throw{type:"Argument",message:"argument must be a number"}},argb:function(b){return new a.Anonymous(b.toARGB())},percentage:function(b){return new a.Dimension(b.value*100,"%")},color:function(b){if(b instanceof a.Quoted)return new a.Color(b.value.slice(1));throw{type:"Argument",message:"argument must be a string"}},iscolor:function(b){return this._isa(b,a.Color)},isnumber:function(b){return this._isa(b,a.Dimension)},isstring:function(b){return this._isa(b,a.Quoted)},iskeyword:function(b){return this._isa(b,a.Keyword)},isurl:function(b){return this._isa(b,a.URL)},ispixel:function(b){return b instanceof a.Dimension&&b.unit==="px"?a.True:a.False},ispercentage:function(b){return b instanceof a.Dimension&&b.unit==="%"?a.True:a.False},isem:function(b){return b instanceof a.Dimension&&b.unit==="em"?a.True:a.False},_isa:function(b,c){return b instanceof c?a.True:a.False}}})(c("./tree")),function(a){a.colors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}}(c("./tree")),function(a){a.Alpha=function(a){this.value=a},a.Alpha.prototype={toCSS:function(){return"alpha(opacity="+(this.value.toCSS?this.value.toCSS():this.value)+")"},eval:function(a){return this.value.eval&&(this.value=this.value.eval(a)),this}}}(c("../tree")),function(a){a.Anonymous=function(a){this.value=a.value||a},a.Anonymous.prototype={toCSS:function(){return this.value},eval:function(){return this}}}(c("../tree")),function(a){a.Assignment=function(a,b){this.key=a,this.value=b},a.Assignment.prototype={toCSS:function(){return this.key+"="+(this.value.toCSS?this.value.toCSS():this.value)},eval:function(a){return this.value.eval&&(this.value=this.value.eval(a)),this}}}(c("../tree")),function(a){a.Call=function(a,b,c,d){this.name=a,this.args=b,this.index=c,this.filename=d},a.Call.prototype={eval:function(b){var c=this.args.map(function(a){return a.eval(b)});if(!(this.name in a.functions))return new a.Anonymous(this.name+"("+c.map(function(a){return a.toCSS()}).join(", ")+")");try{return a.functions[this.name].apply(a.functions,c)}catch(d){throw{type:d.type||"Runtime",message:"error evaluating function `"+this.name+"`"+(d.message?": "+d.message:""),index:this.index,filename:this.filename}}},toCSS:function(a){return this.eval(a).toCSS()}}}(c("../tree")),function(a){a.Color=function(a,b){Array.isArray(a)?this.rgb=a:a.length==6?this.rgb=a.match(/.{2}/g).map(function(a){return parseInt(a,16)}):this.rgb=a.split("").map(function(a){return parseInt(a+a,16)}),this.alpha=typeof b=="number"?b:1},a.Color.prototype={eval:function(){return this},toCSS:function(){return this.alpha<1?"rgba("+this.rgb.map(function(a){return Math.round(a)}).concat(this.alpha).join(", ")+")":"#"+this.rgb.map(function(a){return a=Math.round(a),a=(a>255?255:a<0?0:a).toString(16),a.length===1?"0"+a:a}).join("")},operate:function(b,c){var d=[];c instanceof a.Color||(c=c.toColor());for(var e=0;e<3;e++)d[e]=a.operate(b,this.rgb[e],c.rgb[e]);return new a.Color(d,this.alpha+c.alpha)},toHSL:function(){var a=this.rgb[0]/255,b=this.rgb[1]/255,c=this.rgb[2]/255,d=this.alpha,e=Math.max(a,b,c),f=Math.min(a,b,c),g,h,i=(e+f)/2,j=e-f;if(e===f)g=h=0;else{h=i>.5?j/(2-e-f):j/(e+f);switch(e){case a:g=(b-c)/j+(b<c?6:0);break;case b:g=(c-a)/j+2;break;case c:g=(a-b)/j+4}g/=6}return{h:g*360,s:h,l:i,a:d}},toARGB:function(){var a=[Math.round(this.alpha*255)].concat(this.rgb);return"#"+a.map(function(a){return a=Math.round(a),a=(a>255?255:a<0?0:a).toString(16),a.length===1?"0"+a:a}).join("")}}}(c("../tree")),function(a){a.Comment=function(a,b){this.value=a,this.silent=!!b},a.Comment.prototype={toCSS:function(a){return a.compress?"":this.value},eval:function(){return this}}}(c("../tree")),function(a){a.Condition=function(a,b,c,d,e){this.op=a.trim(),this.lvalue=b,this.rvalue=c,this.index=d,this.negate=e},a.Condition.prototype.eval=function(a){var b=this.lvalue.eval(a),c=this.rvalue.eval(a),d=this.index,e,e=function(a){switch(a){case"and":return b&&c;case"or":return b||c;default:if(b.compare)e=b.compare(c);else if(c.compare)e=c.compare(b);else throw{type:"Type",message:"Unable to perform comparison",index:d};switch(e){case-1:return a==="<"||a==="=<";case 0:return a==="="||a===">="||a==="=<";case 1:return a===">"||a===">="}}}(this.op);return this.negate?!e:e}}(c("../tree")),function(a){a.Dimension=function(a,b){this.value=parseFloat(a),this.unit=b||null},a.Dimension.prototype={eval:function(){return this},toColor:function(){return new a.Color([this.value,this.value,this.value])},toCSS:function(){var a=this.value+this.unit;return a},operate:function(b,c){return new a.Dimension(a.operate(b,this.value,c.value),this.unit||c.unit)},compare:function(b){return b instanceof a.Dimension?b.value>this.value?-1:b.value<this.value?1:0:-1}}}(c("../tree")),function(a){a.Directive=function(b,c,d){this.name=b,Array.isArray(c)?(this.ruleset=new a.Ruleset([],c),this.ruleset.allowImports=!0):this.value=c},a.Directive.prototype={toCSS:function(a,b){return this.ruleset?(this.ruleset.root=!0,this.name+(b.compress?"{":" {\n ")+this.ruleset.toCSS(a,b).trim().replace(/\n/g,"\n ")+(b.compress?"}":"\n}\n")):this.name+" "+this.value.toCSS()+";\n"},eval:function(a){return a.frames.unshift(this),this.ruleset=this.ruleset&&this.ruleset.eval(a),a.frames.shift(),this},variable:function(b){return a.Ruleset.prototype.variable.call(this.ruleset,b)},find:function(){return a.Ruleset.prototype.find.apply(this.ruleset,arguments)},rulesets:function(){return a.Ruleset.prototype.rulesets.apply(this.ruleset)}}}(c("../tree")),function(a){a.Element=function(b,c,d){this.combinator=b instanceof a.Combinator?b:new a.Combinator(b),typeof c=="string"?this.value=c.trim():c?this.value=c:this.value="",this.index=d},a.Element.prototype.eval=function(b){return new a.Element(this.combinator,this.value.eval?this.value.eval(b):this.value,this.index)},a.Element.prototype.toCSS=function(a){return this.combinator.toCSS(a||{})+(this.value.toCSS?this.value.toCSS(a):this.value)},a.Combinator=function(a){a===" "?this.value=" ":a==="& "?this.value="& ":this.value=a?a.trim():""},a.Combinator.prototype.toCSS=function(a){return{"":""," ":" ","&":"","& ":" ",":":" :","+":a.compress?"+":" + ","~":a.compress?"~":" ~ ",">":a.compress?">":" > "}[this.value]}}(c("../tree")),function(a){a.Expression=function(a){this.value=a},a.Expression.prototype={eval:function(b){return this.value.length>1?new a.Expression(this.value.map(function(a){return a.eval(b)})):this.value.length===1?this.value[0].eval(b):this},toCSS:function(a){return this.value.map(function(b){return b.toCSS?b.toCSS(a):""}).join(" ")}}}(c("../tree")),function(a){a.Import=function(b,c,d,e){var f=this;this.index=e,this._path=b,this.features=d&&new a.Value(d),b instanceof a.Quoted?this.path=/\.(le?|c)ss(\?.*)?$/.test(b.value)?b.value:b.value+".less":this.path=b.value.value||b.value,this.css=/css(\?.*)?$/.test(this.path),this.css||c.push(this.path,function(b,c){b&&(b.index=e),f.root=c||new a.Ruleset([],[])})},a.Import.prototype={toCSS:function(a){var b=this.features?" "+this.features.toCSS(a):"";return this.css?"@import "+this._path.toCSS()+b+";\n":""},eval:function(b){var c,d=this.features&&this.features.eval(b);if(this.css)return this;c=new a.Ruleset([],this.root.rules.slice(0));for(var e=0;e<c.rules.length;e++)c.rules[e]instanceof a.Import&&Array.prototype
-.splice.apply(c.rules,[e,1].concat(c.rules[e].eval(b)));return this.features?new a.Media(c.rules,this.features.value):c.rules}}}(c("../tree")),function(a){a.JavaScript=function(a,b,c){this.escaped=c,this.expression=a,this.index=b},a.JavaScript.prototype={eval:function(b){var c,d=this,e={},f=this.expression.replace(/@\{([\w-]+)\}/g,function(c,e){return a.jsify((new a.Variable("@"+e,d.index)).eval(b))});try{f=new Function("return ("+f+")")}catch(g){throw{message:"JavaScript evaluation error: `"+f+"`",index:this.index}}for(var h in b.frames[0].variables())e[h.slice(1)]={value:b.frames[0].variables()[h].value,toJS:function(){return this.value.eval(b).toCSS()}};try{c=f.call(e)}catch(g){throw{message:"JavaScript evaluation error: '"+g.name+": "+g.message+"'",index:this.index}}return typeof c=="string"?new a.Quoted('"'+c+'"',c,this.escaped,this.index):Array.isArray(c)?new a.Anonymous(c.join(", ")):new a.Anonymous(c)}}}(c("../tree")),function(a){a.Keyword=function(a){this.value=a},a.Keyword.prototype={eval:function(){return this},toCSS:function(){return this.value},compare:function(b){return b instanceof a.Keyword?b.value===this.value?0:1:-1}},a.True=new a.Keyword("true"),a.False=new a.Keyword("false")}(c("../tree")),function(a){a.Media=function(b,c){var d=new a.Element("&",null,0),e=[new a.Selector([d])];this.features=new a.Value(c),this.ruleset=new a.Ruleset(e,b),this.ruleset.allowImports=!0},a.Media.prototype={toCSS:function(a,b){var c=this.features.toCSS(b);return this.ruleset.root=a.length===0||a[0].multiMedia,"@media "+c+(b.compress?"{":" {\n ")+this.ruleset.toCSS(a,b).trim().replace(/\n/g,"\n ")+(b.compress?"}":"\n}\n")},eval:function(b){b.mediaBlocks||(b.mediaBlocks=[],b.mediaPath=[]);var c=b.mediaBlocks.length;b.mediaPath.push(this),b.mediaBlocks.push(this);var d=new a.Media([],[]);return d.features=this.features.eval(b),b.frames.unshift(this.ruleset),d.ruleset=this.ruleset.eval(b),b.frames.shift(),b.mediaBlocks[c]=d,b.mediaPath.pop(),b.mediaPath.length===0?d.evalTop(b):d.evalNested(b)},variable:function(b){return a.Ruleset.prototype.variable.call(this.ruleset,b)},find:function(){return a.Ruleset.prototype.find.apply(this.ruleset,arguments)},rulesets:function(){return a.Ruleset.prototype.rulesets.apply(this.ruleset)},evalTop:function(b){var c=this;if(b.mediaBlocks.length>1){var d=new a.Element("&",null,0),e=[new a.Selector([d])];c=new a.Ruleset(e,b.mediaBlocks),c.multiMedia=!0}return delete b.mediaBlocks,delete b.mediaPath,c},evalNested:function(b){var c,d,e=b.mediaPath.concat([this]);for(c=0;c<e.length;c++)d=e[c].features instanceof a.Value?e[c].features.value:e[c].features,e[c]=Array.isArray(d)?d:[d];return this.features=new a.Value(this.permute(e).map(function(b){b=b.map(function(b){return b.toCSS?b:new a.Anonymous(b)});for(c=b.length-1;c>0;c--)b.splice(c,0,new a.Anonymous("and"));return new a.Expression(b)})),new a.Ruleset([],[])},permute:function(a){if(a.length===0)return[];if(a.length===1)return a[0];var b=[],c=this.permute(a.slice(1));for(var d=0;d<c.length;d++)for(var e=0;e<a[0].length;e++)b.push([a[0][e]].concat(c[d]));return b}}}(c("../tree")),function(a){a.mixin={},a.mixin.Call=function(b,c,d,e,f){this.selector=new a.Selector(b),this.arguments=c,this.index=d,this.filename=e,this.important=f},a.mixin.Call.prototype={eval:function(a){var b,c,d=[],e=!1;for(var f=0;f<a.frames.length;f++)if((b=a.frames[f].find(this.selector)).length>0){c=this.arguments&&this.arguments.map(function(b){return b.eval(a)});for(var g=0;g<b.length;g++)if(b[g].match(c,a))try{Array.prototype.push.apply(d,b[g].eval(a,this.arguments,this.important).rules),e=!0}catch(h){throw{message:h.message,index:this.index,filename:this.filename,stack:h.stack}}if(e)return d;throw{type:"Runtime",message:"No matching definition was found for `"+this.selector.toCSS().trim()+"("+this.arguments.map(function(a){return a.toCSS()}).join(", ")+")`",index:this.index,filename:this.filename}}throw{type:"Name",message:this.selector.toCSS().trim()+" is undefined",index:this.index,filename:this.filename}}},a.mixin.Definition=function(b,c,d,e,f){this.name=b,this.selectors=[new a.Selector([new a.Element(null,b)])],this.params=c,this.condition=e,this.variadic=f,this.arity=c.length,this.rules=d,this._lookups={},this.required=c.reduce(function(a,b){return!b.name||b.name&&!b.value?a+1:a},0),this.parent=a.Ruleset.prototype,this.frames=[]},a.mixin.Definition.prototype={toCSS:function(){return""},variable:function(a){return this.parent.variable.call(this,a)},variables:function(){return this.parent.variables.call(this)},find:function(){return this.parent.find.apply(this,arguments)},rulesets:function(){return this.parent.rulesets.apply(this)},evalParams:function(b,c){var d=new a.Ruleset(null,[]),e;for(var f=0,g,h;f<this.params.length;f++)if(h=this.params[f].name)if(this.params[f].variadic&&c){e=[];for(var i=f;i<c.length;i++)e.push(c[i].eval(b));d.rules.unshift(new a.Rule(h,(new a.Expression(e)).eval(b)))}else if(g=c&&c[f]||this.params[f].value)d.rules.unshift(new a.Rule(h,g.eval(b)));else throw{type:"Runtime",message:"wrong number of arguments for "+this.name+" ("+c.length+" for "+this.arity+")"};return d},eval:function(b,c,d){var e=this.evalParams(b,c),f,g=[],h,i;for(var j=0;j<Math.max(this.params.length,c&&c.length);j++)g.push(c[j]||this.params[j].value);return e.rules.unshift(new a.Rule("@arguments",(new a.Expression(g)).eval(b))),h=d?this.rules.map(function(b){return new a.Rule(b.name,b.value,"!important",b.index)}):this.rules.slice(0),(new a.Ruleset(null,h)).eval({frames:[this,e].concat(this.frames,b.frames)})},match:function(a,b){var c=a&&a.length||0,d,e;if(!this.variadic){if(c<this.required)return!1;if(c>this.params.length)return!1;if(this.required>0&&c>this.params.length)return!1}if(this.condition&&!this.condition.eval({frames:[this.evalParams(b,a)].concat(b.frames)}))return!1;d=Math.min(c,this.arity);for(var f=0;f<d;f++)if(!this.params[f].name&&a[f].eval(b).toCSS()!=this.params[f].value.eval(b).toCSS())return!1;return!0}}}(c("../tree")),function(a){a.Operation=function(a,b){this.op=a.trim(),this.operands=b},a.Operation.prototype.eval=function(b){var c=this.operands[0].eval(b),d=this.operands[1].eval(b),e;if(c instanceof a.Di...
[truncated message content] |
|
From: <os...@us...> - 2013-10-11 12:34:30
|
Revision: 4881
http://sourceforge.net/p/oscss/svn/4881
Author: oscim
Date: 2013-10-11 12:34:27 +0000 (Fri, 11 Oct 2013)
Log Message:
-----------
Fix search in datatype prodcuts for header_tags data
Modified Paths:
--------------
trunk/catalog/common/classes/datatype_drivers/Data_product.php
Modified: trunk/catalog/common/classes/datatype_drivers/Data_product.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_product.php 2013-10-11 08:07:23 UTC (rev 4880)
+++ trunk/catalog/common/classes/datatype_drivers/Data_product.php 2013-10-11 12:34:27 UTC (rev 4881)
@@ -280,14 +280,23 @@
$this->listing_sql['tables'] = " FROM " . TABLE_PRODUCTS . " ".$this->p." ";
$this->listing_sql['tables'] .=" LEFT JOIN " . TABLE_SPECIALS . " s USING(products_id) ";
- if( DataTypes::is_active('manufacturer') )
- $this->listing_sql['tables'] .=" LEFT JOIN " . TABLE_MANUFACTURERS . " m USING(manufacturers_id) ";
$this->listing_sql['tables'] .=" LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd using(products_id) ";
$this->listing_sql['tables'] .=" LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c using(products_id) ";
$this->listing_sql['tables'] .=" LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " pa using(products_id) ";
+ if( DataTypes::is_active('manufacturer') )
+ $this->listing_sql['tables'] .=" LEFT JOIN " . TABLE_MANUFACTURERS . " m USING(manufacturers_id) ";
+/** TODO link to datatype cat */
+ $this->listing_sql['tables'] .= " LEFT JOIN " . TABLE_CATEGORIES . " c ON( p2c.categories_id = c.categories_id ".DataForceStatus(" AND c.categories_status='1' ")." ) ";
+
+
+ // link to header_tags
+ $this->listing_sql['tables'] .=" LEFT JOIN " . TABLE_FULL_TAG . " ft ON ( p.products_id=ft.page_id AND ft.page_type='product' ) ";
+ $this->listing_sql['tables'] .=" LEFT JOIN " . TABLE_FULL_TAG_DESCRIPTION . " ftd ON(ft.tag_id=ftd.tag_id AND ftd.language_id = '" . (int)$languages_id. "' ) ";
+
+
if ( (tep_not_null($pfrom) || tep_not_null($pto)) ) {
if (!tep_session_is_registered('customer_country_id')) {
$customer_country_id = STORE_COUNTRY;
@@ -297,10 +306,6 @@
}
-/** TODO link to datatype cat */
- $this->listing_sql['tables'] .= " LEFT JOIN " . TABLE_CATEGORIES . " c ON( p2c.categories_id = c.categories_id ".DataForceStatus(" AND c.categories_status='1' ")." ) ";
-
-
/// Add search in Extra value
$this->listing_sql['tables'] .= " LEFT JOIN " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " p2pef ON(p2pef.products_id = p.products_id ) ";
@@ -309,7 +314,7 @@
//! WHERE
- $this->listing_sql['where'] = " WHERE ".$this->p."d.language_id = '" . (int)$languages_id . "' ".DataForceStatus(" AND ".$this->p.".products_status > 0 ")." AND ".$this->p.".products_type = '" . (isset($_REQUEST['subtype'])? (int)$_REQUEST['subtype'] : 1) . "' ";
+ $this->listing_sql['where'] = " WHERE ".$this->p."d.language_id = '" . (int)$languages_id . "' ".DataForceStatus(" AND ".$this->p.".products_status > 0 ")." " . (isset($_REQUEST['subtype'])? " AND ".$this->p.".products_type = '".(int)$_REQUEST['subtype']. "' " : '') . " ";
if (isset($_GET['categories_id']) && tep_not_null($_GET['categories_id'])) {
if (isset($_GET['inc_subcat']) && ($_GET['inc_subcat'] == '1')) {
@@ -334,6 +339,7 @@
$this->listing_sql['where'] .= " and m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'";
}
+
if (isset($search_keywords) && (sizeof($search_keywords) > 0)) {
$this->listing_sql['where'] .= " and (";
for ($i=0, $n=sizeof($search_keywords); $i<$n; $i++ ) {
@@ -347,9 +353,13 @@
default:
$keyword = tep_db_prepare_input($search_keywords[$i]);
$this->listing_sql['where'] .= "(pd.products_name like '%" . tep_db_input($keyword) . "%' or p.products_model like '%" . tep_db_input($keyword) . "%' ";
+
if( DataTypes::is_active('manufacturer'))
$this->listing_sql['where'] .= " or m.manufacturers_name like '%" . tep_db_input($keyword) . "%' ";
+ // link to header_tags
+ $this->listing_sql['where'] .= " OR ftd.head_title_tag like '%" . tep_db_input($keyword) . "%' OR ftd.head_keywords_tag like '%" . tep_db_input($keyword) . "%' OR ftd.head_desc_tag like '%" . tep_db_input($keyword) . "%' ";
+
// if (isset($_GET['search_in_description']) && ($_GET['search_in_description'] == '1'))
$this->listing_sql['where'] .= " or pd.products_description like '%" . tep_db_input($keyword) . "%'";
$this->listing_sql['where'] .= ')';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2013-10-11 08:07:26
|
Revision: 4880
http://sourceforge.net/p/oscss/svn/4880
Author: oscim
Date: 2013-10-11 08:07:23 +0000 (Fri, 11 Oct 2013)
Log Message:
-----------
Fix
Modified Paths:
--------------
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php
trunk/catalog/templates/defaut/includes/boxes/recently_viewed.php
Added Paths:
-----------
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/js/less-1.3.3.min.js
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php 2013-10-10 15:52:16 UTC (rev 4879)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php 2013-10-11 08:07:23 UTC (rev 4880)
@@ -57,9 +57,17 @@
<meta name="generator" content="osCSS-2" />
<base href="<?php echo tep_get_httpdir() ; ?>" />
+ <?php if(OSCSS_DEBUG): ?>
+ <script type="text/javascript">
+ var less = {
+ env:"development",
+ dumpLineNumbers:'mediaquery'
+ };
+ </script>
+ <?php endif; ?>
<link rel="stylesheet/less" href="<?php echo 'templates/'.$template.'/Css/'; ?>master.less" type="text/css" />
- <script type="text/javascript" src="<?php echo 'templates/'.$template.'/js/'; ?>less-1.3.0.min.js" ></script>
+ <script type="text/javascript" src="<?php echo 'templates/'.$template.'/js/'; ?>less-1.3.3.min.js" ></script>
<link rel="stylesheet" type="text/css" href="<?php echo 'templates/'.$template.'/'; ?>sample.css" media="screen"/>
<!--[if IE ]>
<link rel="stylesheet" type="text/css" href="<?php echo 'templates/'.$template.'/'; ?>iecss.css" media="screen"/>
Added: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/js/less-1.3.3.min.js
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/js/less-1.3.3.min.js (rev 0)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/js/less-1.3.3.min.js 2013-10-11 08:07:23 UTC (rev 4880)
@@ -0,0 +1,9 @@
+//
+// LESS - Leaner CSS v1.3.3
+// http://lesscss.org
+//
+// Copyright (c) 2009-2013, Alexis Sellier
+// Licensed under the Apache 2.0 License.
+//
+(function(e,t){function n(t){return e.less[t.split("/")[1]]}function f(){r.env==="development"?(r.optimization=0,r.watchTimer=setInterval(function(){r.watchMode&&g(function(e,t,n,r,i){t&&S(t.toCSS(),r,i.lastModified)})},r.poll)):r.optimization=3}function m(){var e=document.getElementsByTagName("style");for(var t=0;t<e.length;t++)e[t].type.match(p)&&(new r.Parser({filename:document.location.href.replace(/#.*$/,""),dumpLineNumbers:r.dumpLineNumbers})).parse(e[t].innerHTML||"",function(n,r){var i=r.toCSS(),s=e[t];s.type="text/css",s.styleSheet?s.styleSheet.cssText=i:s.innerHTML=i})}function g(e,t){for(var n=0;n<r.sheets.length;n++)w(r.sheets[n],e,t,r.sheets.length-(n+1))}function y(e,t){var n=b(e),r=b(t),i,s,o,u,a="";if(n.hostPart!==r.hostPart)return"";s=Math.max(r.directories.length,n.directories.length);for(i=0;i<s;i++)if(r.directories[i]!==n.directories[i])break;u=r.directories.slice(i),o=n.directories.slice(i);for(i=0;i<u.length-1;i++)a+="../";for(i=0;i<o.length-1;i++)a+=o[i]+"/";return a}function b(e,t){var n=/^((?:[a-z-]+:)?\/\/(?:[^\/\?#]*\/)|([\/\\]))?((?:[^\/\\\?#]*[\/\\])*)([^\/\\\?#]*)([#\?].*)?$/,r=e.match(n),i={},s=[],o,u;if(!r)throw new Error("Could not parse sheet href - '"+e+"'");if(!r[1]||r[2]){u=t.match(n);if(!u)throw new Error("Could not parse page url - '"+t+"'");r[1]=u[1],r[2]||(r[3]=u[3]+r[3])}if(r[3]){s=r[3].replace("\\","/").split("/");for(o=0;o<s.length;o++)s[o]===".."&&o>0&&(s.splice(o-1,2),o-=2)}return i.hostPart=r[1],i.directories=s,i.path=r[1]+s.join("/"),i.fileUrl=i.path+(r[4]||""),i.url=i.fileUrl+(r[5]||""),i}function w(t,n,i,s){var o=t.contents||{},u=t.files||{},a=b(t.href,e.location.href),f=a.url,c=l&&l.getItem(f),h=l&&l.getItem(f+":timestamp"),p={css:c,timestamp:h},d;r.relativeUrls?r.rootpath?t.entryPath?d=b(r.rootpath+y(a.path,t.entryPath)).path:d=r.rootpath:d=a.path:r.rootpath?d=r.rootpath:t.entryPath?d=t.entryPath:d=a.path,x(f,t.type,function(e,l){v+=e.replace(/@import .+?;/ig,"");if(!i&&p&&l&&(new Date(l)).valueOf()===(new Date(p.timestamp)).valueOf())S(p.css,t),n(null,null,e,t,{local:!0,remaining:s},f);else try{o[f]=e,(new r.Parser({optimization:r.optimization,paths:[a.path],entryPath:t.entryPath||a.path,mime:t.type,filename:f,rootpath:d,relativeUrls:t.relativeUrls,contents:o,files:u,dumpLineNumbers:r.dumpLineNumbers})).parse(e,function(r,i){if(r)return k(r,f);try{n(r,i,e,t,{local:!1,lastModified:l,remaining:s},f),N(document.getElementById("less-error-message:"+E(f)))}catch(r){k(r,f)}})}catch(c){k(c,f)}},function(e,t){throw new Error("Couldn't load "+t+" ("+e+")")})}function E(e){return e.replace(/^[a-z]+:\/\/?[^\/]+/,"").replace(/^\//,"").replace(/\.[a-zA-Z]+$/,"").replace(/[^\.\w-]+/g,"-").replace(/\./g,":")}function S(e,t,n){var r,i=t.href||"",s="less:"+(t.title||E(i));if((r=document.getElementById(s))===null){r=document.createElement("style"),r.type="text/css",t.media&&(r.media=t.media),r.id=s;var o=t&&t.nextSibling||null;(o||document.getElementsByTagName("head")[0]).parentNode.insertBefore(r,o)}if(r.styleSheet)try{r.styleSheet.cssText=e}catch(u){throw new Error("Couldn't reassign styleSheet.cssText.")}else(function(e){r.childNodes.length>0?r.firstChild.nodeValue!==e.nodeValue&&r.replaceChild(e,r.firstChild):r.appendChild(e)})(document.createTextNode(e));if(n&&l){C("saving "+i+" to cache.");try{l.setItem(i,e),l.setItem(i+":timestamp",n)}catch(u){C("failed to save")}}}function x(e,t,n,i){function a(t,n,r){t.status>=200&&t.status<300?n(t.responseText,t.getResponseHeader("Last-Modified")):typeof r=="function"&&r(t.status,e)}var s=T(),u=o?r.fileAsync:r.async;typeof s.overrideMimeType=="function"&&s.overrideMimeType("text/css"),s.open("GET",e,u),s.setRequestHeader("Accept",t||"text/x-less, text/css; q=0.9, */*; q=0.5"),s.send(null),o&&!r.fileAsync?s.status===0||s.status>=200&&s.status<300?n(s.responseText):i(s.status,e):u?s.onreadystatechange=function(){s.readyState==4&&a(s,n,i)}:a(s,n,i)}function T(){if(e.XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(t){return C("browser doesn't support AJAX."),null}}function N(e){return e&&e.parentNode.removeChild(e)}function C(e){r.env=="development"&&typeof console!="undefined"&&console.log("less: "+e)}function k(e,t){var n="less-error-message:"+E(t),i='<li><label>{line}</label><pre class="{class}">{content}</pre></li>',s=document.createElement("div"),o,u,a=[],f=e.filename||t,l=f.match(/([^\/]+(\?.*)?)$/)[1];s.id=n,s.className="less-error-message",u="<h3>"+(e.message||"There is an error in your .less file")+"</h3>"+'<p>in <a href="'+f+'">'+l+"</a> ";var c=function(e,t,n){e.extract[t]&&a.push(i.replace(/\{line\}/,parseInt(e.line)+(t-1)).replace(/\{class\}/,n).replace(/\{content\}/,e.extract[t]))};e.stack?u+="<br/>"+e.stack.split("\n").slice(1).join("<br/>"):e.extract&&(c(e,0,""),c(e,1,"line"),c(e,2,""),u+="on line "+e.line+", column "+(e.column+1)+":</p>"+"<ul>"+a.join("")+"</ul>"),s.innerHTML=u,S([".less-error-message ul, .less-error-message li {","list-style-type: none;","margin-right: 15px;","padding: 4px 0;","margin: 0;","}",".less-error-message label {","font-size: 12px;","margin-right: 15px;","padding: 4px 0;","color: #cc7777;","}",".less-error-message pre {","color: #dd6666;","padding: 4px 0;","margin: 0;","display: inline-block;","}",".less-error-message pre.line {","color: #ff0000;","}",".less-error-message h3 {","font-size: 20px;","font-weight: bold;","padding: 15px 0 5px 0;","margin: 0;","}",".less-error-message a {","color: #10a","}",".less-error-message .error {","color: red;","font-weight: bold;","padding-bottom: 2px;","border-bottom: 1px dashed red;","}"].join("\n"),{title:"error-message"}),s.style.cssText=["font-family: Arial, sans-serif","border: 1px solid #e00","background-color: #eee","border-radius: 5px","-webkit-border-radius: 5px","-moz-border-radius: 5px","color: #e00","padding: 15px","margin-bottom: 15px"].join(";"),r.env=="development"&&(o=setInterval(function(){document.body&&(document.getElementById(n)?document.body.replaceChild(s,document.getElementById(n)):document.body.insertBefore(s,document.body.firstChild),clearInterval(o))},10))}Array.isArray||(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"||e instanceof Array}),Array.prototype.forEach||(Array.prototype.forEach=function(e,t){var n=this.length>>>0;for(var r=0;r<n;r++)r in this&&e.call(t,this[r],r,this)}),Array.prototype.map||(Array.prototype.map=function(e){var t=this.length>>>0,n=new Array(t),r=arguments[1];for(var i=0;i<t;i++)i in this&&(n[i]=e.call(r,this[i],i,this));return n}),Array.prototype.filter||(Array.prototype.filter=function(e){var t=[],n=arguments[1];for(var r=0;r<this.length;r++)e.call(n,this[r])&&t.push(this[r]);return t}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=this.length>>>0,n=0;if(t===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)var r=arguments[1];else do{if(n in this){r=this[n++];break}if(++n>=t)throw new TypeError}while(!0);for(;n<t;n++)n in this&&(r=e.call(null,r,this[n],n,this));return r}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e){var t=this.length,n=arguments[1]||0;if(!t)return-1;if(n>=t)return-1;n<0&&(n+=t);for(;n<t;n++){if(!Object.prototype.hasOwnProperty.call(this,n))continue;if(e===this[n])return n}return-1}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}),String.prototype.trim||(String.prototype.trim=function(){return String(this).replace(/^\s\s*/,"").replace(/\s\s*$/,"")});var r,i,s;typeof environment=="object"&&{}.toString.call(environment)==="[object Environment]"?(typeof e=="undefined"?r={}:r=e.less={},i=r.tree={},r.mode="rhino"):typeof e=="undefined"?(r=exports,i=n("./tree"),r.mode="node"):(typeof e.less=="undefined"&&(e.less={}),r=e.less,i=e.less.tree={},r.mode="browser"),r.Parser=function(t){function g(){a=c[u],f=o,h=o}function y(){c[u]=a,o=f,h=o}function b(){o>h&&(c[u]=c[u].slice(o-h),h=o)}function w(e){var t=e.charCodeAt(0);return t===32||t===10||t===9}function E(e){var t,n,r,i,a;if(e instanceof Function)return e.call(p.parsers);if(typeof e=="string")t=s.charAt(o)===e?e:null,r=1,b();else{b();if(!(t=e.exec(c[u])))return null;r=t[0].length}if(t)return S(r),typeof t=="string"?t:t.length===1?t[0]:t}function S(e){var t=o,n=u,r=o+c[u].length,i=o+=e;while(o<r){if(!w(s.charAt(o)))break;o++}return c[u]=c[u].slice(e+(o-i)),h=o,c[u].length===0&&u<c.length-1&&u++,t!==o||n!==u}function x(e,t){var n=E(e);if(!!n)return n;T(t||(typeof e=="string"?"expected '"+e+"' got '"+s.charAt(o)+"'":"unexpected token"))}function T(e,t){var n=new Error(e);throw n.index=o,n.type=t||"Syntax",n}function N(e){return typeof e=="string"?s.charAt(o)===e:e.test(c[u])?!0:!1}function C(e,t){return e.filename&&t.filename&&e.filename!==t.filename?p.imports.contents[e.filename]:s}function k(e,t){for(var n=e,r=-1;n>=0&&t.charAt(n)!=="\n";n--)r++;return{line:typeof e=="number"?(t.slice(0,e).match(/\n/g)||"").length:null,column:r}}function L(e){return r.mode==="browser"||r.mode==="rhino"?e.filename:n("path").resolve(e.filename)}function A(e,t,n){return{lineNumber:k(e,t).line+1,fileName:L(n)}}function O(e,t){var n=C(e,t),r=k(e.index,n),i=r.line,s=r.column,o=n.split("\n");this.type=e.type||"Syntax",this.message=e.message,this.filename=e.filename||t.filename,this.index=e.index,this.line=typeof i=="number"?i+1:null,this.callLine=e.call&&k(e.call,n).line+1,this.callExtract=o[k(e.call,n).line],this.stack=e.stack,this.column=s,this.extract=[o[i-1],o[i],o[i+1]]}var s,o,u,a,f,l,c,h,p,d=this,t=t||{};t.contents||(t.contents={}),t.rootpath=t.rootpath||"",t.files||(t.files={});var v=function(){},m=this.imports={paths:t.paths||[],queue:[],files:t.files,contents:t.contents,mime:t.mime,error:null,push:function(e,n){var i=this;this.queue.push(e),r.Parser.importer(e,this.paths,function(t,r,s){i.queue.splice(i.queue.indexOf(e),1);var o=s in i.files;i.files[s]=r,t&&!i.error&&(i.error=t),n(t,r,o),i.queue.length===0&&v(i.error)},t)}};return this.env=t=t||{},this.optimization="optimization"in this.env?this.env.optimization:1,this.env.filename=this.env.filename||null,p={imports:m,parse:function(e,a){var f,d,m,g,y,b,w=[],S,x=null;o=u=h=l=0,s=e.replace(/\r\n/g,"\n"),s=s.replace(/^\uFEFF/,""),c=function(e){var n=0,r=/(?:@\{[\w-]+\}|[^"'`\{\}\/\(\)\\])+/g,i=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,o=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`]|\\.)*)`/g,u=0,a,f=e[0],l;for(var c=0,h,p;c<s.length;){r.lastIndex=c,(a=r.exec(s))&&a.index===c&&(c+=a[0].length,f.push(a[0])),h=s.charAt(c),i.lastIndex=o.lastIndex=c;if(a=o.exec(s))if(a.index===c){c+=a[0].length,f.push(a[0]);continue}if(!l&&h==="/"){p=s.charAt(c+1);if(p==="/"||p==="*")if(a=i.exec(s))if(a.index===c){c+=a[0].length,f.push(a[0]);continue}}switch(h){case"{":if(!l){u++,f.push(h);break};case"}":if(!l){u--,f.push(h),e[++n]=f=[];break};case"(":if(!l){l=!0,f.push(h);break};case")":if(l){l=!1,f.push(h);break};default:f.push(h)}c++}return u!=0&&(x=new O({index:c-1,type:"Parse",message:u>0?"missing closing `}`":"missing opening `{`",filename:t.filename},t)),e.map(function(e){return e.join("")})}([[]]);if(x)return a(x,t);try{f=new i.Ruleset([],E(this.parsers.primary)),f.root=!0}catch(T){return a(new O(T,t))}f.toCSS=function(e){var s,o,u;return function(s,o){var u=[],a;s=s||{},typeof o=="object"&&!Array.isArray(o)&&(o=Object.keys(o).map(function(e){var t=o[e];return t instanceof i.Value||(t instanceof i.Expression||(t=new i.Expression([t])),t=new i.Value([t])),new i.Rule("@"+e,t,!1,0)}),u=[new i.Ruleset(null,o)]);try{var f=e.call(this,{frames:u}).toCSS([],{compress:s.compress||!1,dumpLineNumbers:t.dumpLineNumbers})}catch(l){throw new O(l,t)}if(a=p.imports.error)throw a instanceof O?a:new O(a,t);return s.yuicompress&&r.mode==="node"?n("ycssmin").cssmin(f):s.compress?f.replace(/(\s)+/g,"$1"):f}}(f.eval);if(o<s.length-1){o=l,b=s.split("\n"),y=(s.slice(0,o).match(/\n/g)||"").length+1;for(var N=o,C=-1;N>=0&&s.charAt(N)!=="\n";N--)C++;x={type:"Parse",message:"Syntax Error on line "+y,index:o,filename:t.filename,line:y,column:C,extract:[b[y-2],b[y-1],b[y]]}}this.imports.queue.length>0?v=function(e){e=x||e,e?a(e):a(null,f)}:a(x,f)},parsers:{primary:function(){var e,t=[];while((e=E(this.mixin.definition)||E(this.rule)||E(this.ruleset)||E(this.mixin.call)||E(this.comment)||E(this.directive))||E(/^[\s\n]+/)||E(/^;+/))e&&t.push(e);return t},comment:function(){var e;if(s.charAt(o)!=="/")return;if(s.charAt(o+1)==="/")return new i.Comment(E(/^\/\/.*/),!0);if(e=E(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))return new i.Comment(e)},entities:{quoted:function(){var e,t=o,n;s.charAt(t)==="~"&&(t++,n=!0);if(s.charAt(t)!=='"'&&s.charAt(t)!=="'")return;n&&E("~");if(e=E(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/))return new i.Quoted(e[0],e[1]||e[2],n)},keyword:function(){var e;if(e=E(/^[_A-Za-z-][_A-Za-z0-9-]*/))return i.colors.hasOwnProperty(e)?new i.Color(i.colors[e].slice(1)):new i.Keyword(e)},call:function(){var e,n,r,s,a=o;if(!(e=/^([\w-]+|%|progid:[\w\.]+)\(/.exec(c[u])))return;e=e[1],n=e.toLowerCase();if(n==="url")return null;o+=e.length;if(n==="alpha"){s=E(this.alpha);if(typeof s!="undefined")return s}E("("),r=E(this.entities.arguments);if(!E(")"))return;if(e)return new i.Call(e,r,a,t.filename)},arguments:function(){var e=[],t;while(t=E(this.entities.assignment)||E(this.expression)){e.push(t);if(!E(","))break}return e},literal:function(){return E(this.entities.ratio)||E(this.entities.dimension)||E(this.entities.color)||E(this.entities.quoted)||E(this.entities.unicodeDescriptor)},assignment:function(){var e,t;if((e=E(/^\w+(?=\s?=)/i))&&E("=")&&(t=E(this.entity)))return new i.Assignment(e,t)},url:function(){var e;if(s.charAt(o)!=="u"||!E(/^url\(/))return;return e=E(this.entities.quoted)||E(this.entities.variable)||E(/^(?:(?:\\[\(\)'"])|[^\(\)'"])+/)||"",x(")"),new i.URL(e.value!=null||e instanceof i.Variable?e:new i.Anonymous(e),t.rootpath)},variable:function(){var e,n=o;if(s.charAt(o)==="@"&&(e=E(/^@@?[\w-]+/)))return new i.Variable(e,n,t.filename)},variableCurly:function(){var e,n,r=o;if(s.charAt(o)==="@"&&(n=E(/^@\{([\w-]+)\}/)))return new i.Variable("@"+n[1],r,t.filename)},color:function(){var e;if(s.charAt(o)==="#"&&(e=E(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})/)))return new i.Color(e[1])},dimension:function(){var e,t=s.charCodeAt(o);if(t>57||t<43||t===47||t==44)return;if(e=E(/^([+-]?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn|dpi|dpcm|dppx|rem|vw|vh|vmin|vm|ch)?/))return new i.Dimension(e[1],e[2])},ratio:function(){var e,t=s.charCodeAt(o);if(t>57||t<48)return;if(e=E(/^(\d+\/\d+)/))return new i.Ratio(e[1])},unicodeDescriptor:function(){var e;if(e=E(/^U\+[0-9a-fA-F?]+(\-[0-9a-fA-F?]+)?/))return new i.UnicodeDescriptor(e[0])},javascript:function(){var e,t=o,n;s.charAt(t)==="~"&&(t++,n=!0);if(s.charAt(t)!=="`")return;n&&E("~");if(e=E(/^`([^`]*)`/))return new i.JavaScript(e[1],o,n)}},variable:function(){var e;if(s.charAt(o)==="@"&&(e=E(/^(@[\w-]+)\s*:/)))return e[1]},shorthand:function(){var e,t;if(!N(/^[@\w.%-]+\/[@\w.-]+/))return;g();if((e=E(this.entity))&&E("/")&&(t=E(this.entity)))return new i.Shorthand(e,t);y()},mixin:{call:function(){var e=[],n,r,u=[],a=[],f,l,c,h,p,d,v,m=o,b=s.charAt(o),w,S,C=!1;if(b!=="."&&b!=="#")return;g();while(n=E(/^[#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/))e.push(new i.Element(r,n,o)),r=E(">");if(E("(")){p=[];while(c=E(this.expression)){h=null,S=c;if(c.value.length==1){var k=c.value[0];k instanceof i.Variable&&E(":")&&(p.length>0&&(d&&T("Cannot mix ; and , as delimiter types"),v=!0),S=x(this.expression),h=w=k.name)}p.push(S),a.push({name:h,value:S});if(E(","))continue;if(E(";")||d)v&&T("Cannot mix ; and , as delimiter types"),d=!0,p.length>1&&(S=new i.Value(p)),u.push({name:w,value:S}),w=null,p=[],v=!1}x(")")}f=d?u:a,E(this.important)&&(C=!0);if(e.length>0&&(E(";")||N("}")))return new i.mixin.Call(e,f,m,t.filename,C);y()},definition:function(){var e,t=[],n,r,u,a,f,c=!1;if(s.charAt(o)!=="."&&s.charAt(o)!=="#"||N(/^[^{]*\}/))return;g();if(n=E(/^([#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+)\s*\(/)){e=n[1];do{E(this.comment);if(s.charAt(o)==="."&&E(/^\.{3}/)){c=!0,t.push({variadic:!0});break}if(!(u=E(this.entities.variable)||E(this.entities.literal)||E(this.entities.keyword)))break;if(u instanceof i.Variable)if(E(":"))a=x(this.expression,"expected expression"),t.push({name:u.name,value:a});else{if(E(/^\.{3}/)){t.push({name:u.name,variadic:!0}),c=!0;break}t.push({name:u.name})}else t.push({value:u})}while(E(",")||E(";"));E(")")||(l=o,y()),E(this.comment),E(/^when/)&&(f=x(this.conditions,"expected condition")),r=E(this.block);if(r)return new i.mixin.Definition(e,t,r,f,c);y()}}},entity:function(){return E(this.entities.literal)||E(this.entities.variable)||E(this.entities.url)||E(this.entities.call)||E(this.entities.keyword)||E(this.entities.javascript)||E(this.comment)},end:function(){return E(";")||N("}")},alpha:function(){var e;if(!E(/^\(opacity=/i))return;if(e=E(/^\d+/)||E(this.entities.variable))return x(")"),new i.Alpha(e)},element:function(){var e,t,n,r;n=E(this.combinator),e=E(/^(?:\d+\.\d+|\d+)%/)||E(/^(?:[.#]?|:*)(?:[\w-]|[^\x00-\x9f]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/)||E("*")||E("&")||E(this.attribute)||E(/^\([^()@]+\)/)||E(/^[\.#](?=@)/)||E(this.entities.variableCurly),e||E("(")&&(r=E(this.entities.variableCurly)||E(this.entities.variable)||E(this.selector))&&E(")")&&(e=new i.Paren(r));if(e)return new i.Element(n,e,o)},combinator:function(){var e,t=s.charAt(o);if(t===">"||t==="+"||t==="~"||t==="|"){o++;while(s.charAt(o).match(/\s/))o++;return new i.Combinator(t)}return s.charAt(o-1).match(/\s/)?new i.Combinator(" "):new i.Combinator(null)},selector:function(){var e,t,n=[],r,u;if(E("("))return e=E(this.entity),E(")")?new i.Selector([new i.Element("",e,o)]):null;while(t=E(this.element)){r=s.charAt(o),n.push(t);if(r==="{"||r==="}"||r===";"||r===","||r===")")break}if(n.length>0)return new i.Selector(n)},attribute:function(){var e="",t,n,r;if(!E("["))return;if(t=E(/^(?:[_A-Za-z0-9-]|\\.)+/)||E(this.entities.quoted))(r=E(/^[|~*$^]?=/))&&(n=E(this.entities.quoted)||E(/^[\w-]+/))?e=[t,r,n.toCSS?n.toCSS():n].join(""):e=t;if(!E("]"))return;if(e)return"["+e+"]"},block:function(){var e;if(E("{")&&(e=E(this.primary))&&E("}"))return e},ruleset:function(){var e=[],n,r,u,a;g(),t.dumpLineNumbers&&(a=A(o,s,t));while(n=E(this.selector)){e.push(n),E(this.comment);if(!E(","))break;E(this.comment)}if(e.length>0&&(r=E(this.block))){var f=new i.Ruleset(e,r,t.strictImports);return t.dumpLineNumbers&&(f.debugInfo=a),f}l=o,y()},rule:function(){var e,t,n=s.charAt(o),r,a;g();if(n==="."||n==="#"||n==="&")return;if(e=E(this.variable)||E(this.property)){e.charAt(0)!="@"&&(a=/^([^@+\/'"*`(;{}-]*);/.exec(c[u]))?(o+=a[0].length-1,t=new i.Anonymous(a[1])):e==="font"?t=E(this.font):t=E(this.value),r=E(this.important);if(t&&E(this.end))return new i.Rule(e,t,r,f);l=o,y()}},"import":function(){var e,n,r=o;g();var s=E(/^@import(?:-(once))?\s+/);if(s&&(e=E(this.entities.quoted)||E(this.entities.url))){n=E(this.mediaFeatures);if(E(";"))return new i.Import(e,m,n,s[1]==="once",r,t.rootpath)}y()},mediaFeature:function(){var e,t,n=[];do if(e=E(this.entities.keyword))n.push(e);else if(E("(")){t=E(this.property),e=E(this.entity);if(!E(")"))return null;if(t&&e)n.push(new i.Paren(new i.Rule(t,e,null,o,!0)));else{if(!e)return null;n.push(new i.Paren(e))}}while(e);if(n.length>0)return new i.Expression(n)},mediaFeatures:function(){var e,t=[];do if(e=E(this.mediaFeature)){t.push(e);if(!E(","))break}else if(e=E(this.entities.variable)){t.push(e);if(!E(","))break}while(e);return t.length>0?t:null},media:function(){var e,n,r,u;t.dumpLineNumbers&&(u=A(o,s,t));if(E(/^@media/)){e=E(this.mediaFeatures);if(n=E(this.block))return r=new i.Media(n,e),t.dumpLineNumbers&&(r.debugInfo=u),r}},directive:function(){var e,n,r,u,a,f,l,c,h,p;if(s.charAt(o)!=="@")return;if(n=E(this["import"])||E(this.media))return n;g(),e=E(/^@[a-z-]+/);if(!e)return;l=e,e.charAt(1)=="-"&&e.indexOf("-",2)>0&&(l="@"+e.slice(e.indexOf("-",2)+1));switch(l){case"@font-face":c=!0;break;case"@viewport":case"@top-left":case"@top-left-corner":case"@top-center":case"@top-right":case"@top-right-corner":case"@bottom-left":case"@bottom-left-corner":case"@bottom-center":case"@bottom-right":case"@bottom-right-corner":case"@left-top":case"@left-middle":case"@left-bottom":case"@right-top":case"@right-middle":case"@right-bottom":c=!0;break;case"@page":case"@document":case"@supports":case"@keyframes":c=!0,h=!0;break;case"@namespace":p=!0}h&&(e+=" "+(E(/^[^{]+/)||"").trim());if(c){if(r=E(this.block))return new i.Directive(e,r)}else if((n=p?E(this.expression):E(this.entity))&&E(";")){var d=new i.Directive(e,n);return t.dumpLineNumbers&&(d.debugInfo=A(o,s,t)),d}y()},font:function(){var e=[],t=[],n,r,s,o;while(o=E(this.shorthand)||E(this.entity))t.push(o);e.push(new i.Expression(t));if(E(","))while(o=E(this.expression)){e.push(o);if(!E(","))break}return new i.Value(e)},value:function(){var e,t=[],n;while(e=E(this.expression)){t.push(e);if(!E(","))break}if(t.length>0)return new i.Value(t)},important:function(){if(s.charAt(o)==="!")return E(/^! *important/)},sub:function(){var e;if(E("(")&&(e=E(this.expression))&&E(")"))return e},multiplication:function(){var e,t,n,r;if(e=E(this.operand)){while(!N(/^\/[*\/]/)&&(n=E("/")||E("*"))&&(t=E(this.operand)))r=new i.Operation(n,[r||e,t]);return r||e}},addition:function(){var e,t,n,r;if(e=E(this.multiplication)){while((n=E(/^[-+]\s+/)||!w(s.charAt(o-1))&&(E("+")||E("-")))&&(t=E(this.multiplication)))r=new i.Operation(n,[r||e,t]);return r||e}},conditions:function(){var e,t,n=o,r;if(e=E(this.condition)){while(E(",")&&(t=E(this.condition)))r=new i.Condition("or",r||e,t,n);return r||e}},condition:function(){var e,t,n,r,s=o,u=!1;E(/^not/)&&(u=!0),x("(");if(e=E(this.addition)||E(this.entities.keyword)||E(this.entities.quoted))return(r=E(/^(?:>=|=<|[<=>])/))?(t=E(this.addition)||E(this.entities.keyword)||E(this.entities.quoted))?n=new i.Condition(r,e,t,s,u):T("expected expression"):n=new i.Condition("=",e,new i.Keyword("true"),s,u),x(")"),E(/^and/)?new i.Condition("and",n,E(this.condition)):n},operand:function(){var e,t=s.charAt(o+1);s.charAt(o)==="-"&&(t==="@"||t==="(")&&(e=E("-"));var n=E(this.sub)||E(this.entities.dimension)||E(this.entities.color)||E(this.entities.variable)||E(this.entities.call);return e?new i.Operation("*",[new i.Dimension(-1),n]):n},expression:function(){var e,t,n=[],r;while(e=E(this.addition)||E(this.entity))n.push(e);if(n.length>0)return new i.Expression(n)},property:function(){var e;if(e=E(/^(\*?-?[_a-z0-9-]+)\s*:/))return e[1]}}}};if(r.mode==="browser"||r.mode==="rhino")r.Parser.importer=function(e,t,n,r){!/^([a-z-]+:)?\//.test(e)&&t.length>0&&(e=t[0]+e),w({href:e,title:e,type:r.mime,contents:r.contents,files:r.files,rootpath:r.rootpath,entryPath:r.entryPath,relativeUrls:r.relativeUrls},function(e,i,s,o,u,a){e&&typeof r.errback=="function"?r.errback.call(null,a,t,n,r):n.call(null,e,i,a)},!0)};(function(e){function t(t){return e.functions.hsla(t.h,t.s,t.l,t.a)}function n(t,n){return t instanceof e.Dimension&&t.unit=="%"?parseFloat(t.value*n/100):r(t)}function r(t){if(t instanceof e.Dimension)return parseFloat(t.unit=="%"?t.value/100:t.value);if(typeof t=="number")return t;throw{error:"RuntimeError",message:"color functions take numbers as parameters"}}function i(e){return Math.min(1,Math.max(0,e))}e.functions={rgb:function(e,t,n){return this.rgba(e,t,n,1)},rgba:function(t,i,s,o){var u=[t,i,s].map(function(e){return n(e,256)});return o=r(o),new e.Color(u,o)},hsl:function(e,t,n){return this.hsla(e,t,n,1)},hsla:function(e,t,n,i){function u(e){return e=e<0?e+1:e>1?e-1:e,e*6<1?o+(s-o)*e*6:e*2<1?s:e*3<2?o+(s-o)*(2/3-e)*6:o}e=r(e)%360/360,t=r(t),n=r(n),i=r(i);var s=n<=.5?n*(t+1):n+t-n*t,o=n*2-s;return this.rgba(u(e+1/3)*255,u(e)*255,u(e-1/3)*255,i)},hsv:function(e,t,n){return this.hsva(e,t,n,1)},hsva:function(e,t,n,i){e=r(e)%360/360*360,t=r(t),n=r(n),i=r(i);var s,o;s=Math.floor(e/60%6),o=e/60-s;var u=[n,n*(1-t),n*(1-o*t),n*(1-(1-o)*t)],a=[[0,3,1],[2,0,1],[1,0,3],[1,2,0],[3,1,0],[0,1,2]];return this.rgba(u[a[s][0]]*255,u[a[s][1]]*255,u[a[s][2]]*255,i)},hue:function(t){return new e.Dimension(Math.round(t.toHSL().h))},saturation:function(t){return new e.Dimension(Math.round(t.toHSL().s*100),"%")},lightness:function(t){return new e.Dimension(Math.round(t.toHSL().l*100),"%")},red:function(t){return new e.Dimension(t.rgb[0])},green:function(t){return new e.Dimension(t.rgb[1])},blue:function(t){return new e.Dimension(t.rgb[2])},alpha:function(t){return new e.Dimension(t.toHSL().a)},luma:function(t){return new e.Dimension(Math.round((.2126*(t.rgb[0]/255)+.7152*(t.rgb[1]/255)+.0722*(t.rgb[2]/255))*t.alpha*100),"%")},saturate:function(e,n){var r=e.toHSL();return r.s+=n.value/100,r.s=i(r.s),t(r)},desaturate:function(e,n){var r=e.toHSL();return r.s-=n.value/100,r.s=i(r.s),t(r)},lighten:function(e,n){var r=e.toHSL();return r.l+=n.value/100,r.l=i(r.l),t(r)},darken:function(e,n){var r=e.toHSL();return r.l-=n.value/100,r.l=i(r.l),t(r)},fadein:function(e,n){var r=e.toHSL();return r.a+=n.value/100,r.a=i(r.a),t(r)},fadeout:function(e,n){var r=e.toHSL();return r.a-=n.value/100,r.a=i(r.a),t(r)},fade:function(e,n){var r=e.toHSL();return r.a=n.value/100,r.a=i(r.a),t(r)},spin:function(e,n){var r=e.toHSL(),i=(r.h+n.value)%360;return r.h=i<0?360+i:i,t(r)},mix:function(t,n,r){r||(r=new e.Dimension(50));var i=r.value/100,s=i*2-1,o=t.toHSL().a-n.toHSL().a,u=((s*o==-1?s:(s+o)/(1+s*o))+1)/2,a=1-u,f=[t.rgb[0]*u+n.rgb[0]*a,t.rgb[1]*u+n.rgb[1]*a,t.rgb[2]*u+n.rgb[2]*a],l=t.alpha*i+n.alpha*(1-i);return new e.Color(f,l)},greyscale:function(t){return this.desaturate(t,new e.Dimension(100))},contrast:function(e,t,n,r){return e.rgb?(typeof n=="undefined"&&(n=this.rgba(255,255,255,1)),typeof t=="undefined"&&(t=this.rgba(0,0,0,1)),typeof r=="undefined"?r=.43:r=r.value,(.2126*(e.rgb[0]/255)+.7152*(e.rgb[1]/255)+.0722*(e.rgb[2]/255))*e.alpha<r?n:t):null},e:function(t){return new e.Anonymous(t instanceof e.JavaScript?t.evaluated:t)},escape:function(t){return new e.Anonymous(encodeURI(t.value).replace(/=/g,"%3D").replace(/:/g,"%3A").replace(/#/g,"%23").replace(/;/g,"%3B").replace(/\(/g,"%28").replace(/\)/g,"%29"))},"%":function(t){var n=Array.prototype.slice.call(arguments,1),r=t.value;for(var i=0;i<n.length;i++)r=r.replace(/%[sda]/i,function(e){var t=e.match(/s/i)?n[i].value:n[i].toCSS();return e.match(/[A-Z]$/)?encodeURIComponent(t):t});return r=r.replace(/%%/g,"%"),new e.Quoted('"'+r+'"',r)},unit:function(t,n){return new e.Dimension(t.value,n?n.toCSS():"")},round:function(e,t){var n=typeof t=="undefined"?0:t.value;return this._math(function(e){return e.toFixed(n)},e)},ceil:function(e){return this._math(Math.ceil,e)},floor:function(e){return this._math(Math.floor,e)},_math:function(t,n){if(n instanceof e.Dimension)return new e.Dimension(t(parseFloat(n.value)),n.unit);if(typeof n=="number")return t(n);throw{type:"Argument",message:"argument must be a number"}},argb:function(t){return new e.Anonymous(t.toARGB())},percentage:function(t){return new e.Dimension(t.value*100,"%")},color:function(t){if(t instanceof e.Quoted)return new e.Color(t.value.slice(1));throw{type:"Argument",message:"argument must be a string"}},iscolor:function(t){return this._isa(t,e.Color)},isnumber:function(t){return this._isa(t,e.Dimension)},isstring:function(t){return this._isa(t,e.Quoted)},iskeyword:function(t){return this._isa(t,e.Keyword)},isurl:function(t){return this._isa(t,e.URL)},ispixel:function(t){return t instanceof e.Dimension&&t.unit==="px"?e.True:e.False},ispercentage:function(t){return t instanceof e.Dimension&&t.unit==="%"?e.True:e.False},isem:function(t){return t instanceof e.Dimension&&t.unit==="em"?e.True:e.False},_isa:function(t,n){return t instanceof n?e.True:e.False},multiply:function(e,t){var n=e.rgb[0]*t.rgb[0]/255,r=e.rgb[1]*t.rgb[1]/255,i=e.rgb[2]*t.rgb[2]/255;return this.rgb(n,r,i)},screen:function(e,t){var n=255-(255-e.rgb[0])*(255-t.rgb[0])/255,r=255-(255-e.rgb[1])*(255-t.rgb[1])/255,i=255-(255-e.rgb[2])*(255-t.rgb[2])/255;return this.rgb(n,r,i)},overlay:function(e,t){var n=e.rgb[0]<128?2*e.rgb[0]*t.rgb[0]/255:255-2*(255-e.rgb[0])*(255-t.rgb[0])/255,r=e.rgb[1]<128?2*e.rgb[1]*t.rgb[1]/255:255-2*(255-e.rgb[1])*(255-t.rgb[1])/255,i=e.rgb[2]<128?2*e.rgb[2]*t.rgb[2]/255:255-2*(255-e.rgb[2])*(255-t.rgb[2])/255;return this.rgb(n,r,i)},softlight:function(e,t){var n=t.rgb[0]*e.rgb[0]/255,r=n+e.rgb[0]*(255-(255-e.rgb[0])*(255-t.rgb[0])/255-n)/255;n=t.rgb[1]*e.rgb[1]/255;var i=n+e.rgb[1]*(255-(255-e.rgb[1])*(255-t.rgb[1])/255-n)/255;n=t.rgb[2]*e.rgb[2]/255;var s=n+e.rgb[2]*(255-(255-e.rgb[2])*(255-t.rgb[2])/255-n)/255;return this.rgb(r,i,s)},hardlight:function(e,t){var n=t.rgb[0]<128?2*t.rgb[0]*e.rgb[0]/255:255-2*(255-t.rgb[0])*(255-e.rgb[0])/255,r=t.rgb[1]<128?2*t.rgb[1]*e.rgb[1]/255:255-2*(255-t.rgb[1])*(255-e.rgb[1])/255,i=t.rgb[2]<128?2*t.rgb[2]*e.rgb[2]/255:255-2*(255-t.rgb[2])*(255-e.rgb[2])/255;return this.rgb(n,r,i)},difference:function(e,t){var n=Math.abs(e.rgb[0]-t.rgb[0]),r=Math.abs(e.rgb[1]-t.rgb[1]),i=Math.abs(e.rgb[2]-t.rgb[2]);return this.rgb(n,r,i)},exclusion:function(e,t){var n=e.rgb[0]+t.rgb[0]*(255-e.rgb[0]-e.rgb[0])/255,r=e.rgb[1]+t.rgb[1]*(255-e.rgb[1]-e.rgb[1])/255,i=e.rgb[2]+t.rgb[2]*(255-e.rgb[2]-e.rgb[2])/255;return this.rgb(n,r,i)},average:function(e,t){var n=(e.rgb[0]+t.rgb[0])/2,r=(e.rgb[1]+t.rgb[1])/2,i=(e.rgb[2]+t.rgb[2])/2;return this.rgb(n,r,i)},negation:function(e,t){var n=255-Math.abs(255-t.rgb[0]-e.rgb[0]),r=255-Math.abs(255-t.rgb[1]-e.rgb[1]),i=255-Math.abs(255-t.rgb[2]-e.rgb[2]);return this.rgb(n,r,i)},tint:function(e,t){return this.mix(this.rgb(255,255,255),e,t)},shade:function(e,t){return this.mix(this.rgb(0,0,0),e,t)}}})(n("./tree")),function(e){e.colors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen
+:"#9acd32"}}(n("./tree")),function(e){e.Alpha=function(e){this.value=e},e.Alpha.prototype={toCSS:function(){return"alpha(opacity="+(this.value.toCSS?this.value.toCSS():this.value)+")"},eval:function(e){return this.value.eval&&(this.value=this.value.eval(e)),this}}}(n("../tree")),function(e){e.Anonymous=function(e){this.value=e.value||e},e.Anonymous.prototype={toCSS:function(){return this.value},eval:function(){return this},compare:function(e){if(!e.toCSS)return-1;var t=this.toCSS(),n=e.toCSS();return t===n?0:t<n?-1:1}}}(n("../tree")),function(e){e.Assignment=function(e,t){this.key=e,this.value=t},e.Assignment.prototype={toCSS:function(){return this.key+"="+(this.value.toCSS?this.value.toCSS():this.value)},eval:function(t){return this.value.eval?new e.Assignment(this.key,this.value.eval(t)):this}}}(n("../tree")),function(e){e.Call=function(e,t,n,r){this.name=e,this.args=t,this.index=n,this.filename=r},e.Call.prototype={eval:function(t){var n=this.args.map(function(e){return e.eval(t)}),r;if(this.name in e.functions)try{r=e.functions[this.name].apply(e.functions,n);if(r!=null)return r}catch(i){throw{type:i.type||"Runtime",message:"error evaluating function `"+this.name+"`"+(i.message?": "+i.message:""),index:this.index,filename:this.filename}}return new e.Anonymous(this.name+"("+n.map(function(e){return e.toCSS(t)}).join(", ")+")")},toCSS:function(e){return this.eval(e).toCSS()}}}(n("../tree")),function(e){e.Color=function(e,t){Array.isArray(e)?this.rgb=e:e.length==6?this.rgb=e.match(/.{2}/g).map(function(e){return parseInt(e,16)}):this.rgb=e.split("").map(function(e){return parseInt(e+e,16)}),this.alpha=typeof t=="number"?t:1},e.Color.prototype={eval:function(){return this},toCSS:function(){return this.alpha<1?"rgba("+this.rgb.map(function(e){return Math.round(e)}).concat(this.alpha).join(", ")+")":"#"+this.rgb.map(function(e){return e=Math.round(e),e=(e>255?255:e<0?0:e).toString(16),e.length===1?"0"+e:e}).join("")},operate:function(t,n){var r=[];n instanceof e.Color||(n=n.toColor());for(var i=0;i<3;i++)r[i]=e.operate(t,this.rgb[i],n.rgb[i]);return new e.Color(r,this.alpha+n.alpha)},toHSL:function(){var e=this.rgb[0]/255,t=this.rgb[1]/255,n=this.rgb[2]/255,r=this.alpha,i=Math.max(e,t,n),s=Math.min(e,t,n),o,u,a=(i+s)/2,f=i-s;if(i===s)o=u=0;else{u=a>.5?f/(2-i-s):f/(i+s);switch(i){case e:o=(t-n)/f+(t<n?6:0);break;case t:o=(n-e)/f+2;break;case n:o=(e-t)/f+4}o/=6}return{h:o*360,s:u,l:a,a:r}},toARGB:function(){var e=[Math.round(this.alpha*255)].concat(this.rgb);return"#"+e.map(function(e){return e=Math.round(e),e=(e>255?255:e<0?0:e).toString(16),e.length===1?"0"+e:e}).join("")},compare:function(e){return e.rgb?e.rgb[0]===this.rgb[0]&&e.rgb[1]===this.rgb[1]&&e.rgb[2]===this.rgb[2]&&e.alpha===this.alpha?0:-1:-1}}}(n("../tree")),function(e){e.Comment=function(e,t){this.value=e,this.silent=!!t},e.Comment.prototype={toCSS:function(e){return e.compress?"":this.value},eval:function(){return this}}}(n("../tree")),function(e){e.Condition=function(e,t,n,r,i){this.op=e.trim(),this.lvalue=t,this.rvalue=n,this.index=r,this.negate=i},e.Condition.prototype.eval=function(e){var t=this.lvalue.eval(e),n=this.rvalue.eval(e),r=this.index,i,i=function(e){switch(e){case"and":return t&&n;case"or":return t||n;default:if(t.compare)i=t.compare(n);else{if(!n.compare)throw{type:"Type",message:"Unable to perform comparison",index:r};i=n.compare(t)}switch(i){case-1:return e==="<"||e==="=<";case 0:return e==="="||e===">="||e==="=<";case 1:return e===">"||e===">="}}}(this.op);return this.negate?!i:i}}(n("../tree")),function(e){e.Dimension=function(e,t){this.value=parseFloat(e),this.unit=t||null},e.Dimension.prototype={eval:function(){return this},toColor:function(){return new e.Color([this.value,this.value,this.value])},toCSS:function(){var e=this.value+this.unit;return e},operate:function(t,n){return new e.Dimension(e.operate(t,this.value,n.value),this.unit||n.unit)},compare:function(t){return t instanceof e.Dimension?t.value>this.value?-1:t.value<this.value?1:t.unit&&this.unit!==t.unit?-1:0:-1}}}(n("../tree")),function(e){e.Directive=function(t,n){this.name=t,Array.isArray(n)?(this.ruleset=new e.Ruleset([],n),this.ruleset.allowImports=!0):this.value=n},e.Directive.prototype={toCSS:function(e,t){return this.ruleset?(this.ruleset.root=!0,this.name+(t.compress?"{":" {\n ")+this.ruleset.toCSS(e,t).trim().replace(/\n/g,"\n ")+(t.compress?"}":"\n}\n")):this.name+" "+this.value.toCSS()+";\n"},eval:function(t){var n=this;return this.ruleset&&(t.frames.unshift(this),n=new e.Directive(this.name),n.ruleset=this.ruleset.eval(t),t.frames.shift()),n},variable:function(t){return e.Ruleset.prototype.variable.call(this.ruleset,t)},find:function(){return e.Ruleset.prototype.find.apply(this.ruleset,arguments)},rulesets:function(){return e.Ruleset.prototype.rulesets.apply(this.ruleset)}}}(n("../tree")),function(e){e.Element=function(t,n,r){this.combinator=t instanceof e.Combinator?t:new e.Combinator(t),typeof n=="string"?this.value=n.trim():n?this.value=n:this.value="",this.index=r},e.Element.prototype.eval=function(t){return new e.Element(this.combinator,this.value.eval?this.value.eval(t):this.value,this.index)},e.Element.prototype.toCSS=function(e){var t=this.value.toCSS?this.value.toCSS(e):this.value;return t==""&&this.combinator.value.charAt(0)=="&"?"":this.combinator.toCSS(e||{})+t},e.Combinator=function(e){e===" "?this.value=" ":this.value=e?e.trim():""},e.Combinator.prototype.toCSS=function(e){return{"":""," ":" ",":":" :","+":e.compress?"+":" + ","~":e.compress?"~":" ~ ",">":e.compress?">":" > ","|":e.compress?"|":" | "}[this.value]}}(n("../tree")),function(e){e.Expression=function(e){this.value=e},e.Expression.prototype={eval:function(t){return this.value.length>1?new e.Expression(this.value.map(function(e){return e.eval(t)})):this.value.length===1?this.value[0].eval(t):this},toCSS:function(e){return this.value.map(function(t){return t.toCSS?t.toCSS(e):""}).join(" ")}}}(n("../tree")),function(e){e.Import=function(t,n,r,i,s,o){var u=this;this.once=i,this.index=s,this._path=t,this.features=r&&new e.Value(r),this.rootpath=o,t instanceof e.Quoted?this.path=/(\.[a-z]*$)|([\?;].*)$/.test(t.value)?t.value:t.value+".less":this.path=t.value.value||t.value,this.css=/css([\?;].*)?$/.test(this.path),this.css||n.push(this.path,function(t,n,r){t&&(t.index=s),r&&u.once&&(u.skip=r),u.root=n||new e.Ruleset([],[])})},e.Import.prototype={toCSS:function(e){var t=this.features?" "+this.features.toCSS(e):"";return this.css?(typeof this._path.value=="string"&&!/^(?:[a-z-]+:|\/)/.test(this._path.value)&&(this._path.value=this.rootpath+this._path.value),"@import "+this._path.toCSS()+t+";\n"):""},eval:function(t){var n,r=this.features&&this.features.eval(t);return this.skip?[]:this.css?this:(n=new e.Ruleset([],this.root.rules.slice(0)),n.evalImports(t),this.features?new e.Media(n.rules,this.features.value):n.rules)}}}(n("../tree")),function(e){e.JavaScript=function(e,t,n){this.escaped=n,this.expression=e,this.index=t},e.JavaScript.prototype={eval:function(t){var n,r=this,i={},s=this.expression.replace(/@\{([\w-]+)\}/g,function(n,i){return e.jsify((new e.Variable("@"+i,r.index)).eval(t))});try{s=new Function("return ("+s+")")}catch(o){throw{message:"JavaScript evaluation error: `"+s+"`",index:this.index}}for(var u in t.frames[0].variables())i[u.slice(1)]={value:t.frames[0].variables()[u].value,toJS:function(){return this.value.eval(t).toCSS()}};try{n=s.call(i)}catch(o){throw{message:"JavaScript evaluation error: '"+o.name+": "+o.message+"'",index:this.index}}return typeof n=="string"?new e.Quoted('"'+n+'"',n,this.escaped,this.index):Array.isArray(n)?new e.Anonymous(n.join(", ")):new e.Anonymous(n)}}}(n("../tree")),function(e){e.Keyword=function(e){this.value=e},e.Keyword.prototype={eval:function(){return this},toCSS:function(){return this.value},compare:function(t){return t instanceof e.Keyword?t.value===this.value?0:1:-1}},e.True=new e.Keyword("true"),e.False=new e.Keyword("false")}(n("../tree")),function(e){e.Media=function(t,n){var r=this.emptySelectors();this.features=new e.Value(n),this.ruleset=new e.Ruleset(r,t),this.ruleset.allowImports=!0},e.Media.prototype={toCSS:function(e,t){var n=this.features.toCSS(t);return this.ruleset.root=e.length===0||e[0].multiMedia,"@media "+n+(t.compress?"{":" {\n ")+this.ruleset.toCSS(e,t).trim().replace(/\n/g,"\n ")+(t.compress?"}":"\n}\n")},eval:function(t){t.mediaBlocks||(t.mediaBlocks=[],t.mediaPath=[]);var n=new e.Media([],[]);return this.debugInfo&&(this.ruleset.debugInfo=this.debugInfo,n.debugInfo=this.debugInfo),n.features=this.features.eval(t),t.mediaPath.push(n),t.mediaBlocks.push(n),t.frames.unshift(this.ruleset),n.ruleset=this.ruleset.eval(t),t.frames.shift(),t.mediaPath.pop(),t.mediaPath.length===0?n.evalTop(t):n.evalNested(t)},variable:function(t){return e.Ruleset.prototype.variable.call(this.ruleset,t)},find:function(){return e.Ruleset.prototype.find.apply(this.ruleset,arguments)},rulesets:function(){return e.Ruleset.prototype.rulesets.apply(this.ruleset)},emptySelectors:function(){var t=new e.Element("","&",0);return[new e.Selector([t])]},evalTop:function(t){var n=this;if(t.mediaBlocks.length>1){var r=this.emptySelectors();n=new e.Ruleset(r,t.mediaBlocks),n.multiMedia=!0}return delete t.mediaBlocks,delete t.mediaPath,n},evalNested:function(t){var n,r,i=t.mediaPath.concat([this]);for(n=0;n<i.length;n++)r=i[n].features instanceof e.Value?i[n].features.value:i[n].features,i[n]=Array.isArray(r)?r:[r];return this.features=new e.Value(this.permute(i).map(function(t){t=t.map(function(t){return t.toCSS?t:new e.Anonymous(t)});for(n=t.length-1;n>0;n--)t.splice(n,0,new e.Anonymous("and"));return new e.Expression(t)})),new e.Ruleset([],[])},permute:function(e){if(e.length===0)return[];if(e.length===1)return e[0];var t=[],n=this.permute(e.slice(1));for(var r=0;r<n.length;r++)for(var i=0;i<e[0].length;i++)t.push([e[0][i]].concat(n[r]));return t},bubbleSelectors:function(t){this.ruleset=new e.Ruleset(t.slice(0),[this.ruleset])}}}(n("../tree")),function(e){e.mixin={},e.mixin.Call=function(t,n,r,i,s){this.selector=new e.Selector(t),this.arguments=n,this.index=r,this.filename=i,this.important=s},e.mixin.Call.prototype={eval:function(t){var n,r,i,s=[],o=!1,u,a,f,l,c;i=this.arguments&&this.arguments.map(function(e){return{name:e.name,value:e.value.eval(t)}});for(u=0;u<t.frames.length;u++)if((n=t.frames[u].find(this.selector)).length>0){c=!0;for(a=0;a<n.length;a++){r=n[a],l=!1;for(f=0;f<t.frames.length;f++)if(!(r instanceof e.mixin.Definition)&&r===(t.frames[f].originalRuleset||t.frames[f])){l=!0;break}if(l)continue;if(r.matchArgs(i,t)){if(!r.matchCondition||r.matchCondition(i,t))try{Array.prototype.push.apply(s,r.eval(t,i,this.important).rules)}catch(h){throw{message:h.message,index:this.index,filename:this.filename,stack:h.stack}}o=!0}}if(o)return s}throw c?{type:"Runtime",message:"No matching definition was found for `"+this.selector.toCSS().trim()+"("+(i?i.map(function(e){var t="";return e.name&&(t+=e.name+":"),e.value.toCSS?t+=e.value.toCSS():t+="???",t}).join(", "):"")+")`",index:this.index,filename:this.filename}:{type:"Name",message:this.selector.toCSS().trim()+" is undefined",index:this.index,filename:this.filename}}},e.mixin.Definition=function(t,n,r,i,s){this.name=t,this.selectors=[new e.Selector([new e.Element(null,t)])],this.params=n,this.condition=i,this.variadic=s,this.arity=n.length,this.rules=r,this._lookups={},this.required=n.reduce(function(e,t){return!t.name||t.name&&!t.value?e+1:e},0),this.parent=e.Ruleset.prototype,this.frames=[]},e.mixin.Definition.prototype={toCSS:function(){return""},variable:function(e){return this.parent.variable.call(this,e)},variables:function(){return this.parent.variables.call(this)},find:function(){return this.parent.find.apply(this,arguments)},rulesets:function(){return this.parent.rulesets.apply(this)},evalParams:function(t,n,r,i){var s=new e.Ruleset(null,[]),o,u,a=this.params.slice(0),f,l,c,h,p,d;if(r){r=r.slice(0);for(f=0;f<r.length;f++){u=r[f];if(h=u&&u.name){p=!1;for(l=0;l<a.length;l++)if(!i[l]&&h===a[l].name){i[l]=u.value.eval(t),s.rules.unshift(new e.Rule(h,u.value.eval(t))),p=!0;break}if(p){r.splice(f,1),f--;continue}throw{type:"Runtime",message:"Named argument for "+this.name+" "+r[f].name+" not found"}}}}d=0;for(f=0;f<a.length;f++){if(i[f])continue;u=r&&r[d];if(h=a[f].name)if(a[f].variadic&&r){o=[];for(l=d;l<r.length;l++)o.push(r[l].value.eval(t));s.rules.unshift(new e.Rule(h,(new e.Expression(o)).eval(t)))}else{c=u&&u.value;if(c)c=c.eval(t);else{if(!a[f].value)throw{type:"Runtime",message:"wrong number of arguments for "+this.name+" ("+r.length+" for "+this.arity+")"};c=a[f].value.eval(n)}s.rules.unshift(new e.Rule(h,c)),i[f]=c}if(a[f].variadic&&r)for(l=d;l<r.length;l++)i[l]=r[l].value.eval(t);d++}return s},eval:function(t,n,r){var i=[],s=this.frames.concat(t.frames),o=this.evalParams(t,{frames:s},n,i),u,a,f,l;return o.rules.unshift(new e.Rule("@arguments",(new e.Expression(i)).eval(t))),a=r?this.parent.makeImportant.apply(this).rules:this.rules.slice(0),l=(new e.Ruleset(null,a)).eval({frames:[this,o].concat(s)}),l.originalRuleset=this,l},matchCondition:function(e,t){return this.condition&&!this.condition.eval({frames:[this.evalParams(t,{frames:this.frames.concat(t.frames)},e,[])].concat(t.frames)})?!1:!0},matchArgs:function(e,t){var n=e&&e.length||0,r,i;if(!this.variadic){if(n<this.required)return!1;if(n>this.params.length)return!1;if(this.required>0&&n>this.params.length)return!1}r=Math.min(n,this.arity);for(var s=0;s<r;s++)if(!this.params[s].name&&!this.params[s].variadic&&e[s].value.eval(t).toCSS()!=this.params[s].value.eval(t).toCSS())return!1;return!0}}}(n("../tree")),function(e){e.Operation=function(e,t){this.op=e.trim(),this.operands=t},e.Operation.prototype.eval=function(t){var n=this.operands[0].eval(t),r=this.operands[1].eval(t),i;if(n instanceof e.Dimension&&r instanceof e.Color){if(this.op!=="*"&&this.op!=="+")throw{name:"OperationError",message:"Can't substract or divide a color from a number"};i=r,r=n,n=i}if(!n.operate)throw{name:"OperationError",message:"Operation on an invalid type"};return n.operate(this.op,r)},e.operate=function(e,t,n){switch(e){case"+":return t+n;case"-":return t-n;case"*":return t*n;case"/":return t/n}}}(n("../tree")),function(e){e.Paren=function(e){this.value=e},e.Paren.prototype={toCSS:function(e){return"("+this.value.toCSS(e)+")"},eval:function(t){return new e.Paren(this.value.eval(t))}}}(n("../tree")),function(e){e.Quoted=function(e,t,n,r){this.escaped=n,this.value=t||"",this.quote=e.charAt(0),this.index=r},e.Quoted.prototype={toCSS:function(){return this.escaped?this.value:this.quote+this.value+this.quote},eval:function(t){var n=this,r=this.value.replace(/`([^`]+)`/g,function(r,i){return(new e.JavaScript(i,n.index,!0)).eval(t).value}).replace(/@\{([\w-]+)\}/g,function(r,i){var s=(new e.Variable("@"+i,n.index)).eval(t);return s instanceof e.Quoted?s.value:s.toCSS()});return new e.Quoted(this.quote+r+this.quote,r,this.escaped,this.index)},compare:function(e){if(!e.toCSS)return-1;var t=this.toCSS(),n=e.toCSS();return t===n?0:t<n?-1:1}}}(n("../tree")),function(e){e.Ratio=function(e){this.value=e},e.Ratio.prototype={toCSS:function(e){return this.value},eval:function(){return this}}}(n("../tree")),function(e){e.Rule=function(t,n,r,i,s){this.name=t,this.value=n instanceof e.Value?n:new e.Value([n]),this.important=r?" "+r.trim():"",this.index=i,this.inline=s||!1,t.charAt(0)==="@"?this.variable=!0:this.variable=!1},e.Rule.prototype.toCSS=function(e){return this.variable?"":this.name+(e.compress?":":": ")+this.value.toCSS(e)+this.important+(this.inline?"":";")},e.Rule.prototype.eval=function(t){return new e.Rule(this.name,this.value.eval(t),this.important,this.index,this.inline)},e.Rule.prototype.makeImportant=function(){return new e.Rule(this.name,this.value,"!important",this.index,this.inline)},e.Shorthand=function(e,t){this.a=e,this.b=t},e.Shorthand.prototype={toCSS:function(e){return this.a.toCSS(e)+"/"+this.b.toCSS(e)},eval:function(){return this}}}(n("../tree")),function(e){e.Ruleset=function(e,t,n){this.selectors=e,this.rules=t,this._lookups={},this.strictImports=n},e.Ruleset.prototype={eval:function(t){var n=this.selectors&&this.selectors.map(function(e){return e.eval(t)}),r=new e.Ruleset(n,this.rules.slice(0),this.strictImports),i;r.originalRuleset=this,r.root=this.root,r.allowImports=this.allowImports,this.debugInfo&&(r.debugInfo=this.debugInfo),t.frames.unshift(r),(r.root||r.allowImports||!r.strictImports)&&r.evalImports(t);for(var s=0;s<r.rules.length;s++)r.rules[s]instanceof e.mixin.Definition&&(r.rules[s].frames=t.frames.slice(0));var o=t.mediaBlocks&&t.mediaBlocks.length||0;for(var s=0;s<r.rules.length;s++)r.rules[s]instanceof e.mixin.Call&&(i=r.rules[s].eval(t),r.rules.splice.apply(r.rules,[s,1].concat(i)),s+=i.length-1,r.resetCache());for(var s=0,u;s<r.rules.length;s++)u=r.rules[s],u instanceof e.mixin.Definition||(r.rules[s]=u.eval?u.eval(t):u);t.frames.shift();if(t.mediaBlocks)for(var s=o;s<t.mediaBlocks.length;s++)t.mediaBlocks[s].bubbleSelectors(n);return r},evalImports:function(t){var n,r;for(n=0;n<this.rules.length;n++)this.rules[n]instanceof e.Import&&(r=this.rules[n].eval(t),typeof r.length=="number"?(this.rules.splice.apply(this.rules,[n,1].concat(r)),n+=r.length-1):this.rules.splice(n,1,r),this.resetCache())},makeImportant:function(){return new e.Ruleset(this.selectors,this.rules.map(function(e){return e.makeImportant?e.makeImportant():e}),this.strictImports)},matchArgs:function(e){return!e||e.length===0},resetCache:function(){this._rulesets=null,this._variables=null,this._lookups={}},variables:function(){return this._variables?this._variables:this._variables=this.rules.reduce(function(t,n){return n instanceof e.Rule&&n.variable===!0&&(t[n.name]=n),t},{})},variable:function(e){return this.variables()[e]},rulesets:function(){return this._rulesets?this._rulesets:this._rulesets=this.rules.filter(function(t){return t instanceof e.Ruleset||t instanceof e.mixin.Definition})},find:function(t,n){n=n||this;var r=[],i,s,o=t.toCSS();return o in this._lookups?this._lookups[o]:(this.rulesets().forEach(function(i){if(i!==n)for(var o=0;o<i.selectors.length;o++)if(s=t.match(i.selectors[o])){t.elements.length>i.selectors[o].elements.length?Array.prototype.push.apply(r,i.find(new e.Selector(t.elements.slice(1)),n)):r.push(i);break}}),this._lookups[o]=r)},toCSS:function(t,n){var r=[],i=[],s=[],o=[],u=[],a,f,l;this.root||this.joinSelectors(u,t,this.selectors);for(var c=0;c<this.rules.length;c++){l=this.rules[c];if(l.rules||l instanceof e.Media)o.push(l.toCSS(u,n));else if(l instanceof e.Directive){var h=l.toCSS(u,n);if(l.name==="@charset"){if(n.charset){l.debugInfo&&(o.push(e.debugInfo(n,l)),o.push((new e.Comment("/* "+h.replace(/\n/g,"")+" */\n")).toCSS(n)));continue}n.charset=!0}o.push(h)}else l instanceof e.Comment?l.silent||(this.root?o.push(l.toCSS(n)):i.push(l.toCSS(n))):l.toCSS&&!l.variable?i.push(l.toCSS(n)):l.value&&!l.variable&&i.push(l.value.toString())}o=o.join("");if(this.root)r.push(i.join(n.compress?"":"\n"));else if(i.length>0){f=e.debugInfo(n,this),a=u.map(function(e){return e.map(function(e){return e.toCSS(n)}).join("").trim()}).join(n.compress?",":",\n");for(var c=i.length-1;c>=0;c--)s.indexOf(i[c])===-1&&s.unshift(i[c]);i=s,r.push(f+a+(n.compress?"{":" {\n ")+i.join(n.compress?"":"\n ")+(n.compress?"}":"\n}\n"))}return r.push(o),r.join("")+(n.compress?"\n":"")},joinSelectors:function(e,t,n){for(var r=0;r<n.length;r++)this.joinSelector(e,t,n[r])},joinSelector:function(t,n,r){var i,s,o,u,a,f,l,c,h,p,d,v,m,g,y;for(i=0;i<r.elements.length;i++)f=r.elements[i],f.value==="&"&&(u=!0);if(!u){if(n.length>0)for(i=0;i<n.length;i++)t.push(n[i].concat(r));else t.push([r]);return}g=[],a=[[]];for(i=0;i<r.elements.length;i++){f=r.elements[i];if(f.value!=="&")g.push(f);else{y=[],g.length>0&&this.mergeElementsOnToSelectors(g,a);for(s=0;s<a.length;s++){l=a[s];if(n.length==0)l.length>0&&(l[0].elements=l[0].elements.slice(0),l[0].elements.push(new e.Element(f.combinator,"",0))),y.push(l);else for(o=0;o<n.length;o++)c=n[o],h=[],p=[],v=!0,l.length>0?(h=l.slice(0),m=h.pop(),d=new e.Selector(m.elements.slice(0)),v=!1):d=new e.Selector([]),c.length>1&&(p=p.concat(c.slice(1))),c.length>0&&(v=!1,d.elements.push(new e.Element(f.combinator,c[0].elements[0].value,0)),d.elements=d.elements.concat(c[0].elements.slice(1))),v||h.push(d),h=h.concat(p),y.push(h)}a=y,g=[]}}g.length>0&&this.mergeElementsOnToSelectors(g,a);for(i=0;i<a.length;i++)t.push(a[i])},mergeElementsOnToSelectors:function(t,n){var r,i;if(n.length==0){n.push([new e.Selector(t)]);return}for(r=0;r<n.length;r++)i=n[r],i.length>0?i[i.length-1]=new e.Selector(i[i.length-1].elements.concat(t)):i.push(new e.Selector(t))}}}(n("../tree")),function(e){e.Selector=function(e){this.elements=e},e.Selector.prototype.match=function(e){var t=this.elements,n=t.length,r,i,s,o;r=e.elements.slice(e.elements.length&&e.elements[0].value==="&"?1:0),i=r.length,s=Math.min(n,i);if(i===0||n<i)return!1;for(o=0;o<s;o++)if(t[o].value!==r[o].value)return!1;return!0},e.Selector.prototype.eval=function(t){return new e.Selector(this.elements.map(function(e){return e.eval(t)}))},e.Selector.prototype.toCSS=function(e){return this._css?this._css:(this.elements[0].combinator.value===""?this._css=" ":this._css="",this._css+=this.elements.map(function(t){return typeof t=="string"?" "+t.trim():t.toCSS(e)}).join(""),this._css)}}(n("../tree")),function(e){e.UnicodeDescriptor=function(e){this.value=e},e.UnicodeDescriptor.prototype={toCSS:function(e){return this.value},eval:function(){return this}}}(n("../tree")),function(e){e.URL=function(e,t){this.value=e,this.rootpath=t},e.URL.prototype={toCSS:function(){return"url("+this.value.toCSS()+")"},eval:function(t){var n=this.value.eval(t),r;return typeof n.value=="string"&&!/^(?:[a-z-]+:|\/)/.test(n.value)&&(r=this.rootpath,n.quote||(r=r.replace(/[\(\)'"\s]/g,function(e){return"\\"+e})),n.value=r+n.value),new e.URL(n,this.rootpath)}}}(n("../tree")),function(e){e.Value=function(e){this.value=e,this.is="value"},e.Value.prototype={eval:function(t){return this.value.length===1?this.value[0].eval(t):new e.Value(this.value.map(function(e){return e.eval(t)}))},toCSS:function(e){return this.value.map(function(t){return t.toCSS(e)}).join(e.compress?",":", ")}}}(n("../tree")),function(e){e.Variable=function(e,t,n){this.name=e,this.index=t,this.file=n},e.Variable.prototype={eval:function(t){var n,r,i=this.name;i.indexOf("@@")==0&&(i="@"+(new e.Variable(i.slice(1))).eval(t).value);if(this.evaluating)throw{type:"Name",message:"Recursive variable definition for "+i,filename:this.file,index:this.index};this.evaluating=!0;if(n=e.find(t.frames,function(e){if(r=e.variable(i))return r.value.eval(t)}))return this.evaluating=!1,n;throw{type:"Name",message:"variable "+i+" is undefined",filename:this.file,index:this.index}}}}(n("../tree")),function(e){e.debugInfo=function(t,n){var r="";if(t.dumpLineNumbers&&!t.compress)switch(t.dumpLineNumbers){case"comments":r=e.debugInfo.asComment(n);break;case"mediaquery":r=e.debugInfo.asMediaQuery(n);break;case"all":r=e.debugInfo.asComment(n)+e.debugInfo.asMediaQuery(n)}return r},e.debugInfo.asComment=function(e){return"/* line "+e.debugInfo.lineNumber+", "+e.debugInfo.fileName+" */\n"},e.debugInfo.asMediaQuery=function(e){return"@media -sass-debug-info{filename{font-family:"+("file://"+e.debugInfo.fileName).replace(/[\/:.]/g,"\\$&")+"}line{font-family:\\00003"+e.debugInfo.lineNumber+"}}\n"},e.find=function(e,t){for(var n=0,r;n<e.length;n++)if(r=t.call(e,e[n]))return r;return null},e.jsify=function(e){return Array.isArray(e.value)&&e.value.length>1?"["+e.value.map(function(e){return e.toCSS(!1)}).join(", ")+"]":e.toCSS(!1)}}(n("./tree"));var o=/^(file|chrome(-extension)?|resource|qrc|app):/.test(location.protocol);r.env=r.env||(location.hostname=="127.0.0.1"||location.hostname=="0.0.0.0"||location.hostname=="localhost"||location.port.length>0||o?"development":"production"),r.async=r.async||!1,r.fileAsync=r.fileAsync||!1,r.poll=r.poll||(o?1e3:1500);if(r.functions)for(var u in r.functions)r.tree.functions[u]=r.functions[u];var a=/!dumpLineNumbers:(comments|mediaquery|all)/.exec(location.hash);a&&(r.dumpLineNumbers=a[1]),r.watch=function(){return r.watchMode||(r.env="development",f()),this.watchMode=!0},r.unwatch=function(){return clearInterval(r.watchTimer),this.watchMode=!1},/!watch/.test(location.hash)&&r.watch();var l=null;if(r.env!="development")try{l=typeof e.localStorage=="undefined"?null:e.localStorage}catch(c){}var h=document.getElementsByTagName("link"),p=/^text\/(x-)?less$/;r.sheets=[];for(var d=0;d<h.length;d++)(h[d].rel==="stylesheet/less"||h[d].rel.match(/stylesheet/)&&h[d].type.match(p))&&r.sheets.push(h[d]);var v="";r.modifyVars=function(e){var t=v;for(name in e)t+=(name.slice(0,1)==="@"?"":"@")+name+": "+(e[name].slice(-1)===";"?e[name]:e[name]+";");(new r.Parser).parse(t,function(e,t){S(t.toCSS(),r.sheets[r.sheets.length-1])})},r.refresh=function(e){var t,n;t=n=new Date,g(function(e,r,i,s,o){o.local?C("loading "+s.href+" from cache."):(C("parsed "+s.href+" successfully."),S(r.toCSS(),s,o.lastModified)),C("css for "+s.href+" generated in "+(new Date-n)+"ms"),o.remaining===0&&C("css generated in "+(new Date-t)+"ms"),n=new Date},e),m()},r.refreshStyles=m,r.refresh(r.env==="development"),typeof define=="function"&&define.amd&&define("less",[],function(){return r})})(window);
\ No newline at end of file
Modified: trunk/catalog/templates/defaut/includes/boxes/recently_viewed.php
===================================================================
--- trunk/catalog/templates/defaut/includes/boxes/recently_viewed.php 2013-10-10 15:52:16 UTC (rev 4879)
+++ trunk/c...
[truncated message content] |