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...> - 2012-08-26 08:24:22
|
Revision: 4595
http://oscss.svn.sourceforge.net/oscss/?rev=4595&view=rev
Author: oscim
Date: 2012-08-26 08:24:16 +0000 (Sun, 26 Aug 2012)
Log Message:
-----------
coquille
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/boxes/07_catalog.php
Modified: branches/2.1.1/catalog/admin/includes/boxes/07_catalog.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/boxes/07_catalog.php 2012-08-26 08:22:28 UTC (rev 4594)
+++ branches/2.1.1/catalog/admin/includes/boxes/07_catalog.php 2012-08-26 08:24:16 UTC (rev 4595)
@@ -19,15 +19,4 @@
if(_cst_bool('STOCK_CHECK'))
$tabl_link[]= array(FILENAME_STOCK, 'BOX_CATALOG_STOCK', 'stock', @$img['stock']);
- $tabl_link[]= array(FILENAME_SPECIALS, 'BOX_CATALOG_SPECIALS', 'specials', @$img['specials']);
-define('BOX_CATALOG_SPECIALS', 'Promotion');
-
- if(DataTypes::is_active('manufacturer'))
- $tabl_link[]= array(FILENAME_MANUFACTURERS, 'BOX_MANUFACTURERS', 'manufacturers', @$img['manufacturers']);
-// define('FILENAME_MANUFACTURERS', 'manufacturers.php');
-define('BOX_MANUFACTURERS', 'Manufacturers');
-
-/* Begin CUSTOMERS_GROUPS_stable - installed by osCSS installer */
-$tabl_link[]= array(FILENAME_CUSTOMERS_GROUPS, 'BOX_CUSTOMERS_CUSTOMERS_GROUP', 'customers',@$img['customers']);
-/* End CUSTOMERS_GROUPS_stable - installed by osCSS installer */
?>
\ 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...> - 2012-08-26 08:22:35
|
Revision: 4594
http://oscss.svn.sourceforge.net/oscss/?rev=4594&view=rev
Author: oscim
Date: 2012-08-26 08:22:28 +0000 (Sun, 26 Aug 2012)
Log Message:
-----------
Add text informations for confirm ajax action
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/newsletters.txt
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/newslettersModeles.txt
branches/2.1.1/catalog/admin/includes/modules/pages/featureds.php
branches/2.1.1/catalog/admin/includes/modules/pages/newsletters.php
branches/2.1.1/catalog/admin/includes/modules/pages/newslettersModeles.php
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt 2012-08-26 07:48:15 UTC (rev 4593)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/featureds.txt 2012-08-26 08:22:28 UTC (rev 4594)
@@ -29,6 +29,9 @@
$lang['@featureds table heading key'] = "Clef" ;
$lang['table heading action'] = "Action" ;
+ /* alert */
+ $lang['@featureds update status']="Changement de l'état de cette mise en avant" ;
+
/* bouton */
$lang['@featureds image add featureds'] = "Ajouter une entrée" ;
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/newsletters.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/newsletters.txt 2012-08-26 07:48:15 UTC (rev 4593)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/newsletters.txt 2012-08-26 08:22:28 UTC (rev 4594)
@@ -38,6 +38,9 @@
$lang['error edit unlocked newsletter']="Erreur : Merci de fermer le bulletin d'informations avant de l'éditer.";
$lang['error send unlocked newsletter']="Erreur : Merci de fermer le bulletin d'informations avant de l'envoyer.";
+ /* alert */
+ $lang['@newsletters update lock']="Changement du verrouillage de ce bulletin; Envoi activé" ;
+ $lang['@newsletters update unlock']="Changement du verrouillage de ce bulletin; Envoi désactivé" ;
/* inline */
$lang['text info number send number count']="nbr envoyé / nbr d'envoi :";
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/newslettersModeles.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/newslettersModeles.txt 2012-08-26 07:48:15 UTC (rev 4593)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/newslettersModeles.txt 2012-08-26 08:22:28 UTC (rev 4594)
@@ -63,4 +63,7 @@
$lang['text tpl aucun']="aucun" ;
$lang['err txt email off']="Le service est désactivé dans la configuration de votre boutique" ;
$lang['err txt email txt strict']="Le service d'Email au format html est désactivé, tous les Emails seront envoyés au format texte" ;
+
+ /* alert */
+ $lang['@newslettersModeles update status']="Changement de l'état du modèle" ;
?>
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/featureds.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/featureds.php 2012-08-26 07:48:15 UTC (rev 4593)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/featureds.php 2012-08-26 08:22:28 UTC (rev 4594)
@@ -324,6 +324,8 @@
}
}
+ $messageStack->add(__('@featureds update status'), 'success');
+
if(!isset($_GET['forceajax']))
tep_redirect(tep_href_link(self::FILENAME, 'cID=' . $_GET['cID']));
break;
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/newsletters.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/newsletters.php 2012-08-26 07:48:15 UTC (rev 4593)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/newsletters.php 2012-08-26 08:22:28 UTC (rev 4594)
@@ -84,10 +84,12 @@
case 'lock':
case 'unlock':
$newsletter_id = tep_db_prepare_input($_GET['nID']);
- $status = ((self::$action == 'lock') ? '1' : '0');
+ $locked = ((self::$action == 'lock') ? '1' : '0');
- $DB->query("update " . TABLE_NEWSLETTERS . " set locked = '" . $status . "' where newsletters_id = '" . (int)$newsletter_id . "'");
+ $DB->query("update " . TABLE_NEWSLETTERS . " set locked = '" . $locked . "' where newsletters_id = '" . (int)$newsletter_id . "'");
+ $messageStack->add(__('@newsletters update '.self::$action), 'success');
+
if(!isset($_GET['forceajax']))
tep_redirect(tep_href_link(self::FILENAME, 'nID=' . $_GET['nID']));
break;
@@ -218,7 +220,8 @@
*/
case 'lock':
case 'unlock':
- return self::get_item_locked(array('locked'=>(int)$_GET['lock'], 'newsletters_id'=>(int)$_GET['nID']));
+ $locked = ((self::$action == 'lock') ? '1' : '0');
+ return self::get_item_locked(array('locked'=>$locked,'status'=>(int)$_GET['status'], 'newsletters_id'=>(int)$_GET['nID']));
break;
/**
@@ -303,15 +306,23 @@
}
+ /**
+ @brief Construct html for col locked , and display button for change
+ @param $newsletters array (
+ newsletters_id => id int
+ locked=> locked flag int 0/1
+ status=>status flag int 0/1/2
+ )
+ */
private static function get_item_locked($newsletters){
if ($newsletters['locked'] > 0){
if (@$newsletters['status'] ==2 )
- return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, 'nID=' . $newsletters['newsletters_id'] . '&action=archive') . '">' . tep_image(DIR_WS_ICONS .'locked.gif', __('txt exec archive')) . '</a>';
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, 'nID=' . $newsletters['newsletters_id'] . '&action=archive'. '&status='.@$newsletters['status']) . '">' . tep_image(DIR_WS_ICONS .'locked.gif', __('txt exec archive')) . '</a>';
else
- return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, 'nID=' . $newsletters['newsletters_id'] . '&action=unlock') . '">' . tep_image(DIR_WS_ICONS .'locked.gif', ICON_LOCKED) . '</a>';
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, 'nID=' . $newsletters['newsletters_id'] . '&action=unlock'. '&status='.@$newsletters['status']) . '">' . tep_image(DIR_WS_ICONS .'locked.gif', ICON_LOCKED) . '</a>';
}
else
- return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, 'nID=' . $newsletters['newsletters_id'] . '&action=lock') . '">' . tep_image(DIR_WS_ICONS .'unlocked.gif', ICON_UNLOCKED) . '</a>';
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, 'nID=' . $newsletters['newsletters_id'] . '&action=lock'. '&status='.@$newsletters['status']) . '">' . tep_image(DIR_WS_ICONS .'unlocked.gif', ICON_UNLOCKED) . '</a>';
}
private static function get_item_status($newsletters){
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/newslettersModeles.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/newslettersModeles.php 2012-08-26 07:48:15 UTC (rev 4593)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/newslettersModeles.php 2012-08-26 08:22:28 UTC (rev 4594)
@@ -84,6 +84,8 @@
$DB->query("update " . TABLE_NEWSLETTERS_MODELES . " set status = '" .(int) $_GET['flag'] . "' where nmodele_id = '" . (int)$newsletter_id . "'");
}
+ $messageStack->add(__('@newslettersModeles update status'), 'success');
+
if(!isset($_GET['forceajax']))
tep_redirect(tep_href_link(self::FILENAME, 'nID=' . $_GET['nID']));
break;
@@ -175,12 +177,12 @@
$action=self::$action;
- switch (self::$action) {
+ switch ($action) {
/**
@remarks Ajax View result
*/
case 'setflag':
- return self::get_item_locked(array('status'=>(int)$_GET['flag'], 'nmodele_id'=>(int)$_GET['nID']));
+ return self::get_item_status(array('status'=>(int)$_GET['flag'], 'nmodele_id'=>(int)$_GET['nID']));
break;
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-26 07:48:21
|
Revision: 4593
http://oscss.svn.sourceforge.net/oscss/?rev=4593&view=rev
Author: oscim
Date: 2012-08-26 07:48:15 +0000 (Sun, 26 Aug 2012)
Log Message:
-----------
Add text informations for confirm ajax action
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/boxes/07_catalog.php
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/attributes.txt
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/categories.txt
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt
branches/2.1.1/catalog/admin/includes/modules/pages/attributes.php
branches/2.1.1/catalog/admin/includes/modules/pages/categories.php
branches/2.1.1/catalog/admin/includes/modules/pages/cms_content.php
Modified: branches/2.1.1/catalog/admin/includes/boxes/07_catalog.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/boxes/07_catalog.php 2012-08-26 07:31:55 UTC (rev 4592)
+++ branches/2.1.1/catalog/admin/includes/boxes/07_catalog.php 2012-08-26 07:48:15 UTC (rev 4593)
@@ -19,4 +19,15 @@
if(_cst_bool('STOCK_CHECK'))
$tabl_link[]= array(FILENAME_STOCK, 'BOX_CATALOG_STOCK', 'stock', @$img['stock']);
+ $tabl_link[]= array(FILENAME_SPECIALS, 'BOX_CATALOG_SPECIALS', 'specials', @$img['specials']);
+define('BOX_CATALOG_SPECIALS', 'Promotion');
+
+ if(DataTypes::is_active('manufacturer'))
+ $tabl_link[]= array(FILENAME_MANUFACTURERS, 'BOX_MANUFACTURERS', 'manufacturers', @$img['manufacturers']);
+// define('FILENAME_MANUFACTURERS', 'manufacturers.php');
+define('BOX_MANUFACTURERS', 'Manufacturers');
+
+/* Begin CUSTOMERS_GROUPS_stable - installed by osCSS installer */
+$tabl_link[]= array(FILENAME_CUSTOMERS_GROUPS, 'BOX_CUSTOMERS_CUSTOMERS_GROUP', 'customers',@$img['customers']);
+/* End CUSTOMERS_GROUPS_stable - installed by osCSS installer */
?>
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/attributes.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/attributes.txt 2012-08-26 07:31:55 UTC (rev 4592)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/attributes.txt 2012-08-26 07:48:15 UTC (rev 4593)
@@ -1,8 +1,8 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
+ @version 2.1.1
@date 30/08/10, 21:39
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@@ -57,9 +57,13 @@
$lang['text confirm option value delete']="Vous êtes sur de vouloir supprimer cette valeur d'option ? " ;
$lang['text info count products for option value']="Nombre de produit utilisant cette valeur d'option: " ;
+ /* alert */
+// $lang['@attribute update setsort']="Changement de l'état de la catégorie" ;
+ $lang['@attribute update setimg']="Changement du support des images de cette option" ;
+ $lang['@attribute update setstock']="Changement du mode de suivi de stock pour cette option" ;
+ $lang['@attribute update setcond']="Changement du mode 'requis' pour cette option" ;
-
-
+ /* button */
$lang['image list']="Valeurs" ;
$lang['image insert attribute opt']="Ajouter une Option" ;
$lang['image insert attribute option value']="Ajouter une Valeur" ;
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/categories.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/categories.txt 2012-08-26 07:31:55 UTC (rev 4592)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/categories.txt 2012-08-26 07:48:15 UTC (rev 4593)
@@ -22,6 +22,10 @@
$lang['table heading view status']="Menu" ;
$lang['table heading view datatype']="Données" ;
+ /* alert */
+ $lang['@categorie update status']="Changement de l'état de la catégorie" ;
+ $lang['@categorie update visibility']="Changement de la visibilité de la catégorie" ;
+
/* listing inline */
$lang['categories text link subchilds datatype %1$s %2$s']="donnée de contenu de type %1\$s :x %2\$s" ;
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt 2012-08-26 07:31:55 UTC (rev 4592)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt 2012-08-26 07:48:15 UTC (rev 4593)
@@ -34,6 +34,10 @@
$lang['cms_content table heading hidden']="Menu" ;
$lang['table heading action']="Action" ;
+ /* alert */
+ $lang['@cms_content update status']="Changement de l'état de la catégorie" ;
+ $lang['@cms_content update visibility']="Changement de la visibilité de la catégorie" ;
+
/* Bouton */
$lang['add category datatype content']="Ajouter une catégorie" ;
$lang['image create new content']="Créer une page" ;
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/attributes.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/attributes.php 2012-08-26 07:31:55 UTC (rev 4592)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/attributes.php 2012-08-26 07:48:15 UTC (rev 4593)
@@ -98,6 +98,8 @@
case 'setcond';
attr__UpExe_SetOption(self::$action,$_GET['flag'],tep_db_prepare_input($_GET['poID']));
+ $messageStack->add(__('@attribute update '.self::$action), 'success');
+
if(!isset($_GET['forceajax']))
tep_redirect(tep_href_link(self::FILENAME));
break;
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/categories.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/categories.php 2012-08-26 07:31:55 UTC (rev 4592)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/categories.php 2012-08-26 07:48:15 UTC (rev 4593)
@@ -161,6 +161,8 @@
}
+ $messageStack->add(__('@categorie update status'), 'success');
+
if(!isset($_GET['forceajax']))
tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $_GET['cPath'] ));
break;
@@ -178,6 +180,8 @@
}
+ $messageStack->add(__('@categorie update visibility'), 'success');
+
if(!isset($_GET['forceajax']))
tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $_GET['cPath'] ));
break;
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/cms_content.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/cms_content.php 2012-08-26 07:31:55 UTC (rev 4592)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/cms_content.php 2012-08-26 07:48:15 UTC (rev 4593)
@@ -496,6 +496,8 @@
}
}
+ $messageStack->add(__('@cms_content update status'), 'success');
+
if(!isset($_GET['forceajax']))
tep_redirect(tep_href_link(self::FILENAME) );
break;
@@ -505,9 +507,13 @@
elseif($_GET['flag'] == '1') $DB->query($sql="update " . TABLE_CONTENT . " set content_hidden = '1' where content_id = '" . (int)$_GET['cID'] . "'");
}
+ $messageStack->add(__('@cms_content update visibility'), 'success');
+
if(!isset($_GET['forceajax']))
tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array( 'cID','flag','action'),false)) );
break;
+
+
/**
@remarks Test key , by ajax
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-26 07:32:04
|
Revision: 4592
http://oscss.svn.sourceforge.net/oscss/?rev=4592&view=rev
Author: oscim
Date: 2012-08-26 07:31:55 +0000 (Sun, 26 Aug 2012)
Log Message:
-----------
Upgrade jquery Datatable and DatatableTools
Add new file
Activate all DatatableTools button
Ajust css for new html format DatatableTools
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/header.php
branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/ZeroClipboard/ZeroClipboard.js
branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/js/TableTools.min.js
branches/2.1.1/catalog/admin/includes/javascript/jquery.dataTables.min.js
branches/2.1.1/catalog/admin/includes/template/defaut/css/less/datatable.less
branches/2.1.1/catalog/admin/includes/template/oscss/stylesheet-1.css
branches/2.1.1/catalog/includes/application_bottom.php
Added Paths:
-----------
branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/
branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboard.as
branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboardPdf.as
branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/lib/
branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/lib/AlivePDF.swc
branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/swf/copy_csv_xls.swf
branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/swf/copy_csv_xls_pdf.swf
Modified: branches/2.1.1/catalog/admin/includes/header.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/header.php 2012-08-25 17:56:25 UTC (rev 4591)
+++ branches/2.1.1/catalog/admin/includes/header.php 2012-08-26 07:31:55 UTC (rev 4592)
@@ -101,11 +101,11 @@
<?php endif; ?>
- TableToolsInit.sSwfPath="<?php echo DIR_WS_JS ?>media/swf/ZeroClipboard.swf";
+ TableTools.DEFAULTS.sSwfPath = "<?php echo DIR_WS_JS ?>dataTables.TableTools/swf/copy_csv_xls_pdf.swf";
/* Build the DataTable with third column using our custom sort functions */
oTable = $('.dataTable').dataTable( {
- "sDom": '<"top"flp<"toolbar"><"clear">>rt<"bottom"Tilp<"clear">>',
+ "sDom": '<"top"flp<"toolbar"><"clear">>rt<"bottom"Tilp<"clear"> >',
"bStateSave": true,
"bPaginate": true,
"bLengthChange": true,
@@ -142,10 +142,10 @@
<?php if(defined('AJAXSTATMENTDETAIL')) : ?>
"fnDrawCallback": fnOpenClose,
"fnRowCallback": function( nRow, aData, iDisplayIndex ) {
- /* Append img in row */
- $('td:eq(0)', nRow).html( '<img class="imgDetail" src="<?php echo tep_get_http().DIR_WS_ADMIN.DIR_WS_ICONS ?>details_open.png">' );
- return nRow;
- },
+ /* Append img in row */
+ $('td:eq(0)', nRow).html( '<img class="imgDetail" src="<?php echo tep_get_http().DIR_WS_ADMIN.DIR_WS_ICONS ?>details_open.png">' );
+ return nRow;
+ },
<?php else: ?>
// "fnInitComplete":post_load_page(),
"fnDrawCallback": post_load_page,
Modified: branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/ZeroClipboard/ZeroClipboard.js
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/ZeroClipboard/ZeroClipboard.js 2012-08-25 17:56:25 UTC (rev 4591)
+++ branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/ZeroClipboard/ZeroClipboard.js 2012-08-26 07:31:55 UTC (rev 4592)
@@ -1,11 +1,11 @@
// Simple Set Clipboard System
// Author: Joseph Huckaby
-var ZeroClipboard = {
+var ZeroClipboard_TableTools = {
- version: "1.0.4-mod",
+ version: "1.0.4-TableTools2",
clients: {}, // registered upload clients on page, indexed by id
- moviePath: 'ZeroClipboard.swf', // URL to movie
+ moviePath: '', // URL to movie
nextId: 1, // ID of next movie
$: function(thingy) {
@@ -58,13 +58,13 @@
if ( obj.style.height != "" )
info.height = obj.style.height.replace("px","");
-
+
while (obj) {
info.left += obj.offsetLeft;
info.top += obj.offsetTop;
obj = obj.offsetParent;
}
-
+
return info;
},
@@ -73,18 +73,18 @@
this.handlers = {};
// unique ID
- this.id = ZeroClipboard.nextId++;
- this.movieId = 'ZeroClipboardMovie_' + this.id;
+ this.id = ZeroClipboard_TableTools.nextId++;
+ this.movieId = 'ZeroClipboard_TableToolsMovie_' + this.id;
// register client with singleton to receive flash events
- ZeroClipboard.register(this.id, this);
+ ZeroClipboard_TableTools.register(this.id, this);
// create movie
if (elem) this.glue(elem);
}
};
-ZeroClipboard.Client.prototype = {
+ZeroClipboard_TableTools.Client.prototype = {
id: 0, // unique ID for us
ready: false, // whether movie is ready to receive events or not
@@ -95,11 +95,12 @@
handCursorEnabled: true, // whether to show hand cursor, or default pointer cursor
cssEffects: true, // enable CSS mouse effects on dom container
handlers: null, // user event handlers
+ sized: false,
glue: function(elem, title) {
// glue to DOM element
// elem can be ID or actual DOM element object
- this.domElement = ZeroClipboard.$(elem);
+ this.domElement = ZeroClipboard_TableTools.$(elem);
// float just above object, or zIndex 99 if dom element isn't set
var zIndex = 99;
@@ -108,7 +109,7 @@
}
// find X/Y position of domElement
- var box = ZeroClipboard.getDOMObjectPosition(this.domElement);
+ var box = ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement);
// create floating DIV above element
this.div = document.createElement('div');
@@ -116,34 +117,60 @@
style.position = 'absolute';
style.left = '0px';
style.top = '0px';
- style.width = '' + box.width + 'px';
- style.height = '' + box.height + 'px';
+ style.width = (box.width) + 'px';
+ style.height = box.height + 'px';
style.zIndex = zIndex;
- if ( typeof title != "undefined" ) {
+
+ if ( typeof title != "undefined" && title != "" ) {
this.div.title = title;
}
+ if ( box.width != 0 && box.height != 0 ) {
+ this.sized = true;
+ }
// style.backgroundColor = '#f00'; // debug
- this.domElement.appendChild(this.div);
+ if ( this.domElement ) {
+ this.domElement.appendChild(this.div);
+ this.div.innerHTML = this.getHTML( box.width, box.height );
+ }
+ },
+
+ positionElement: function() {
+ var box = ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement);
+ var style = this.div.style;
- this.div.innerHTML = this.getHTML( box.width, box.height );
+ style.position = 'absolute';
+ //style.left = (this.domElement.offsetLeft)+'px';
+ //style.top = this.domElement.offsetTop+'px';
+ style.width = box.width + 'px';
+ style.height = box.height + 'px';
+
+ if ( box.width != 0 && box.height != 0 ) {
+ this.sized = true;
+ } else {
+ return;
+ }
+
+ var flash = this.div.childNodes[0];
+ flash.width = box.width;
+ flash.height = box.height;
},
getHTML: function(width, height) {
// return HTML for movie
var html = '';
var flashvars = 'id=' + this.id +
- '&width=' + width +
- '&height=' + height;
-
+ '&width=' + width +
+ '&height=' + height;
+
if (navigator.userAgent.match(/MSIE/)) {
// IE gets an OBJECT tag
var protocol = location.href.match(/^https/i) ? 'https://' : 'http://';
- html += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+width+'" height="'+height+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><param name="wmode" value="transparent"/></object>';
+ html += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+width+'" height="'+height+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard_TableTools.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><param name="wmode" value="transparent"/></object>';
}
else {
// all other browsers get an EMBED tag
- html += '<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'" wmode="transparent" />';
+ html += '<embed id="'+this.movieId+'" src="'+ZeroClipboard_TableTools.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'" wmode="transparent" />';
}
return html;
},
@@ -178,12 +205,12 @@
// reposition our floating div, optionally to new container
// warning: container CANNOT change size, only position
if (elem) {
- this.domElement = ZeroClipboard.$(elem);
+ this.domElement = ZeroClipboard_TableTools.$(elem);
if (!this.domElement) this.hide();
}
if (this.domElement && this.div) {
- var box = ZeroClipboard.getDOMObjectPosition(this.domElement);
+ var box = ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement);
var style = this.div.style;
style.left = '' + box.left + 'px';
style.top = '' + box.top + 'px';
@@ -254,7 +281,7 @@
receiveEvent: function(eventName, args) {
// receive event from flash
eventName = eventName.toString().toLowerCase().replace(/^on/, '');
-
+
// special behavior for certain events
switch (eventName) {
case 'load':
@@ -284,14 +311,14 @@
this.movie.setBomInc( this.incBom );
this.movie.setHandCursor( this.handCursorEnabled );
break;
-
+
case 'mouseover':
if (this.domElement && this.cssEffects) {
- this.domElement.addClass('hover');
+ //this.domElement.addClass('hover');
if (this.recoverActive) this.domElement.addClass('active');
}
break;
-
+
case 'mouseout':
if (this.domElement && this.cssEffects) {
this.recoverActive = false;
@@ -299,16 +326,16 @@
this.domElement.removeClass('active');
this.recoverActive = true;
}
- this.domElement.removeClass('hover');
+ //this.domElement.removeClass('hover');
}
break;
-
+
case 'mousedown':
if (this.domElement && this.cssEffects) {
this.domElement.addClass('active');
}
break;
-
+
case 'mouseup':
if (this.domElement && this.cssEffects) {
this.domElement.removeClass('active');
@@ -320,7 +347,7 @@
if (this.handlers[eventName]) {
for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) {
var func = this.handlers[eventName][idx];
-
+
if (typeof(func) == 'function') {
// actual function reference
func(this, args);
Added: branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboard.as
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboard.as (rev 0)
+++ branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboard.as 2012-08-26 07:31:55 UTC (rev 4592)
@@ -0,0 +1,221 @@
+/* Compile using: mxmlc --target-player=10.0.0 ZeroClipboard.as */
+package {
+ import flash.display.Stage;
+ import flash.display.Sprite;
+ import flash.display.LoaderInfo;
+ import flash.display.StageScaleMode;
+ import flash.events.*;
+ import flash.display.StageAlign;
+ import flash.display.StageScaleMode;
+ import flash.external.ExternalInterface;
+ import flash.system.Security;
+ import flash.utils.*;
+ import flash.system.System;
+ import flash.net.FileReference;
+ import flash.net.FileFilter;
+
+ public class ZeroClipboard extends Sprite {
+
+ private var domId:String = '';
+ private var button:Sprite;
+ private var clipText:String = 'blank';
+ private var fileName:String = '';
+ private var action:String = 'copy';
+ private var incBom:Boolean = true;
+ private var charSet:String = 'utf8';
+
+
+ public function ZeroClipboard() {
+ // constructor, setup event listeners and external interfaces
+ stage.scaleMode = StageScaleMode.EXACT_FIT;
+ flash.system.Security.allowDomain("*");
+
+ // import flashvars
+ var flashvars:Object = LoaderInfo( this.root.loaderInfo ).parameters;
+ domId = flashvars.id;
+
+ // invisible button covers entire stage
+ button = new Sprite();
+ button.buttonMode = true;
+ button.useHandCursor = true;
+ button.graphics.beginFill(0x00FF00);
+ button.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
+ button.alpha = 0.0;
+ addChild(button);
+
+ button.addEventListener(MouseEvent.CLICK, clickHandler);
+ button.addEventListener(MouseEvent.MOUSE_OVER, function(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseOver', null );
+ } );
+ button.addEventListener(MouseEvent.MOUSE_OUT, function(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseOut', null );
+ } );
+ button.addEventListener(MouseEvent.MOUSE_DOWN, function(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseDown', null );
+ } );
+ button.addEventListener(MouseEvent.MOUSE_UP, function(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseUp', null );
+ } );
+
+ // External functions - readd whenever the stage is made active for IE
+ addCallbacks();
+ stage.addEventListener(Event.ACTIVATE, addCallbacks);
+
+ // signal to the browser that we are ready
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'load', null );
+ }
+
+ public function addCallbacks (evt:Event = null):void {
+ ExternalInterface.addCallback("setHandCursor", setHandCursor);
+ ExternalInterface.addCallback("clearText", clearText);
+ ExternalInterface.addCallback("setText", setText);
+ ExternalInterface.addCallback("appendText", appendText);
+ ExternalInterface.addCallback("setFileName", setFileName);
+ ExternalInterface.addCallback("setAction", setAction);
+ ExternalInterface.addCallback("setCharSet", setCharSet);
+ ExternalInterface.addCallback("setBomInc", setBomInc);
+ }
+
+
+ public function setCharSet(newCharSet:String):void {
+ if ( newCharSet == 'UTF16LE' ) {
+ charSet = newCharSet;
+ } else {
+ charSet = 'UTF8';
+ }
+ }
+
+ public function setBomInc(newBomInc:Boolean):void {
+ incBom = newBomInc;
+ }
+
+ public function clearText():void {
+ clipText = '';
+ }
+
+ public function appendText(newText:String):void {
+ clipText += newText;
+ }
+
+ public function setText(newText:String):void {
+ clipText = newText;
+ }
+
+ public function setFileName(newFileName:String):void {
+ fileName = newFileName;
+ }
+
+ public function setAction(newAction:String):void {
+ action = newAction;
+ }
+
+ public function setHandCursor(enabled:Boolean):void {
+ // control whether the hand cursor is shown on rollover (true)
+ // or the default arrow cursor (false)
+ button.useHandCursor = enabled;
+ }
+
+
+ private function clickHandler(event:Event):void {
+ var fileRef:FileReference = new FileReference();
+ fileRef.addEventListener(Event.COMPLETE, saveComplete);
+
+ if ( action == "save" ) {
+ /* Save as a file */
+ if ( charSet == 'UTF16LE' ) {
+ fileRef.save( strToUTF16LE(clipText), fileName );
+ } else {
+ fileRef.save( strToUTF8(clipText), fileName );
+ }
+ } else if ( action == "pdf" ) {
+ fileRef.save( "This instance of ZeroClipboard is not configured for PDF export. "+
+ "Please use the PDF export version.", fileName+".txt" );
+ } else {
+ /* Copy the text to the clipboard. Note charset and BOM have no effect here */
+ System.setClipboard( clipText );
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'complete', clipText );
+ }
+ }
+
+
+ private function saveComplete(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'complete', clipText );
+ }
+
+
+ private function getProp( prop:String, opts:Array ):String
+ {
+ var i:int, iLen:int;
+ for ( i=0, iLen=opts.length ; i<iLen ; i++ )
+ {
+ if ( opts[i].indexOf( prop+":" ) != -1 )
+ {
+ return opts[i].replace( prop+":", "" );
+ }
+ }
+ return "";
+ }
+
+
+ /*
+ * Function: strToUTF8
+ * Purpose: Convert a string to the output utf-8
+ * Returns: ByteArray
+ * Inputs: String
+ */
+ private function strToUTF8( str:String ):ByteArray {
+ var utf8:ByteArray = new ByteArray();
+
+ /* BOM first */
+ if ( incBom ) {
+ utf8.writeByte( 0xEF );
+ utf8.writeByte( 0xBB );
+ utf8.writeByte( 0xBF );
+ }
+ utf8.writeUTFBytes( str );
+
+ return utf8;
+ }
+
+
+ /*
+ * Function: strToUTF16LE
+ * Purpose: Convert a string to the output utf-16
+ * Returns: ByteArray
+ * Inputs: String
+ * Notes: The fact that this function is needed is a little annoying. Basically, strings in
+ * AS3 are UTF-16 (with surrogate pairs and everything), but characters which take up less
+ * than 8 bytes appear to be stored as only 8 bytes. This function effective adds the
+ * padding required, and the BOM
+ */
+ private function strToUTF16LE( str:String ):ByteArray {
+ var utf16:ByteArray = new ByteArray();
+ var iChar:uint;
+ var i:uint=0, iLen:uint = str.length;
+
+ /* BOM first */
+ if ( incBom ) {
+ utf16.writeByte( 0xFF );
+ utf16.writeByte( 0xFE );
+ }
+
+ while ( i < iLen ) {
+ iChar = str.charCodeAt(i);
+
+ if ( iChar < 0xFF ) {
+ /* one byte char */
+ utf16.writeByte( iChar );
+ utf16.writeByte( 0 );
+ } else {
+ /* two byte char */
+ utf16.writeByte( iChar & 0x00FF );
+ utf16.writeByte( iChar >> 8 );
+ }
+
+ i++;
+ }
+
+ return utf16;
+ }
+ }
+}
Property changes on: branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboard.as
___________________________________________________________________
Added: svn:executable
+ *
Added: branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboardPdf.as
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboardPdf.as (rev 0)
+++ branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboardPdf.as 2012-08-26 07:31:55 UTC (rev 4592)
@@ -0,0 +1,310 @@
+/* Compile using: mxmlc --target-player=10.0.0 -static-link-runtime-shared-libraries=true -library-path+=lib ZeroClipboardPdf.as */
+package {
+ import flash.display.Stage;
+ import flash.display.Sprite;
+ import flash.display.LoaderInfo;
+ import flash.display.StageScaleMode;
+ import flash.events.*;
+ import flash.display.StageAlign;
+ import flash.display.StageScaleMode;
+ import flash.external.ExternalInterface;
+ import flash.system.Security;
+ import flash.utils.*;
+ import flash.system.System;
+ import flash.net.FileReference;
+ import flash.net.FileFilter;
+
+ /* PDF imports */
+ import org.alivepdf.pdf.PDF;
+ import org.alivepdf.data.Grid;
+ import org.alivepdf.data.GridColumn;
+ import org.alivepdf.layout.Orientation;
+ import org.alivepdf.layout.Size;
+ import org.alivepdf.layout.Unit;
+ import org.alivepdf.display.Display;
+ import org.alivepdf.saving.Method;
+ import org.alivepdf.fonts.FontFamily;
+ import org.alivepdf.fonts.Style;
+ import org.alivepdf.fonts.CoreFont;
+ import org.alivepdf.colors.RGBColor;
+
+ public class ZeroClipboard extends Sprite {
+
+ private var domId:String = '';
+ private var button:Sprite;
+ private var clipText:String = 'blank';
+ private var fileName:String = '';
+ private var action:String = 'copy';
+ private var incBom:Boolean = true;
+ private var charSet:String = 'utf8';
+
+
+ public function ZeroClipboard() {
+ // constructor, setup event listeners and external interfaces
+ stage.scaleMode = StageScaleMode.EXACT_FIT;
+ flash.system.Security.allowDomain("*");
+
+ // import flashvars
+ var flashvars:Object = LoaderInfo( this.root.loaderInfo ).parameters;
+ domId = flashvars.id;
+
+ // invisible button covers entire stage
+ button = new Sprite();
+ button.buttonMode = true;
+ button.useHandCursor = true;
+ button.graphics.beginFill(0x00FF00);
+ button.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
+ button.alpha = 0.0;
+ addChild(button);
+
+ button.addEventListener(MouseEvent.CLICK, function(event:Event):void {
+ clickHandler(event);
+ } );
+ button.addEventListener(MouseEvent.MOUSE_OVER, function(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseOver', null );
+ } );
+ button.addEventListener(MouseEvent.MOUSE_OUT, function(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseOut', null );
+ } );
+ button.addEventListener(MouseEvent.MOUSE_DOWN, function(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseDown', null );
+ } );
+ button.addEventListener(MouseEvent.MOUSE_UP, function(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'mouseUp', null );
+ } );
+
+ // External functions - readd whenever the stage is made active for IE
+ addCallbacks();
+ stage.addEventListener(Event.ACTIVATE, addCallbacks);
+
+ // signal to the browser that we are ready
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'load', null );
+ }
+
+ public function addCallbacks (evt:Event = null):void {
+ ExternalInterface.addCallback("setHandCursor", setHandCursor);
+ ExternalInterface.addCallback("clearText", clearText);
+ ExternalInterface.addCallback("setText", setText);
+ ExternalInterface.addCallback("appendText", appendText);
+ ExternalInterface.addCallback("setFileName", setFileName);
+ ExternalInterface.addCallback("setAction", setAction);
+ ExternalInterface.addCallback("setCharSet", setCharSet);
+ ExternalInterface.addCallback("setBomInc", setBomInc);
+ }
+
+
+ public function setCharSet(newCharSet:String):void {
+ if ( newCharSet == 'UTF16LE' ) {
+ charSet = newCharSet;
+ } else {
+ charSet = 'UTF8';
+ }
+ }
+
+ public function setBomInc(newBomInc:Boolean):void {
+ incBom = newBomInc;
+ }
+
+ public function clearText():void {
+ clipText = '';
+ }
+
+ public function appendText(newText:String):void {
+ clipText += newText;
+ }
+
+ public function setText(newText:String):void {
+ clipText = newText;
+ }
+
+ public function setFileName(newFileName:String):void {
+ fileName = newFileName;
+ }
+
+ public function setAction(newAction:String):void {
+ action = newAction;
+ }
+
+ public function setHandCursor(enabled:Boolean):void {
+ // control whether the hand cursor is shown on rollover (true)
+ // or the default arrow cursor (false)
+ button.useHandCursor = enabled;
+ }
+
+
+ private function clickHandler(event:Event):void {
+ var fileRef:FileReference = new FileReference();
+ fileRef.addEventListener(Event.COMPLETE, saveComplete);
+
+ if ( action == "save" ) {
+ /* Save as a file */
+ if ( charSet == 'UTF16LE' ) {
+ fileRef.save( strToUTF16LE(clipText), fileName );
+ } else {
+ fileRef.save( strToUTF8(clipText), fileName );
+ }
+ } else if ( action == "pdf" ) {
+ /* Save as a PDF */
+ var pdf:PDF = configPdf();
+ fileRef.save( pdf.save( Method.LOCAL ), fileName );
+ } else {
+ /* Copy the text to the clipboard. Note charset and BOM have no effect here */
+ System.setClipboard( clipText );
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'complete', clipText );
+ }
+ }
+
+
+ private function saveComplete(event:Event):void {
+ ExternalInterface.call( 'ZeroClipboard_TableTools.dispatch', domId, 'complete', clipText );
+ }
+
+
+ private function getProp( prop:String, opts:Array ):String
+ {
+ var i:int, iLen:int;
+ for ( i=0, iLen=opts.length ; i<iLen ; i++ )
+ {
+ if ( opts[i].indexOf( prop+":" ) != -1 )
+ {
+ return opts[i].replace( prop+":", "" );
+ }
+ }
+ return "";
+ }
+
+
+ private function configPdf():PDF
+ {
+ var
+ pdf:PDF,
+ i:int, iLen:int,
+ splitText:Array = clipText.split("--/TableToolsOpts--\n"),
+ opts:Array = splitText[0].split("\n"),
+ dataIn:Array = splitText[1].split("\n"),
+ aColRatio:Array = getProp( 'colWidth', opts ).split('\t'),
+ title:String = getProp( 'title', opts ),
+ message:String = getProp( 'message', opts ),
+ orientation:String = getProp( 'orientation', opts ),
+ size:String = getProp( 'size', opts ),
+ iPageWidth:int = 0,
+ dataOut:Array = [],
+ columns:Array = [],
+ headers:Array,
+ y:int = 0;
+
+ /* Create the PDF */
+ pdf = new PDF( Orientation[orientation.toUpperCase()], Unit.MM, Size[size.toUpperCase()] );
+ pdf.setDisplayMode( Display.FULL_WIDTH );
+ pdf.addPage();
+ iPageWidth = pdf.getCurrentPage().w-20;
+ pdf.textStyle( new RGBColor(0), 1 );
+
+ /* Add the title / message if there is one */
+ pdf.setFont( new CoreFont(FontFamily.HELVETICA), 14 );
+ if ( title != "" )
+ {
+ pdf.writeText(11, title+"\n");
+ }
+
+ pdf.setFont( new CoreFont(FontFamily.HELVETICA), 11 );
+ if ( message != "" )
+ {
+ pdf.writeText(11, message+"\n");
+ }
+
+ /* Data setup. Split up the headers, and then construct the columns */
+ for ( i=0, iLen=dataIn.length ; i<iLen ; i++ )
+ {
+ if ( dataIn[i] != "" )
+ {
+ dataOut.push( dataIn[i].split("\t") );
+ }
+ }
+ headers = dataOut.shift();
+
+ for ( i=0, iLen=headers.length ; i<iLen ; i++ )
+ {
+ columns.push( new GridColumn( " \n"+headers[i]+"\n ", i.toString(), aColRatio[i]*iPageWidth, 'C' ) );
+ }
+
+ var grid:Grid = new Grid(
+ dataOut, /* 1. data */
+ iPageWidth, /* 2. width */
+ 100, /* 3. height */
+ new RGBColor (0xE0E0E0), /* 4. headerColor */
+ new RGBColor (0xFFFFFF), /* 5. backgroundColor */
+ true, /* 6. alternateRowColor */
+ new RGBColor ( 0x0 ), /* 7. borderColor */
+ .1, /* 8. border alpha */
+ null, /* 9. joins */
+ columns /* 10. columns */
+ );
+
+ pdf.addGrid( grid, 0, y );
+ return pdf;
+ }
+
+
+ /*
+ * Function: strToUTF8
+ * Purpose: Convert a string to the output utf-8
+ * Returns: ByteArray
+ * Inputs: String
+ */
+ private function strToUTF8( str:String ):ByteArray {
+ var utf8:ByteArray = new ByteArray();
+
+ /* BOM first */
+ if ( incBom ) {
+ utf8.writeByte( 0xEF );
+ utf8.writeByte( 0xBB );
+ utf8.writeByte( 0xBF );
+ }
+ utf8.writeUTFBytes( str );
+
+ return utf8;
+ }
+
+
+ /*
+ * Function: strToUTF16LE
+ * Purpose: Convert a string to the output utf-16
+ * Returns: ByteArray
+ * Inputs: String
+ * Notes: The fact that this function is needed is a little annoying. Basically, strings in
+ * AS3 are UTF-16 (with surrogate pairs and everything), but characters which take up less
+ * than 8 bytes appear to be stored as only 8 bytes. This function effective adds the
+ * padding required, and the BOM
+ */
+ private function strToUTF16LE( str:String ):ByteArray {
+ var utf16:ByteArray = new ByteArray();
+ var iChar:uint;
+ var i:uint=0, iLen:uint = str.length;
+
+ /* BOM first */
+ if ( incBom ) {
+ utf16.writeByte( 0xFF );
+ utf16.writeByte( 0xFE );
+ }
+
+ while ( i < iLen ) {
+ iChar = str.charCodeAt(i);
+
+ if ( iChar < 0xFF ) {
+ /* one byte char */
+ utf16.writeByte( iChar );
+ utf16.writeByte( 0 );
+ } else {
+ /* two byte char */
+ utf16.writeByte( iChar & 0x00FF );
+ utf16.writeByte( iChar >> 8 );
+ }
+
+ i++;
+ }
+
+ return utf16;
+ }
+ }
+}
Property changes on: branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/ZeroClipboardPdf.as
___________________________________________________________________
Added: svn:executable
+ *
Added: branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/lib/AlivePDF.swc
===================================================================
(Binary files differ)
Property changes on: branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/as3/lib/AlivePDF.swc
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/js/TableTools.min.js
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/js/TableTools.min.js 2012-08-25 17:56:25 UTC (rev 4591)
+++ branches/2.1.1/catalog/admin/includes/javascript/dataTables.TableTools/js/TableTools.min.js 2012-08-26 07:31:55 UTC (rev 4592)
@@ -1,735 +1,76 @@
+// Simple Set Clipboard System
+// Author: Joseph Huckaby
+var ZeroClipboard_TableTools={version:"1.0.4-TableTools2",clients:{},moviePath:"",nextId:1,$:function(a){"string"==typeof a&&(a=document.getElementById(a));a.addClass||(a.hide=function(){this.style.display="none"},a.show=function(){this.style.display=""},a.addClass=function(a){this.removeClass(a);this.className+=" "+a},a.removeClass=function(a){this.className=this.className.replace(RegExp("\\s*"+a+"\\s*")," ").replace(/^\s+/,"").replace(/\s+$/,"")},a.hasClass=function(a){return!!this.className.match(RegExp("\\s*"+
+a+"\\s*"))});return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(a,b,c){(a=this.clients[a])&&a.receiveEvent(b,c)},register:function(a,b){this.clients[a]=b},getDOMObjectPosition:function(a){var b={left:0,top:0,width:a.width?a.width:a.offsetWidth,height:a.height?a.height:a.offsetHeight};""!=a.style.width&&(b.width=a.style.width.replace("px",""));""!=a.style.height&&(b.height=a.style.height.replace("px",""));for(;a;)b.left+=a.offsetLeft,b.top+=a.offsetTop,a=a.offsetParent;return b},
+Client:function(a){this.handlers={};this.id=ZeroClipboard_TableTools.nextId++;this.movieId="ZeroClipboard_TableToolsMovie_"+this.id;ZeroClipboard_TableTools.register(this.id,this);a&&this.glue(a)}};
+ZeroClipboard_TableTools.Client.prototype={id:0,ready:!1,movie:null,clipText:"",fileName:"",action:"copy",handCursorEnabled:!0,cssEffects:!0,handlers:null,sized:!1,glue:function(a,b){this.domElement=ZeroClipboard_TableTools.$(a);var c=99;this.domElement.style.zIndex&&(c=parseInt(this.domElement.style.zIndex)+1);var d=ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement);this.div=document.createElement("div");var e=this.div.style;e.position="absolute";e.left="0px";e.top="0px";e.width=d.width+
+"px";e.height=d.height+"px";e.zIndex=c;"undefined"!=typeof b&&""!=b&&(this.div.title=b);0!=d.width&&0!=d.height&&(this.sized=!0);this.domElement&&(this.domElement.appendChild(this.div),this.div.innerHTML=this.getHTML(d.width,d.height))},positionElement:function(){var a=ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement),b=this.div.style;b.position="absolute";b.width=a.width+"px";b.height=a.height+"px";0!=a.width&&0!=a.height&&(this.sized=!0,b=this.div.childNodes[0],b.width=a.width,b.height=
+a.height)},getHTML:function(a,b){var c="",d="id="+this.id+"&width="+a+"&height="+b;if(navigator.userAgent.match(/MSIE/))var e=location.href.match(/^https/i)?"https://":"http://",c=c+('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+e+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+a+'" height="'+b+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+
+ZeroClipboard_TableTools.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+d+'"/><param name="wmode" value="transparent"/></object>');else c+='<embed id="'+this.movieId+'" src="'+ZeroClipboard_TableTools.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+a+'" height="'+b+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+
+d+'" wmode="transparent" />';return c},hide:function(){this.div&&(this.div.style.left="-2000px")},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.div=this.domElement=null}},reposition:function(a){a&&((this.domElement=ZeroClipboard_TableTools.$(a))||this.hide());if(this.domElement&&this.div){var a=ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement),
+b=this.div.style;b.left=""+a.left+"px";b.top=""+a.top+"px"}},clearText:function(){this.clipText="";this.ready&&this.movie.clearText()},appendText:function(a){this.clipText+=a;this.ready&&this.movie.appendText(a)},setText:function(a){this.clipText=a;this.ready&&this.movie.setText(a)},setCharSet:function(a){this.charSet=a;this.ready&&this.movie.setCharSet(a)},setBomInc:function(a){this.incBom=a;this.ready&&this.movie.setBomInc(a)},setFileName:function(a){this.fileName=a;this.ready&&this.movie.setFileName(a)},
+setAction:function(a){this.action=a;this.ready&&this.movie.setAction(a)},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");this.handlers[a]||(this.handlers[a]=[]);this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a;this.ready&&this.movie.setHandCursor(a)},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");switch(a){case "load":this.movie=document.getElementById(this.movieId);
+if(!this.movie){var c=this;setTimeout(function(){c.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){c=this;setTimeout(function(){c.receiveEvent("load",null)},100);this.ready=!0;return}this.ready=!0;this.movie.clearText();this.movie.appendText(this.clipText);this.movie.setFileName(this.fileName);this.movie.setAction(this.action);this.movie.setCharSet(this.charSet);this.movie.setBomInc(this.incBom);this.movie.setHandCursor(this.handCursorEnabled);
+break;case "mouseover":this.domElement&&this.cssEffects&&this.recoverActive&&this.domElement.addClass("active");break;case "mouseout":this.domElement&&this.cssEffects&&(this.recoverActive=!1,this.domElement.hasClass("active")&&(this.domElement.removeClass("active"),this.recoverActive=!0));break;case "mousedown":this.domElement&&this.cssEffects&&this.domElement.addClass("active");break;case "mouseup":this.domElement&&this.cssEffects&&(this.domElement.removeClass("active"),this.recoverActive=!1)}if(this.handlers[a])for(var d=
+0,e=this.handlers[a].length;d<e;d++){var f=this.handlers[a][d];if("function"==typeof f)f(this,b);else if("object"==typeof f&&2==f.length)f[0][f[1]](this,b);else if("string"==typeof f)window[f](this,b)}}};
+
+
/*
- * File: TableTools.js
- * Version: 1.1.4
- * CVS: $Id$
- * Description: Copy, save and print functions for DataTables
+ * File: TableTools.min.js
+ * Version: 2.1.3
* Author: Allan Jardine (www.sprymedia.co.uk)
- * Created: Wed 1 Apr 2009 08:41:58 BST
- * Modified: $Date$ by $Author$
- * Language: Javascript
- * License: LGPL
- * Project: Just a little bit of fun :-)
- * Contact: www.sprymedia.co.uk/contact
+ *
+ * Copyright 2009-2012 Allan Jardine, all rights reserved.
*
- * Copyright 2009-2010 Allan Jardine, all rights reserved.
- *
+ * This source file is free software, under either the GPL v2 license or a
+ * BSD (3 point) style license, as supplied with this software.
+ *
+ * This source file is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
*/
-
-/*
- * Variable: TableToolsInit
- * Purpose: Parameters for TableTools customisation
- * Scope: global
- */
-var TableToolsInit = {
- "oFeatures": {
- "bCsv": true,
- "bXls": true,
- "bCopy": false,
- "bPrint": true
- },
- "oBom": {
- "bCsv": true,
- "bXls": true
- },
- "bIncFooter": true,
- "bIncHiddenColumns": false,
- "sPrintMessage": "", /* Message with will print with the table */
- "sPrintInfo": "<h6>Print view</h6><p>Please use your browser's print function to "+
- "print this table. Press escape when finished.", /* The 'fading' message */
- "sTitle": "",
- "sSwfPath": "media/swf/ZeroClipboard.swf",
- "iButtonHeight": 30,
- "iButtonWidth": 30,
- "sCsvBoundary": "'",
- "_iNextId": 1 /* Internal useage - but needs to be global */
-};
-
-
-(function($) {
-/*
- * Function: TableTools
- * Purpose: TableTools "class"
- * Returns: same as _fnInit
- * Inputs: same as _fnInit
- */
-function TableTools ( oInit )
-{
- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Private parameters
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- var _oSettings;
- var nTools = null;
- var _nTableWrapper;
- var _aoPrintHidden = [];
- var _iPrintScroll = 0;
- var _nPrintMessage = null;
- var _DTSettings;
- var _sLastData;
- var _iId;
-
-
- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Initialisation
- */
-
- /*
- * Function: _fnInit
- * Purpose: Initialise the table tools
- * Returns: node: - The created node for the table tools wrapping
- * Inputs: object:oInit - object with:
- * oDTSettings - DataTables settings
- */
- function _fnInit( oInit )
- {
- _nTools = document.createElement('div');
- _nTools.className = "TableTools";
- _iId = TableToolsInit._iNextId++;
-
- /* Copy the init object */
- _oSettings = $.extend( true, {}, TableToolsInit );
-
- _DTSettings = oInit.oDTSettings;
-
- _nTableWrapper = fnFindParentClass( _DTSettings.nTable, "dataTables_wrapper" );
-
- ZeroClipboard.moviePath = _oSettings.sSwfPath;
-
-// if ( _oSettings.oFeatures.bCopy ) {
-// fnFeatureClipboard();
-// }
-// if ( _oSettings.oFeatures.bCsv ) {
-// fnFeatureSaveCSV();
-// }
-// if ( _oSettings.oFeatures.bXls ) {
-// fnFeatureSaveXLS();
-// }
- if ( _oSettings.oFeatures.bPrint ) {
- fnFeaturePrint();
- }
-
- return _nTools;
- }
-
-
- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Feature buttons
- */
-
- /*
- * Function: fnFeatureSaveCSV
- * Purpose: Add a button for saving a CSV file
- * Returns: -
- * Inputs: -
- */
- function fnFeatureSaveCSV ()
- {
- var sBaseClass = "TableTools_button TableTools_csv";
- var nButton = document.createElement( 'div' );
- nButton.id = "ToolTables_CSV_"+_iId;
- nButton.style.height = _oSettings.iButtonHeight+'px';
- nButton.style.width = _oSettings.iButtonWidth+'px';
- nButton.className = sBaseClass;
- _nTools.appendChild( nButton );
-
- var clip = new ZeroClipboard.Client();
- clip.setHandCursor( true );
- clip.setAction( 'save' );
- clip.setCharSet( 'UTF8' );
- clip.setBomInc( _oSettings.oBom.bCsv );
- clip.setFileName( fnGetTitle()+'.csv' );
-
- clip.addEventListener('mouseOver', function(client) {
- nButton.className = sBaseClass+'_hover';
- } );
-
- clip.addEventListener('mouseOut', function(client) {
- nButton.className = sBaseClass;
- } );
-
- clip.addEventListener('mouseDown', function(client) {
- fnFlashSetText( clip, fnGetDataTablesData(",", TableToolsInit.sCsvBoundary) );
- } );
-
- fnGlue( clip, nButton, "ToolTables_CSV_"+_iId, "Save as CSV" );
- }
-
-
- /*
- * Function: fnFeatureSaveXLS
- * Purpose: Add a button for saving an XLS file
- * Returns: -
- * Inputs: -
- */
- function fnFeatureSaveXLS ()
- {
- var sBaseClass = "TableTools_button TableTools_xls";
- var nButton = document.createElement( 'div' );
- nButton.id = "ToolTables_XLS_"+_iId;
- nButton.style.height = _oSettings.iButtonHeight+'px';
- nButton.style.width = _oSettings.iButtonWidth+'px';
- nButton.className = sBaseClass;
- _nTools.appendChild( nButton );
-
- var clip = new ZeroClipboard.Client();
- clip.setHandCursor( true );
- clip.setAction( 'save' );
- clip.setCharSet( 'UTF16LE' );
- clip.setBomInc( _oSettings.oBom.bXls );
- clip.setFileName( fnGetTitle()+'.xls' );
-
- clip.addEventListener('mouseOver', function(client) {
- nButton.className = sBaseClass+'_hover';
- } );
-
- clip.addEventListener('mouseOut', function(client) {
- nButton.className = sBaseClass;
- } );
-
- clip.addEventListener('mouseDown', function(client) {
- fnFlashSetText( clip, fnGetDataTablesData("\t") );
- } );
-
- fnGlue( clip, nButton, "ToolTables_XLS_"+_iId, "Save for Excel" );
- }
-
-
- /*
- * Function: fnFeatureClipboard
- * Purpose: Add a button for copying data to clipboard
- * Returns: -
- * Inputs: -
- */
- function fnFeatureClipboard ()
- {
- var sBaseClass = "TableTools_button TableTools_clipboard";
- var nButton = document.createElement( 'div' );
- nButton.id = "ToolTables_Copy_"+_iId;
- nButton.style.height = _oSettings.iButtonHeight+'px';
- nButton.style.width = _oSettings.iButtonWidth+'px';
- nButton.className = sBaseClass;
- _nTools.appendChild( nButton );
-
- var clip = new ZeroClipboard.Client();
- clip.setHandCursor( true );
- clip.setAction( 'copy' );
-
- clip.addEventListener('mouseOver', function(client) {
- nButton.className = sBaseClass+'_hover';
- } );
-
- clip.addEventListener('mouseOut', function(client) {
- nButton.className = sBaseClass;
- } );
-
- clip.addEventListener('mouseDown', function(client) {
- fnFlashSetText( clip, fnGetDataTablesData("\t") );
- } );
-
- clip.addEventListener('complete', function (client, text) {
- var aData = _sLastData.split('\n');
- alert( 'Copied '+(aData.length-1)+' rows to the clipboard' );
- } );
-
- fnGlue( clip, nButton, "ToolTables_Copy_"+_iId, "Copy to clipboard" );
- }
-
-
- /*
- * Function: fnFeaturePrint
- * Purpose: Add a button for printing data
- * Returns: -
- * Inputs: -
- * Notes: Fun one this function. In order to print the table, we want the table to retain
- * it's position in the DOM, so all styles still apply, but we don't want to print all the
- * other nonesense. So we hide that nonesese and add an event handler for 'esc' which will
- * restore a normal view.
- */
- function fnFeaturePrint ()
- {
- var sBaseClass = "TableTools_button TableTools_print";
- var nButton = document.createElement( 'div' );
- nButton.style.height = _oSettings.iButtonHeight+'px';
- nButton.style.width = _oSettings.iButtonWidth+'px';
- nButton.className = sBaseClass;
- nButton.title = "Print table";
- _nTools.appendChild( nButton );
-
- /* Could do this in CSS - but might as well be consistent with the flash buttons */
- $(nButton).hover( function(client) {
- nButton.className = sBaseClass+'_hover';
- }, function(client) {
- nButton.className = sBaseClass;
- } );
-
- $(nButton).click( function() {
- /* Parse through the DOM hiding everything that isn't needed for the table */
- fnPrintHideNodes( _DTSettings.nTable );
-
- /* Show the whole table */
- _iPrintSaveStart = _DTSettings._iDisplayStart;
- _iPrintSaveLength = _DTSettings._iDisplayLength;
- _DTSettings._iDisplayStart = 0;
- _DTSettings._iDisplayLength = -1;
- _DTSettings.oApi._fnCalculateEnd( _DTSettings );
- _DTSettings.oApi._fnDraw( _DTSettings );
-
- /* Remove the other DataTables feature nodes - but leave the table! and info div */
- var anFeature = _DTSettings.anFeatures;
- for ( var cFeature in anFeature )
- {
- if ( cFeature != 'i' && cFeature != 't' )
- {
- _aoPrintHidden.push( {
- "node": anFeature[cFeature],
- "display": "block"
- } );
- anFeature[cFeature].style.display = "none";
- }
- }
-
- /* Add a node telling the user what is going on */
- var nInfo = document.createElement( "div" );
- nInfo.className = "TableTools_PrintInfo";
- nInfo.innerHTML = _oSettings.sPrintInfo;
- document.body.appendChild( nInfo );
-
- /* Add a message at the top of the page */
- if ( _oSettings.sPrintMessage !== "" )
- {
- _nPrintMessage = document.createElement( "p" );
- _nPrintMessage.className = "TableTools_PrintMessage";
- _nPrintMessage.innerHTML = _oSettings.sPrintMessage;
- document.body.insertBefore( _nPrintMessage, document.body.childNodes[0] );
- }
-
- /* Cache the scrolling and the jump to the top of the t=page */
- _iPrintScroll = $(window).scrollTop();
- window.scrollTo( 0, 0 );
-
- $(document).bind( "keyup", null, fnPrintEnd );
-
- setTimeout( function() {
- $(nInfo).fadeOut( "normal", function() {
- document.body.removeChild( nInfo );
- } );
- }, 2000 );
- } );
- }
-
-
- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Printing functions
- */
-
- /*
- * Function: fnPrintEnd
- * Purpose: Printing is finished, resume normal display
- * Returns: -
- * Inputs: event
- */
- function fnPrintEnd ( e )
- {
- /* Only interested in the escape key */
- if ( e.keyCode == 27 )
- {
- /* Show all hidden nodes */
- fnPrintShowNodes();
-
- /* Restore the scroll */
- window.scrollTo( 0, _iPrintScroll );
-
- /* Drop the print message */
- if ( _nPrintMessage )
- {
- document.body.removeChild( _nPrintMessage );
- _nPrintMessage = null;
- }
-
- /* Restore the table length */
- _DTSettings._iDisplayStart = _iPrintSaveStart;
- _DTSettings._iDisplayLength = _iPrintSaveLength;
- _DTSettings.oApi._fnCalculateEnd( _DTSettings );
- _DTSettings.oApi._fnDraw( _DTSettings );
-
- $(document).unbind( "keydown", fnPrintEnd );
- }
- }
-
-
- /*
- * Function: fnPrintShowNodes
- * Purpose: Resume the display of all TableTools hidden nodes
- * Returns: -
- * Inputs: -
- */
- function fnPrintShowNodes( )
- {
- for ( var i=0, iLen=_aoPrintHidden.length ; i<iLen ; i++ )
- {
- _aoPrintHidden[i].node.style.display = _aoPrintHidden[i].display;
- }
- _aoPrintHidden.splice( 0, _aoPrintHidden.length );
- }
-
-
- /*
- * Function: fnPrintHideNodes
- * Purpose: Hide nodes which are not needed in order to display the table
- * Returns: -
- * Inputs: node:nNode - the table node - we parse back up
- * Notes: Recursive
- */
- function fnPrintHideNodes( nNode )
- {
- var nParent = nNode.parentNode;
- var nChildren = nParent.childNodes;
- for ( var i=0, iLen=nChildren.length ; i<iLen ; i++ )
- {
- if ( nChildren[i] != nNode && nChildren[i].nodeType == 1 )
- {
- /* If our node is shown (don't want to show nodes which were previously hidden) */
- var sDisplay = $(nChildren[i]).css("display");
- if ( sDisplay != "none" )
- {
- /* Cache the node and it's previous state so we can restore it */
- _aoPrintHidden.push( {
- "node": nChildren[i],
- "display": sDisplay
- } );
- nChildren[i].style.display = "none";
- }
- }
- }
-
- if ( nParent.nodeName != "BODY" )
- {
- fnPrintHideNodes( nParent );
- }
- }
-
-
-
-
-
- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Support functions
- */
-
- /*
- * Function: fnGlue
- * Purpose: Wait until the id is in the DOM before we "glue" the swf
- * Returns: -
- * Inputs: object:clip - Zero clipboard object
- * node:node - node to glue swf to
- * string:id - id of the element to look for
- * string:text - title of the flash movie
- * Notes: Recursive (setTimeout)
- */
- function fnGlue ( clip, node, id, text )
- {
- if ( document.getElementById(id) )
- {
- clip.glue( node, text );
- }
- else
- {
- setTimeout( function () {
- fnGlue( clip, node, id, text );
- }, 100 );
- }
- }
-
-
- /*
- * Function: fnGetTitle
- * Purpose: Get the title of the page (from DOM or user set) for file saving
- * Returns:
- * Inputs:
- */
- function fnGetTitle( )
- {
- var sTitle;
- if ( _oSettings.sTitle !== "" ) {
- sTitle = _oSettings.sTitle;
- } else {
- sTitle = document.getElementsByTagName('title')[0].innerHTML;
- }
-
- /* Strip characters which the OS will object to - checking for UTF8 support in the scripting
- * engine
- */
- if ( "\u00A1".toString().length < 4 ) {
- return sTitle.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g, "");
- } else {
- return sTitle.replace(/[^a-zA-Z0-9_\.,\-_ !\(\)]/g, "");
- }
- }
-
-
- /*
- * Function: fnFindParentClass
- * Purpose: Parse back up the DOM to a node with a particular node
- * Returns: node: - found node
- * Inputs: node:n - Node to test
- * string:sClass - class to find
- * Notes: Recursive
- */
- function fnFindParentClass ( n, sClass )
- {
- if ( n.className.match(sClass) || n.nodeName == "BODY" )
- {
- return n;
- }
- else
- {
- return fnFindParentClass( n.parentNode, sClass );
- }
- }
-
-
- /*
- * Function: fnBoundData
- * Purpose: Wrap data up with a boundary string
- * Returns: string: - bound data
- * Inputs: string:sData - data to bound
- * string:sBoundary - bounding char(s)
- * regexp:regex - search for the bounding chars - constructed outside for efficincy
- * in the loop
- */
- function fnBoundData( sData, sBoundary, regex )
- {
- if ( sBoundary === "" )
- {
- return sData;
- }
- else
- {
- return sBoundary + sData.replace(regex, "\\"+sBoundary) + sBoundary;
- }
- }
-
-
- /*
- * Function: fnHtmlDecode
- * Purpose: Decode HTML entities
- * Returns: string: - decoded string
- * Inputs: string:sData - encoded string
- */
- function fnHtmlDecode( sData )
- {
- var
- aData = fnChunkData( sData, 2048 ),
- n = document.createElement('div'),
- i, iLen, iIndex,
- sReturn = "", sInner;
-
- /* nodeValue has a limit in browsers - so we chunk the data into smaller segments to build
- * up the string. Note that the 'trick' here is to remember than we might have split over
- * an HTML entity, so we backtrack a little to make sure this doesn't happen
- */
- for ( i=0, iLen=aData.length ; i<iLen ; i++ )
- {
- /* Magic number 8 is because no entity is longer then strlen 8 in ISO 8859-1 */
- iIndex = aData[i].lastIndexOf( '&' );
- if ( iIndex != -1 && aData[i].length >= 8 && iIndex > aData[i].length - 8 )
- {
- sInner = aData[i].substr( iIndex );
- aData[i] = aData[i].substr( 0, iIndex );
- }
-
- n.innerHTML = aData[i];
- sReturn += n.childNodes[0].nodeValue;
- }
-
- return sReturn;
- }
-
-
- //function fnHtmlDecode( sData )
- //{
- // var n = document.createElement('div');
- // n.innerHTML = sData;
- // return n.childNodes[0].nodeValue;
- //}
-
-
- /*
- * Function: fnChunkData
- * Purpose: Break a string up into an array of smaller strings
- * Returns: array strings: - string array
- * Inputs: string:sData - data to be broken up
- * int:iSize - chunk size
- */
- function fnChunkData( sData, iSize )
- {
- var asReturn = [];
- var iStrlen = sData.length;
-
- for ( var i=0 ; i<iStrlen ; i+=iSize )
- {
- if ( i+iSize < iStrlen )
- {
- asReturn.push( sData.substring( i, i+iSize ) );
- }
- else
- {
- asReturn.push( sData.substring( i, iStrlen ) );
- }
- }
-
- return asReturn;
- }
-
-
- /*
- * Function: fnFlashSetText
- * Purpose: Set the text for the flash clip to deal with
- * Returns: -
- * Inputs: object:clip - the ZeroClipboard object
- * string:sData - the data to be set
- * Notes: This function is required for large information sets. There is a limit on the
- * amount of data that can be transfered between Javascript and Flash in a single call, so
- * we use this method to build up the text in Flash by sending over chunks. It is estimated
- * that the data limit is around 64k, although it is undocuments, and appears to be different
- * between different flash versions. We chunk at 8KiB.
- */
- function fnFlashSetText( clip, sData )
- {
- var asData = fnChunkData( sData, 8192 );
-
- clip.clearText();
- for ( var i=0, iLen=asData.length ; i<iLen ; i++ )
- {
- clip.appendText( asData[i] );
- }
- }
-
-
- /*
- * Function: fnGetDataTablesData
- * Purpose: Get data from DataTables' internals and format it for output
- * Returns: string:sData - concatinated string of data
- * Inputs: string:sSeperator - field separator (ie. ,)
- * string:sBoundary - field boundary (ie. ') - optional - default: ""
- */
- function fnGetDataTablesData( sSeperator, sBoundary )
- {
- var i, iLen;
- var j, jLen;
- var sData = '';
- var sLoopData = '';
- var sNewline = navigator.userAgent.match(/Windows/) ? "\r\n" : "\n";
-
- if ( typeof sBoundary == "undefined" )
- {
- sBoundary = "";
- }
- var regex = new RegExp(sBoundary, "g"); /* Do it here for speed */
-
- /* Titles */
- for ( i=0, iLen=_DTSettings.aoColumns.length ; i<iLen ; i++ )
- {
- if ( _oSettings.bIncHiddenColumns === true || _DTSettings.aoColumns[i].bVisible )
- {
- sLoopData = _DTSettings.aoColumns[i].sTitle.replace(/\n/g," ").replace( /<.*?>/g, "" );
- if ( sLoopData.indexOf( '&' ) != -1 )
- {
- sLoopData = fnHtmlDecode( sLoopData );
- }
-
- sData += fnBoundData( sLoopData, sBoundary, regex ) + sSeperator;
- }
- }
- sData = sData.slice( 0, sSeperator.length*-1 );
- sData += sNewline;
-
- /* Rows */
- for ( j=0, jLen=_DTSettings.aiDisplay.length ; j<jLen ; j++ )
- {
- /* Columns */
- for ( i=0, iLen=_DTSettings.aoColumns.length ; i<iLen ; i++ )
- {
- if ( _oSettings.bIncHiddenColumns === true || _DTSettings.aoColumns[i].bVisible )
- {
- /* Convert to strings (with small optimisation) */
- var mTypeData = _DTSettings.aoData[ _DTSettings.aiDisplay[j] ]._aData[ i ];
- if ( typeof mTypeData == "string" )
- {
- /* Strip newlines, replace img tags with alt attr. and finally strip html... */
- sLoopData = mTypeData.replace(/\n/g," ");
- sLoopData = sLoopData.replace(/<img.*?\s+alt\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s>]+)).*?>/gi, '$1$2$3')
- sLoopData = sLoopData.replace( /<.*?>/g, "" );
- }
- else
- {
- sLoopData = mTypeData+"";
- }
-
- /* Trim and clean the data */
- sLoopData = sLoopData.replace(/^\s+/, '').replace(/\s+$/, '');
- if ( sLoopData.indexOf( '&' ) != -1 )
- {
- sLoopData = fnHtmlDecode( sLoopData );
- }
-
- /* Bound it and add it to the total data */
- sData += fnBoundData( sLoopData, sBoundary, regex ) + sSeperator;
- }
- }
- sData = sData.slice( 0, sSeperator.length*-1 );
- sData += sNewline;
- }
-
- /* Remove the last new line */
- sData.slice( 0, -1 );
-
- /* Add the footer */
- if ( _oSettings.bIncFooter )
- {
- for ( i=0, iLen=_DTSettings.aoColumns.length ; i<iLen ; i++ )
- {
- if ( _DTSettings.aoColumns[i].nTf !== null &&
- (_oSettings.bIncHiddenColumns === true || _DTSettings.aoColumns[i].bVisible) )
- {
- sLoopData = _DTSettings.aoColumns[i].nTf.innerHTML.replace(/\n/g," ").replace( /<.*?>/g, "" );
- if ( sLoopData.indexOf( '&' ) != -1 )
- {
- sLoopData = fnHtmlDecode( sLoopData );
- }
-
- sData += fnBoundData( sLoopData, sBoundary, regex ) + sSeperator;
- }
- }
- sData = sData.slice( 0, sSeperator.length*-1 );
- }
-
- /* No pointers here - this is a string copy :-) */
- _sLastData = sData;
- return sData;
- }
-
-
- /* Initialise our new object */
- return _fnInit( oInit );
-}
-
-
-/*
- * Register a new feature with DataTables
- */
-if ( typeof $.fn.dataTable == "function" && typeof $.fn.dataTableExt.sVersion != "undefined" )
-{
- $.fn.dataTableExt.aoFeatures.push( {
- "fnInit": function( oSettings ) {
- return new TableTools( { "oDTSettings": oSettings } );
- },
- "cFeature": "T",
- "sFeature": "TableTools"
- } );
-}
-else
-{
- alert( "Warning: TableTools requires DataTables 1.5 or greater - "+
- "www.datatables.net/download");
-}
-})(jQuery);
+var TableTools;
+(function(e,m,f){TableTools=function(a,b){!this instanceof TableTools&&alert("Warning: TableTools must be initialised with the keyword 'new'");this.s={that:this,dt:a.fnSettings(),print:{saveStart:-1,saveLength:-1,saveScroll:-1,funcEnd:function(){}},buttonCounter:0,select:{type:"",selected:[],preRowSelect:null,postSelected:null,postDeselected:null,all:!1,selectedClass:""},custom:{},swfPath:"",buttonSet:[],master:!1,tags:{}};this.dom={container:null,table:null,print:{hidden:[],message:null},collection:{collection:null,
+background:null}};this.classes=e.extend(!0,{},TableTools.classes);this.s.dt.bJUI&&e.extend(!0,this.classes,TableTools.classes_themeroller);this.fnSettings=function(){return this.s};"undefined"==typeof b&&(b={});this._fnConstruct(b);return this};TableTools.prototype={fnGetSelected:function(){var a=[],b=this.s.dt.aoData,c,d;c=0;for(d=b.length;c<d;c++)b[c]._DTTT_selected&&a.push(b[c].nTr);return a},fnGetSelectedData:function(){var a=[],b=this.s.dt.aoData,c,d;c=0;for(d=b.length;c<d;c++)b[c]._DTTT_selected&&
+a.push(this.s.dt.oInstance.fnGetData(c));return a},fnIsSelected:function(a){a=this.s.dt.oInstance.fnGetPosition(a);return!0===this.s.dt.aoData[a]._DTTT_selected?!0:!1},fnSelectAll:function(a){var b=this._fnGetMasterSettings();this._fnRowSelect(!0===a?b.dt.aiDisplay:b.dt.aoData)},fnSelectNone:function(a){var b=this._fnGetMasterSettings();this._fnRowDeselect(!0===a?b.dt.aiDisplay:b.dt.aoData)},fnSelect:function(a){"single"==this.s.select.type?(this.fnSelectNone(),this._fnRowSelect(a)):"multi"==this.s.select.type&&
+this._fnRowSelect(a)},fnDeselect:function(a){this._fnRowDeselect(a)},fnGetTitle:function(a){var b="";"undefined"!=typeof a.sTitle&&""!==a.sTitle?b=a.sTitle:(a=f.getElementsByTagName("title"),0<a.length&&(b=a[0].innerHTML));return 4>"\u00a1".toString().length?b.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""):b.replace(/[^a-zA-Z0-9_\.,\-_ !\(\)]/g,"")},fnCalcColRatios:function(a){var b=this.s.dt.aoColumns,a=this._fnColumnTargets(a.mColumns),c=[],d=0,e=0,h,f;h=0;for(f=a.length;h<f;h++)a[h]&&(d=
+b[h].nTh.offsetWidth,e+=d,c.push(d));h=0;for(f=c.length;h<f;h++)c[h]/=e;return c.join("\t")},fnGetTableData:function(a){if(this.s.dt)return this._fnGetDataTablesData(a)},fnSetText:function(a,b){this._fnFlashSetText(a,b)},fnResizeButtons:function(){for(var a in ZeroClipboard_TableTools.clients)if(a){var b=ZeroClipboard_TableTools.clients[a];"undefined"!=typeof b.domElement&&b.domElement.parentNode&&b.positionElement()}},fnResizeRequired:function(){for(var a in ZeroClipboard_TableTools.clients)if(a){var b=
+ZeroClipboard_TableTools.clients[a];if("undefined"!=typeof b.domElement&&b.domElement.parentNode==this.dom.container&&!1===b.sized)return!0...
[truncated message content] |
|
From: <os...@us...> - 2012-08-25 17:56:31
|
Revision: 4591
http://oscss.svn.sourceforge.net/oscss/?rev=4591&view=rev
Author: oscim
Date: 2012-08-25 17:56:25 +0000 (Sat, 25 Aug 2012)
Log Message:
-----------
Fix
report element language manquant
Modified Paths:
--------------
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/languages/fr_FR/modules/account/sppc_cust_force.txt
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/classes/drivers/sqlmanufacturer.php
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/modules/pages/manufacturers.php
trunk/extensions/SPECIALS_stable/catalog/admin/includes/javascript/modules/products/specials.js.php
trunk/extensions/SPECIALS_stable/catalog/admin/includes/modules/products/specials.php
Removed Paths:
-------------
trunk/extensions/MANUFACTURERS_stable/catalog/admin/gabarit/
Modified: trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/languages/fr_FR/modules/account/sppc_cust_force.txt
===================================================================
--- trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/languages/fr_FR/modules/account/sppc_cust_force.txt 2012-08-25 16:53:12 UTC (rev 4590)
+++ trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/languages/fr_FR/modules/account/sppc_cust_force.txt 2012-08-25 17:56:25 UTC (rev 4591)
@@ -1,8 +1,8 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
+ @version 2.1.1
@date 06/06/10, 18:10
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@@ -11,6 +11,8 @@
$lang['module aca sppc cust force text description']= 'Gèrer les modules précisment par clients/membres';
$lang['tab customers module']= 'Modules';
+$lang['@history table heading orders count']= 'Cmd.nbr.';
+
$lang['heading title modules payment']= ' modules payment';
$lang['heading title modules shipping']= ' modules shipping';
$lang['heading title modules order total']= ' modules order total';
Modified: trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/classes/drivers/sqlmanufacturer.php
===================================================================
--- trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/classes/drivers/sqlmanufacturer.php 2012-08-25 16:53:12 UTC (rev 4590)
+++ trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/classes/drivers/sqlmanufacturer.php 2012-08-25 17:56:25 UTC (rev 4591)
@@ -127,17 +127,16 @@
self::getInstance();
$DB=Database::getInstance();
+
$sql ="";
if(isset($option['id'])) $sql .="AND manufacturers_id = '".(int)$option['id']."' ";
if(isset($option['name'])) $sql .="AND manufacturers_name = '".(string)tep_db_input($option['name'])."' ";
// if(isset($option['visible'])) $sql .="AND manufacturersvisible = '".(int)$option['visible']."' ";
- $sql="SELECT * FROM " . TABLE_MANUFACTURERS . " a ";
+ if($sql !='') $sql=" WHERE ".substr($sql,3);
- if($sql=='') $sql.=" WHERE ".substr($sql,3);
+ $res=$DB->query("SELECT * FROM " . TABLE_MANUFACTURERS . " a " . $sql);
- $res=$DB->query($sql);
-
$num = $res->__get('numRows');
if($num == 1){
Modified: trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/modules/pages/manufacturers.php
===================================================================
--- trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/modules/pages/manufacturers.php 2012-08-25 16:53:12 UTC (rev 4590)
+++ trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/modules/pages/manufacturers.php 2012-08-25 17:56:25 UTC (rev 4591)
@@ -379,7 +379,7 @@
case 'edit':
case 'new':
if( (int)self::$Id > 0) {
- self::$Info = sqlmanufacturer::fetch(array('id'=>self::$Id ), true);
+ self::$Info = sqlmanufacturer::fetch(array('id' =>self::$Id ), true);
}
else{
self::$Info = sqlmanufacturer::Specimen(true);
Modified: trunk/extensions/SPECIALS_stable/catalog/admin/includes/javascript/modules/products/specials.js.php
===================================================================
--- trunk/extensions/SPECIALS_stable/catalog/admin/includes/javascript/modules/products/specials.js.php 2012-08-25 16:53:12 UTC (rev 4590)
+++ trunk/extensions/SPECIALS_stable/catalog/admin/includes/javascript/modules/products/specials.js.php 2012-08-25 17:56:25 UTC (rev 4591)
@@ -70,7 +70,8 @@
$(this).parent().parent().fadeTo("slow", 1);
});
$("#SpecialInline input[type=checkbox]").mouseout(function(){
- $(this).parent().parent().fadeTo("slow", 0.5);
+ if( $(this).attr('checked') !='checked' )
+ $(this).parent().parent().fadeTo("slow", 0.5);
});
@@ -132,6 +133,33 @@
});
+ /**
+ Adjust all price based on % if base price product modifiéd
+ */
+ $("input#products_price").change(function(){
+ var base_price = $(this).val();
+
+ $("select.special_mode").each(function(){
+
+// alert($(this).key());
+ if( $(this).val() == 1){
+
+ var pourc = $(this).prev().val();
+
+ var new_price = self.calculprice( base_price,pourc);
+
+ $(this).prev().prev().val( new_price );
+
+ $(this).next().val( master.CalculGross(new_price) );
+
+ }
+ });
+
+ });
+
+
+
+
},
Modified: trunk/extensions/SPECIALS_stable/catalog/admin/includes/modules/products/specials.php
===================================================================
--- trunk/extensions/SPECIALS_stable/catalog/admin/includes/modules/products/specials.php 2012-08-25 16:53:12 UTC (rev 4590)
+++ trunk/extensions/SPECIALS_stable/catalog/admin/includes/modules/products/specials.php 2012-08-25 17:56:25 UTC (rev 4591)
@@ -246,20 +246,23 @@
$all_adjust = array();
-
if(is_array($_POST['special_mode']))
foreach($_POST['special_mode'] as $key=>$row){
// no price
if(isset($_POST['special_price'][$key]) && (float)$_POST['special_price'][$key] > 0)
$new = tep_db_prepare_input($_POST['special_price'][$key]);
+
elseif(isset($_POST['special_price_pourc'][$key]) && (float)$_POST['special_price_pourc'][$key] > 0){
$products_price = tep_db_prepare_input($_POST['products_price']);
$new = ($products_price - (( tep_db_prepare_input($_POST['special_price_pourc'][$key]) / 100) * $products_price));
}
+
else
$new = false;
+
+
if($new !=false) {
$all_adjust[$key]['special_apply_mode'] = (int)$row;
$all_adjust[$key]['specials_new_products_price'] = $new;
@@ -271,6 +274,8 @@
$all_adjust[$key]['specials_begin_date'] = $date_available;
}
+ else
+ $all_adjust[$key]['specials_begin_date'] = '1000-01-01 00:00:00';
if(isset($_POST['expires_date'][$key]) && (float)$_POST['expires_date'][$key] > 0){
@@ -279,7 +284,10 @@
$all_adjust[$key]['expires_date'] = $date_expire;
}
+ else
+ $all_adjust[$key]['expires_date'] = '1000-01-01 00:00:00';
+
if(isset($_POST['special_status'][$key]) && (float)$_POST['special_status'][$key] == 'on')
$all_adjust[$key]['status'] = 1;
else
@@ -287,20 +295,23 @@
}
else
- tep_db_query("DELETE FROM ".TABLE_SPECIALS." WHERE products_id = '".(int)$products_id."' AND customers_group_id = '".$group."' " );
+ tep_db_query("DELETE FROM ".TABLE_SPECIALS." WHERE products_id = '".(int)$products_id."' AND customers_group_id = '".$key."' " );
}
+// print_r($all_adjust);
+// exit;
+
foreach($all_adjust as $group=>$array){
$res = tep_db_query($sql="SELECT specials_id FROM " . TABLE_SPECIALS . " s WHERE products_id = '" . (int)$products_id . "' AND customers_group_id = '".$group."' ");
if( $res->__get('numRows') > 0 ){
$arr = $res->fetchAssoc();
- $r=tep_db_perform(TABLE_SPECIALS, $array , 'update', " products_id = '" . (int)$products_id . "' AND specials_id = '".$arr['specials_id']."' ");
+ $r=tep_db_perform(TABLE_SPECIALS, $array , 'update', " customers_group_id = '".$group."' AND products_id = '" . (int)$products_id . "' AND specials_id = '".$arr['specials_id']."' ");
}
else{
$array['products_id']=$products_id;
- $array['customers_group_id']=$key;
+ $array['customers_group_id']=$group;
$r=tep_db_perform(TABLE_SPECIALS, $array );
}
}
@@ -349,16 +360,24 @@
TODO: Not engine correct
*/
public function display_inline($array) {
-
+ self::$sInfo = array();
/**
TODO Couplage avec groupe client
*/
- $product_query = tep_db_query($sql="select s.products_id, s.specials_id, s.specials_new_products_price, s.expires_date, s.status, s.specials_begin_date , customers_group_id, special_apply_mode from ". TABLE_SPECIALS . " s where s.products_id = '" . (int)products::$Info->products_id . "'");
+ $product_query = tep_db_query($sql="select s.products_id, s.specials_id, s.specials_new_products_price, s.expires_date, s.status, s.specials_begin_date , customers_group_id, special_apply_mode from ". TABLE_SPECIALS . " s where s.products_id = '" . (int)products::$Info->products_id . "' ORDER BY customers_group_id ASC");
$product = $product_query->fetchAllAssoc();
- self::$sInfo = ( (tep_db_num_rows($product_query)>0)
- ? $product
- : array(array(
+
+ if( (tep_db_num_rows($product_query)>0) ){
+ foreach($product as $row){
+ self::$sInfo[$row['customers_group_id']] = $row;
+ }
+ }
+// print_r(self::$sInfo);
+// exit;
+// else{
+ if(!isset(self::$sInfo[0]))
+ self::$sInfo[0] = array(
'products_id'=> (int)products::$Info->products_id,
'specials_new_products_price'=> '',
'expires_date'=>'',
@@ -367,9 +386,13 @@
'customers_group_name'=> __('@specials customer groupe base'),
'special_apply_mode'=> 0,
'status'=> 0,
- ))
- );
+ );
+ if(!isset(self::$sInfo[0]['customers_group_name']))
+ self::$sInfo[0]['customers_group_name'] = __('@specials customer groupe base');
+// }
+
+
if (isset(products::$Info->products_sppc)){
foreach (products::$Info->products_sppc as $sppcGpId => $sppcInfos){
@@ -391,9 +414,21 @@
}
}
}
- self::$sInfo[0]['customers_group_name']= __('@specials customer groupe base');
+// self::$sInfo[0]= array(
+// 'products_id'=> (int)products::$Info->products_id,
+// 'specials_new_products_price'=> '',
+// 'expires_date'=>'',
+// 'specials_begin_date'=>'',
+// 'customers_group_id'=> 0,
+// 'customers_group_name'=> __('@specials customer groupe base'),
+// 'special_apply_mode'=> 0,
+// 'status'=> 0,
+// );
+
// print_r(self::$sInfo);
// exit;
+ ksort(self::$sInfo);
+
return array('title'=> __('heading specials inline') ,'text'=> tep_get_include_contents('products/'.__CLASS__.'/'.__FUNCTION__.'.edit'));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-25 16:53:18
|
Revision: 4590
http://oscss.svn.sourceforge.net/oscss/?rev=4590&view=rev
Author: oscim
Date: 2012-08-25 16:53:12 +0000 (Sat, 25 Aug 2012)
Log Message:
-----------
Fix bug filter in rapport sub modules
add colum number order in customers pages
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php
branches/2.1.1/catalog/admin/includes/modules/account/history.php
branches/2.1.1/catalog/admin/includes/modules/pages/products.php
branches/2.1.1/catalog/admin/includes/modules/rapport/customers_purchase.php
branches/2.1.1/catalog/admin/includes/modules/rapport/products_purchased.php
branches/2.1.1/catalog/admin/includes/modules/rapport/products_viewed.php
Modified: branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php 2012-08-25 07:52:32 UTC (rev 4589)
+++ branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php 2012-08-25 16:53:12 UTC (rev 4590)
@@ -228,4 +228,13 @@
//--></script>
+<?php elseif (products::$action == 'noedit'): ?>
+ <script type="text/javascript"><!--
+
+ $(function() {
+ $('input[type=text],input[type=radio],input[type=checkbox], textarea, select').attr('disabled', 'disabled');
+ });
+
+ //--></script>
+
<?php endif; ?>
Modified: branches/2.1.1/catalog/admin/includes/modules/account/history.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/account/history.php 2012-08-25 07:52:32 UTC (rev 4589)
+++ branches/2.1.1/catalog/admin/includes/modules/account/history.php 2012-08-25 16:53:12 UTC (rev 4590)
@@ -32,6 +32,58 @@
self::$cInfo = new objectInfo(array());
}
+
+
+ /**
+ @brief Load , adjust and define var environement GetConf master module
+ @param $opt array
+ type => '' string name type for define return
+ languages_id => '' int
+ */
+ public function GetConf($opt){
+ $array = array();
+
+ switch ($opt['type']) {
+ case 'allfields':
+ $array['COUNT(orders_id)'] = array(
+ 'sort'=>true,
+ 'alias'=>'orders_count',
+ 'text'=>__('@history table heading orders count'),
+ 'width'=>'8%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ );
+ break;
+
+ case 'tables':
+
+ $array['o'] = " LEFT JOIN " . TABLE_ORDERS . " o ON( o.customers_id ) ";
+
+ break;
+ }
+ return $array;
+ }
+
+
+ /**
+ @brief format db value for this allfields
+ @param $key string name key
+ @param $item array
+ */
+ public function formatdbvalue($key,$item){
+ global $languages_id;
+
+ switch($key){
+ case 'orders_count':
+ $value = (int)$item[$key];
+ break;
+ default:
+ $value = $item[$key] ;
+ }
+
+ return $value;
+ }
+
public function check_action($actions){
global $oscss;
self::$action=$actions['action'];
@@ -48,11 +100,9 @@
}
public function get_header(){
-
}
-
public function deleteconfirm_account($id){
// tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$id . "'");
}
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/products.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/products.php 2012-08-25 07:52:32 UTC (rev 4589)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/products.php 2012-08-25 16:53:12 UTC (rev 4590)
@@ -847,6 +847,7 @@
break;
+ case 'noedit':
case 'edit':
self::$Info = new objectInfo(sqlproduct::Specimen());
@@ -927,6 +928,7 @@
case 'detail':
case 'new':
case 'delete':
+ case 'noedit':
case 'edit':
global $languages_id;
@@ -1048,11 +1050,14 @@
/**
@remarks Normal View Page
*/
+ case 'noedit':
+ $action = 'edit';
case 'delete':
self::GetDBValue();
case 'copy_to':
case 'new':
case 'edit':
+
return MGabCont::CallGab($action,__FUNCTION__,__CLASS__);
default:
Modified: branches/2.1.1/catalog/admin/includes/modules/rapport/customers_purchase.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/rapport/customers_purchase.php 2012-08-25 07:52:32 UTC (rev 4589)
+++ branches/2.1.1/catalog/admin/includes/modules/rapport/customers_purchase.php 2012-08-25 16:53:12 UTC (rev 4590)
@@ -62,6 +62,23 @@
/**
*/
public function check_action($actions){
+
+ switch ($actions) {
+ /**
+ @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';
+ else
+ unset($_SESSION['filters'][__CLASS__]['allfields'][$key]);
+ }
+ break;
+ }
}
/**
@@ -70,7 +87,10 @@
function load_db_values ($id) {
$this->allfields = array(
- 'c.customers_id' => __('customers_purchase table heading id'),
+ 'c.customers_id' => array(
+ 'text'=> __('customers_purchase table heading id'),
+ 'default'=>true,
+ ),
'c.customers_firstname' =>array(
'text'=> __('customers_purchase table heading firstname'),
'default'=>true,
@@ -79,7 +99,10 @@
'text'=> __('customers_purchase table heading lastname'),
'default'=>true,
),
- 'c.customers_email_address' => __('customers_purchase table heading email'),
+ 'c.customers_email_address' =>array(
+ 'text'=> __('customers_purchase table heading email'),
+ 'default'=>true,
+ ),
'sum(op.products_quantity * op.final_price)' =>array(
'alias'=>'ordersum',
'text'=> __('customers_purchase table heading ordersum'),
@@ -103,32 +126,33 @@
else
$_SESSION['filters']['allfields'] = array();
+
$in_session = $_SESSION['filters']['allfields'];
$listfield = '';
foreach($this->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) )
+ ( isset($in_session[$alias]) && (string)$in_session[$alias] == 'on' )
+ || ( count($in_session) < 1 && ( is_array($row) && isset($row['default']) && $row['default'] == true) )
) {
- $_SESSION['filters']['allfields'][$clean] = 'on';
+ $_SESSION['filters']['allfields'][$alias] = 'on';
- 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%';
- }
-
/**
@remarks this define col theader title, and ajust html code
*/
@@ -157,8 +181,8 @@
),
);
+// var_dump($listfield);
-
global $languages_id;
$this->query['select'] = substr($listfield,0,-1);
Modified: branches/2.1.1/catalog/admin/includes/modules/rapport/products_purchased.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/rapport/products_purchased.php 2012-08-25 07:52:32 UTC (rev 4589)
+++ branches/2.1.1/catalog/admin/includes/modules/rapport/products_purchased.php 2012-08-25 16:53:12 UTC (rev 4590)
@@ -66,15 +66,22 @@
/**
*/
public function check_action($actions){
+ switch ($actions) {
+ /**
+ @remarks specific save in session value filters
+ */
+ case 'filters':
+ $_SESSION['filters'] =array();
- $_SESSION['filters'][__CLASS__]['allfields'] =array();
- foreach($_POST['filters']['listfield'] as $key=>$row){
- if( $row =='on' )
- $_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
- else
- unset($_SESSION['filters'][__CLASS__]['allfields'][$key]);
+
+ foreach($_POST['filters']['listfield'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
+ else
+ unset($_SESSION['filters'][__CLASS__]['allfields'][$key]);
+ }
+ break;
}
-
}
/**
@@ -83,14 +90,26 @@
function load_db_values ($id) {
$this->allfields = array(
- 'p.products_id' => __('products_purchased table heading number'),
- 'p.products_type' => __('products_purchased table heading type'),
+ 'p.products_id' =>array(
+ 'text'=> __('products_purchased table heading number'),
+ 'default'=>true,
+ ),
+ 'p.products_type' => array(
+ 'text'=> __('products_purchased table heading type'),
+ 'default'=>true,
+ ),
'p.products_model' =>array(
'text'=> __('products_purchased table heading model'),
'default'=>true,
),
- 'p.products_status' => __('products_purchased table heading status'),
- 'p.products_tax_class_id' => __('products_purchased table heading tax class id'),
+ 'p.products_status' => array(
+ 'text'=> __('products_purchased table heading status'),
+ 'default'=>true,
+ ),
+ 'p.products_tax_class_id' => array(
+ 'text'=> __('products_purchased table heading tax class id'),
+// 'default'=>true,
+ ),
'pd.products_name' =>array(
'text'=> __('products_purchased table heading products'),
'default'=>true,
@@ -101,28 +120,49 @@
),
);
- if((DataTypes::is_active('manufacturer')))
- $this->allfields['m.manufacturers_id'] = __('products_purchased table heading manufacturer id');
- $this->allfields['m.manufacturers_name'] = __('products_purchased table heading manufacturer');
+ if((DataTypes::is_active('manufacturer'))){
+ $this->allfields['m.manufacturers_id'] =array(
+ 'text'=> __('products_purchased table heading manufacturer id'),
+// 'default'=>true,
+ );
+ $this->allfields['m.manufacturers_name'] =array(
+ 'text'=> __('products_purchased table heading manufacturer'),
+ 'default'=>true,
+ );
+ }
-
if(isset($_SESSION['filters'][__CLASS__]['allfields']))
$_SESSION['filters']['allfields'] = $_SESSION['filters'] [__CLASS__]['allfields'];
else
$_SESSION['filters']['allfields'] = array();
+
$in_session = $_SESSION['filters']['allfields'];
$listfield = '';
foreach($this->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) )
+ ( isset($in_session[$alias]) && (string)$in_session[$alias] == 'on' )
+ || ( count($in_session) == 0 && ( is_array($row) && isset($row['default']) && $row['default'] == true) )
) {
- $_SESSION['filters']['allfields'][$clean] = 'on';
+ $_SESSION['filters']['allfields'][$alias] = 'on';
/**
@remarks this define col theader title, and ajust html code
@@ -131,9 +171,13 @@
/**
@remarks this define col in table, and if is possible sort
*/
- $this->listing['modele'][$key]=true;
- $listfield .=$key.',';
+ $this->listing['modele'][$alias]=true;
+ if($clean !=$alias)
+ $listfield .=$key.' as '.$alias.',';
+ else
+ $listfield .=$key.',';
+
}
}
@@ -172,13 +216,9 @@
*/
function FormatDBValue($item) {
$ord = array();
+
foreach($this->listing['modele'] as $k=>$r){
- if($k == 'customers_id')
- $ord[$k]= '<a href="'.tep_href_link(FILENAME_CUSTOMERS, 'action=noedit&cID='.$item[$k]).'" >'.$item[$k].'</a>';
- elseif($k == 'customers_email_address')
- $ord[$k]= '<a href="'.tep_href_link(FILENAME_MAIL, 'origin='.urlencode(FILENAME_RAPPORT.'?cID='.__CLASS__.'&action=view').'&customer='.$item[$k]).'" >'.$item[$k].'</a>';
- else $ord[$k]=$item[substr($k,(strpos($k,'.')+1))];
-
+ $ord[$k]=$item[$k];
}
return $ord;
Modified: branches/2.1.1/catalog/admin/includes/modules/rapport/products_viewed.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/rapport/products_viewed.php 2012-08-25 07:52:32 UTC (rev 4589)
+++ branches/2.1.1/catalog/admin/includes/modules/rapport/products_viewed.php 2012-08-25 16:53:12 UTC (rev 4590)
@@ -87,14 +87,26 @@
$this->allfields = array(
- 'p.products_id' => __('products_viewed table heading number'),
- 'p.products_type' => __('products_viewed table heading type'),
+ 'p.products_id' => array(
+ 'text'=>__('products_viewed table heading number'),
+ 'default'=>true,
+ ),
+ 'p.products_type' => array(
+ 'text'=>__('products_viewed table heading type'),
+ 'default'=>true,
+ ),
'p.products_model' => array(
'text'=>__('products_viewed table heading model'),
'default'=>true,
),
- 'p.products_status' => __('products_viewed table heading status'),
- 'p.products_tax_class_id' => __('products_viewed table heading tax class id'),
+ 'p.products_status' => array(
+ 'text'=>__('products_viewed table heading status'),
+ 'default'=>true,
+ ),
+ 'p.products_tax_class_id' => array(
+ 'text'=>__('products_viewed table heading tax class id'),
+// 'default'=>true,
+ ),
'pd.products_name' =>array(
'text'=> __('products_viewed table heading products'),
'default'=>true,
@@ -109,12 +121,18 @@
),
);
- if((DataTypes::is_active('manufacturer')))
- $this->allfields['m.manufacturers_id'] = __('products_viewed table heading manufacturer id');
- $this->allfields['m.manufacturers_name'] = __('products_viewed table heading manufacturer');
+ if((DataTypes::is_active('manufacturer'))){
+ $this->allfields['m.manufacturers_id'] =array(
+ 'text'=> __('products_viewed table heading manufacturer id'),
+// 'default'=>true,
+ );
+ $this->allfields['m.manufacturers_name'] =array(
+ 'text'=> __('products_viewed table heading manufacturer'),
+ 'default'=>true,
+ );
+ }
-
if(isset($_SESSION['filters'][__CLASS__]['allfields']))
$_SESSION['filters']['allfields'] = $_SESSION['filters'] [__CLASS__]['allfields'];
else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-25 07:52:38
|
Revision: 4589
http://oscss.svn.sourceforge.net/oscss/?rev=4589&view=rev
Author: oscim
Date: 2012-08-25 07:52:32 +0000 (Sat, 25 Aug 2012)
Log Message:
-----------
report update file for call new file .js.php for this module
Modified Paths:
--------------
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/modules/pages/customers_groups.php
Modified: trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/modules/pages/customers_groups.php
===================================================================
--- trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/modules/pages/customers_groups.php 2012-08-25 07:51:16 UTC (rev 4588)
+++ trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/modules/pages/customers_groups.php 2012-08-25 07:52:32 UTC (rev 4589)
@@ -55,47 +55,47 @@
case 'update':
$error = false;
- $customers_group_id = tep_db_prepare_input($_GET['gID']);
- $customers_group_name = tep_db_prepare_input($_POST['customers_group_name']);
- $customers_group_show_tax = tep_db_prepare_input($_POST['customers_group_show_tax']);
- $customers_group_tax_exempt = tep_db_prepare_input($_POST['customers_group_tax_exempt']);
- $customers_group_discount = tep_db_prepare_input($_POST['customers_group_discount']);
- $group_payment_allowed = '';
- if ($_POST['payment_allowed'] && $_POST['group_payment_settings'] == '1') {
- foreach($_POST['payment_allowed'] as $val) {
- if ($val == true) {
- $group_payment_allowed .= tep_db_prepare_input($val).';';
- }
- } // end while
- $group_payment_allowed = substr($group_payment_allowed,0,strlen($group_payment_allowed)-1);
- } // end if ($_POST['payment_allowed'])
- $group_shipment_allowed = '';
- if ($_POST['shipping_allowed'] && $_POST['group_shipment_settings'] == '1') {
- foreach($_POST['shipping_allowed'] as $val) {
- if ($val == true) {
- $group_shipment_allowed .= tep_db_prepare_input($val).';';
- }
- } // end while
- $group_shipment_allowed = substr($group_shipment_allowed,0,strlen($group_shipment_allowed)-1);
- } // end if ($_POST['shipment_allowed'])
- $group_tax_rates_exempt = '';
- if ($_POST['group_tax_rate_exempt_id'] && $_POST['group_tax_rate_exempt_settings'] == '1') {
- foreach($_POST['group_tax_rate_exempt_id'] as $val) {
- if (tep_not_null($val)) {
- $group_tax_rates_exempt .= tep_db_prepare_input($val).',';
- }
- } // end while
- $group_tax_rates_exempt = substr($group_tax_rates_exempt,0,strlen($group_tax_rates_exempt)-1);
- } // end if ($_POST['group_tax_rate_exempt_settings'])
- $group_order_total_allowed = '';
- if ($_POST['order_total_allowed'] && $_POST['group_order_total_settings'] == '1') {
- foreach($_POST['order_total_allowed'] as $val) {
- if ($val == true) {
- $group_order_total_allowed .= tep_db_prepare_input($val).';';
- }
- } // end while
- $group_order_total_allowed = substr($group_order_total_allowed,0,strlen($group_order_total_allowed)-1);
- } // end if ($_POST['order_total_allowed'])
+ $customers_group_id = tep_db_prepare_input($_GET['gID']);
+ $customers_group_name = tep_db_prepare_input($_POST['customers_group_name']);
+ $customers_group_show_tax = tep_db_prepare_input($_POST['customers_group_show_tax']);
+ $customers_group_tax_exempt = tep_db_prepare_input($_POST['customers_group_tax_exempt']);
+ $customers_group_discount = tep_db_prepare_input($_POST['customers_group_discount']);
+ $group_payment_allowed = '';
+ if ($_POST['payment_allowed'] && $_POST['group_payment_settings'] == '1') {
+ foreach($_POST['payment_allowed'] as $val) {
+ if ($val == true) {
+ $group_payment_allowed .= tep_db_prepare_input($val).';';
+ }
+ } // end while
+ $group_payment_allowed = substr($group_payment_allowed,0,strlen($group_payment_allowed)-1);
+ } // end if ($_POST['payment_allowed'])
+ $group_shipment_allowed = '';
+ if ($_POST['shipping_allowed'] && $_POST['group_shipment_settings'] == '1') {
+ foreach($_POST['shipping_allowed'] as $val) {
+ if ($val == true) {
+ $group_shipment_allowed .= tep_db_prepare_input($val).';';
+ }
+ } // end while
+ $group_shipment_allowed = substr($group_shipment_allowed,0,strlen($group_shipment_allowed)-1);
+ } // end if ($_POST['shipment_allowed'])
+ $group_tax_rates_exempt = '';
+ if ($_POST['group_tax_rate_exempt_id'] && $_POST['group_tax_rate_exempt_settings'] == '1') {
+ foreach($_POST['group_tax_rate_exempt_id'] as $val) {
+ if (tep_not_null($val)) {
+ $group_tax_rates_exempt .= tep_db_prepare_input($val).',';
+ }
+ } // end while
+ $group_tax_rates_exempt = substr($group_tax_rates_exempt,0,strlen($group_tax_rates_exempt)-1);
+ } // end if ($_POST['group_tax_rate_exempt_settings'])
+ $group_order_total_allowed = '';
+ if ($_POST['order_total_allowed'] && $_POST['group_order_total_settings'] == '1') {
+ foreach($_POST['order_total_allowed'] as $val) {
+ if ($val == true) {
+ $group_order_total_allowed .= tep_db_prepare_input($val).';';
+ }
+ } // end while
+ $group_order_total_allowed = substr($group_order_total_allowed,0,strlen($group_order_total_allowed)-1);
+ } // end if ($_POST['order_total_allowed'])
tep_db_query("update " . TABLE_CUSTOMERS_GROUPS . " set customers_group_name='" . $customers_group_name . "', customers_group_show_tax = '" . $customers_group_show_tax . "', customers_group_tax_exempt = '" . $customers_group_tax_exempt . "', group_payment_allowed = '". $group_payment_allowed ."', group_shipment_allowed = '". $group_shipment_allowed ."', group_order_total_allowed = '". $group_order_total_allowed ."', group_specific_taxes_exempt = '". $group_tax_rates_exempt ."', group_discount = '".$customers_group_discount."' where customers_group_id = '" . $customers_group_id ."'");
tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('gID', 'action')) . 'gID=' . $customers_group_id));
@@ -112,46 +112,46 @@
break;
case 'new' :
- $customers_group_name = (isset($_POST['customers_group_name'])) ?tep_db_prepare_input($_POST['customers_group_name']) : __('new groupe');
- $customers_group_tax_exempt = (isset($_POST['customers_group_tax_exempt'])) ?tep_db_prepare_input($_POST['customers_group_tax_exempt']) : false;
- $customers_group_show_tax = (isset($_POST['customers_group_show_tax'])) ?tep_db_prepare_input($_POST['customers_group_show_tax']):true;
- $customers_group_discount = (isset($_POST['customers_group_discount'])) ?tep_db_prepare_input($_POST['customers_group_discount']) : 0;
- $group_payment_allowed = '';
- if ($_POST['payment_allowed']) {
- foreach($_POST['payment_allowed'] as $val) {
- if ($val == true) {
- $group_payment_allowed .= tep_db_prepare_input($val).';';
- }
- } // end while
- $group_payment_allowed = substr($group_payment_allowed,0,strlen($group_payment_allowed)-1);
- } // end if ($_POST['payment_allowed'])
- $group_shipment_allowed = '';
- if ($_POST['shipping_allowed'] && $_POST['group_shipment_settings'] == '1') {
- foreach($_POST['shipping_allowed'] as $val) {
- if ($val == true) {
- $group_shipment_allowed .= tep_db_prepare_input($val).';';
- }
- } // end while
- $group_shipment_allowed = substr($group_shipment_allowed,0,strlen($group_shipment_allowed)-1);
- } // end if ($_POST['shipment_allowed'])
- $group_tax_rates_exempt = '';
- if ($_POST['group_tax_rate_exempt_id'] && $_POST['group_tax_rate_exempt_settings'] == '1') {
- foreach($_POST['group_tax_rate_exempt_id'] as $val) {
- if (tep_not_null($val)) {
- $group_tax_rates_exempt .= tep_db_prepare_input($val).',';
- }
- } // end while
- $group_tax_rates_exempt = substr($group_tax_rates_exempt,0,strlen($group_tax_rates_exempt)-1);
- } // end if ($_POST['group_tax_rate_exempt_settings'])
- $group_order_total_allowed = '';
- if ($_POST['order_total_allowed'] && $_POST['group_order_total_settings'] == '1') {
- foreach($_POST['order_total_allowed'] as $val) {
- if ($val == true) {
- $group_order_total_allowed .= tep_db_prepare_input($val).';';
- }
- } // end while
- $group_order_total_allowed = substr($group_order_total_allowed,0,strlen($group_order_total_allowed)-1);
- } // end if ($_POST['order_total_allowed'])
+ $customers_group_name = (isset($_POST['customers_group_name'])) ?tep_db_prepare_input($_POST['customers_group_name']) : __('new groupe');
+ $customers_group_tax_exempt = (isset($_POST['customers_group_tax_exempt'])) ?tep_db_prepare_input($_POST['customers_group_tax_exempt']) : false;
+ $customers_group_show_tax = (isset($_POST['customers_group_show_tax'])) ?tep_db_prepare_input($_POST['customers_group_show_tax']):true;
+ $customers_group_discount = (isset($_POST['customers_group_discount'])) ?tep_db_prepare_input($_POST['customers_group_discount']) : 0;
+ $group_payment_allowed = '';
+ if ($_POST['payment_allowed']) {
+ foreach($_POST['payment_allowed'] as $val) {
+ if ($val == true) {
+ $group_payment_allowed .= tep_db_prepare_input($val).';';
+ }
+ } // end while
+ $group_payment_allowed = substr($group_payment_allowed,0,strlen($group_payment_allowed)-1);
+ } // end if ($_POST['payment_allowed'])
+ $group_shipment_allowed = '';
+ if ($_POST['shipping_allowed'] && $_POST['group_shipment_settings'] == '1') {
+ foreach($_POST['shipping_allowed'] as $val) {
+ if ($val == true) {
+ $group_shipment_allowed .= tep_db_prepare_input($val).';';
+ }
+ } // end while
+ $group_shipment_allowed = substr($group_shipment_allowed,0,strlen($group_shipment_allowed)-1);
+ } // end if ($_POST['shipment_allowed'])
+ $group_tax_rates_exempt = '';
+ if ($_POST['group_tax_rate_exempt_id'] && $_POST['group_tax_rate_exempt_settings'] == '1') {
+ foreach($_POST['group_tax_rate_exempt_id'] as $val) {
+ if (tep_not_null($val)) {
+ $group_tax_rates_exempt .= tep_db_prepare_input($val).',';
+ }
+ } // end while
+ $group_tax_rates_exempt = substr($group_tax_rates_exempt,0,strlen($group_tax_rates_exempt)-1);
+ } // end if ($_POST['group_tax_rate_exempt_settings'])
+ $group_order_total_allowed = '';
+ if ($_POST['order_total_allowed'] && $_POST['group_order_total_settings'] == '1') {
+ foreach($_POST['order_total_allowed'] as $val) {
+ if ($val == true) {
+ $group_order_total_allowed .= tep_db_prepare_input($val).';';
+ }
+ } // end while
+ $group_order_total_allowed = substr($group_order_total_allowed,0,strlen($group_order_total_allowed)-1);
+ } // end if ($_POST['order_total_allowed'])
$last_id_query = tep_db_query("select MAX(customers_group_id) as last_cg_id from " . TABLE_CUSTOMERS_GROUPS . "");
$last_cg_id_inserted = tep_db_fetch_array($last_id_query);
@@ -164,7 +164,11 @@
return self::$action;
}
+
public function get_header(){
+
+ tep_include_file(DIR_WS_JS . "modules/pages/".__CLASS__.".js.php",true);
+/*
if ( (self::$action == 'new') || (self::$action == 'edit') ): ?>
<script language="javascript"><!--
function check_form() {
@@ -187,9 +191,13 @@
//--></script>
<?php endif;
+*/
}
+
+
+
public static function load_db_values($ID){
$DB=Database::getInstance();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-25 07:51:23
|
Revision: 4588
http://oscss.svn.sourceforge.net/oscss/?rev=4588&view=rev
Author: oscim
Date: 2012-08-25 07:51:16 +0000 (Sat, 25 Aug 2012)
Log Message:
-----------
Fix and add js layer for view active/inactive section html
Modified Paths:
--------------
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups/display_view.edit.gab
Added Paths:
-----------
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/javascript/
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/javascript/modules/
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/javascript/modules/pages/
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/javascript/modules/pages/customers_groups.js.php
Modified: trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups/display_view.edit.gab
===================================================================
--- trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups/display_view.edit.gab 2012-08-24 18:57:02 UTC (rev 4587)
+++ trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups/display_view.edit.gab 2012-08-25 07:51:16 UTC (rev 4588)
@@ -14,14 +14,16 @@
<h3><?php echo __('heading title'); ?></h3>
- <div class="button_nav">
- <?php echo '<a class="button" href="' . tep_href_link(customers_groups::FILENAME, 'action=new') . '">' . tep_image(DIR_WS_ICONS.'icon_add_new.png' , IMAGE_NEW_PRODUCT) . IMAGE_INSERT . '</a>'; ?>
- </div>
+<div class="button_nav">
+ <?php echo '<a class="button" href="' . tep_href_link(customers_groups::FILENAME, 'action=new') . '">' . tep_image(DIR_WS_ICONS.'icon_add_new.png' , IMAGE_NEW_PRODUCT) . IMAGE_INSERT . '</a>'; ?>
+</div>
-<div class="box_uniq block_form">
+<div class="box_uniq ">
<div id="tabs">
+
+
<ul>
<li><a href="#tabs-1"><?php echo __('tab groups data'); ?></a></li>
<li><a href="#tabs-2"><?php echo __('tab groups customers'); ?></a></li>
@@ -35,72 +37,125 @@
@brief detail this groups
*/
?>
- <div id="tabs-1" class="tabPage">
- <?php echo tep_draw_form('customers', customers_groups::FILENAME, tep_get_all_get_params(array('action')) . 'action='.((customers_groups::$action == 'edit')?'update':'new') , 'post', 'onSubmit="return check_form();"'); ?>
+ <div id="tabs-1" class="tabPage edit">
+ <?php echo tep_draw_form('customers', customers_groups::FILENAME, tep_get_all_get_params(array('action')) . 'action='.((customers_groups::$action == 'edit')?'update':'new') , 'post', 'onSubmit="return check_form();"'); ?>
+ <div class="block_form">
+ <fieldset class="block_field">
- <p class="block_input">
- <label for="customers_group_name"><?php echo __('entry groups name'); ?></label>
- <?php echo tep_draw_input_field('customers_group_name','', customers_groups::$cInfo->customers_group_name, 'maxlength="32"', false) . __('entry group name max length'); ?>
- </p>
+ <p class="block_input">
+ <label for="customers_group_name"><?php echo __('entry groups name'); ?></label>
+ <?php echo tep_draw_input_field('customers_group_name','', customers_groups::$cInfo->customers_group_name, 'maxlength="32"', false) . __('entry group name max length'); ?>
+ </p>
- <div class="fright block_input">
- <label for="customers_firstname"><?php echo __('entry group tax exempt'); ?></label>
- <?php echo tep_draw_pull_down_menu('customers_group_tax_exempt', customers_groups::$cg_tax_exempt_array, (customers_groups::$cInfo->customers_group_tax_exempt==1) ? '1' : '0'); ?>
- <label for="customers_group_show_tax"><?php echo __('entry group show tax'); ?></label>
- <?php echo tep_draw_pull_down_menu('customers_group_show_tax', customers_groups::$cg_show_tax_array, (customers_groups::$cInfo->customers_group_show_tax==1 ) ? '1' : '0') ; ?>
- <p><?php echo __('entry group show tax explain 1'); ?></p>
- <p><?php echo __('entry group show tax explain 2'); ?></p>
- </div>
+ <fieldset class="block_field">
+ <p class="block_input">
+ <label for="customers_firstname"><?php echo __('entry group tax exempt'); ?></label>
+ <?php echo tep_draw_pull_down_menu('customers_group_tax_exempt', customers_groups::$cg_tax_exempt_array, (customers_groups::$cInfo->customers_group_tax_exempt==1) ? '1' : '0'); ?>
+ </p>
- <div class="block_input">
- <label for="group_shipment_settings"><?php echo __('heading title modules payment'); ?></label>
- <br />
- <?php echo tep_draw_radio_field('group_payment_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_payment_allowed)? '1' : '0' )) . ' ' . __('entry group payment set') . ' ' . tep_draw_radio_field('group_payment_settings','', '0', (tep_not_null(customers_groups::$cInfo->group_payment_allowed)? '0' : '1' )) . ' ' . __('entry group payment default') ; ?>
- <ul>
- <?php foreach(customers_groups::get_array_mod('payment') as $item) echo '<li>'.$item['input'].' '.$item['name'].'</li>'; ?>
- </ul>
- <p><?php echo __('entry payment set explain') ?></p>
- </div>
+ <fieldset class="block_field">
+ <div class="block_input">
+ <label for="customers_group_show_tax"><?php echo __('entry group show tax'); ?></label>
+ <?php echo tep_draw_pull_down_menu('customers_group_show_tax', customers_groups::$cg_show_tax_array, (customers_groups::$cInfo->customers_group_show_tax==1 ) ? '1' : '0') ; ?>
+ <p><?php echo __('entry group show tax explain 1'); ?></p>
+ <p><?php echo __('entry group show tax explain 2'); ?></p>
+ </div>
+ </fieldset>
+ <fieldset class="block_field">
+ <legend><?php echo __('heading title group tax rates exempt'); ?></legend>
- <div class="block_input">
- <label for="group_shipment_settings"><?php echo __('heading title modules shipping'); ?></label>
- <br />
- <?php echo tep_draw_radio_field('group_shipment_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_shipment_allowed)? '1' : '0' )) . ' ' . __('entry group shipping set') . ' ' . tep_draw_radio_field('group_shipment_settings','', '0', (tep_not_null(customers_groups::$cInfo->group_shipment_allowed)? '0' : '1' )) . ' ' . __('entry group shipping default') ; ?>
- <ul>
- <?php foreach(customers_groups::get_array_mod('shipping') as $item) echo '<li>'.$item['input'].' '.$item['name'].'</li>'; ?>
- </ul>
- <p><?php echo __('entry shipping set explain') ?></p>
- </div>
+ <div class="block_input">
+ <p>
+ <?php echo tep_draw_radio_field('group_tax_rate_exempt_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_specific_taxes_exempt)? '1' : '0' )) . ' ' . __('entry group tax rates exempt') . ' ' . tep_draw_radio_field('group_tax_rate_exempt_settings', '','0', ((tep_not_null(customers_groups::$cInfo->group_specific_taxes_exempt)) ? '0' : '1' )) . ' ' . __('entry group tax rates default') ; ?>
+ </p>
+ <ul>
+ <?php $tax_query = tep_db_query("select tax_rates_id, tax_rate, tax_class_title , tax_description FROM " . TABLE_TAX_RATES . " r LEFT JOIN ".TABLE_TAX_CLASS." c ON( c.tax_class_id = r.tax_class_id ) order by r.tax_rates_id");
+ while ($tax_rate = tep_db_fetch_array($tax_query)) { ?>
+ <li><?php echo tep_draw_checkbox_field('group_tax_rate_exempt_id[' . $tax_rate['tax_rates_id'] . ']','', $tax_rate['tax_rates_id'] , (in_array($tax_rate['tax_rates_id'], (array)@$group_tax_ids_exempt)) ? 1 : 0); ?> <?php echo '('.$tax_rate['tax_class_title'].' - '.$tax_rate['tax_rate'].' )' . $tax_rate['tax_description']; ?></li>
+ <?php } ?>
+ </ul>
+ <p><?php echo __('entry tax rates exempt explain') ?></p>
+ </div>
+ </fieldset>
+ </fieldset>
- <div class="block_input">
- <label for="group_shipment_settings"><?php echo __('heading title modules order total'); ?></label>
- <br />
- <?php echo tep_draw_radio_field('group_order_total_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_order_total_allowed)? '1' : '0' )) . ' ' . __('entry group order total set') . ' ' . tep_draw_radio_field('group_order_total_settings', '','0', (tep_not_null(customers_groups::$cInfo->group_order_total_allowed)? '0' : '1' )) . ' ' . __('entry group order total default') ; ?>
- <ul>
- <?php foreach(customers_groups::get_array_mod('order_total') as $item) echo '<li>'.$item['input'].' '.$item['name'].'</li>'; ?>
- </ul>
- <p><?php echo __('entry order total set explain') ?></p>
- </div>
- <div class="block_input">
- <h4><?php echo __('heading title group tax rates exempt'); ?></h4>
- <?php echo tep_draw_radio_field('group_tax_rate_exempt_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_specific_taxes_exempt)? '1' : '0' )) . ' ' . __('entry group tax rates exempt') . ' ' . tep_draw_radio_field('group_tax_rate_exempt_settings', '','0', ((tep_not_null(customers_groups::$cInfo->group_specific_taxes_exempt)) ? '0' : '1' )) . ' ' . __('entry group tax rates default') ; ?>
- <ul>
- <?php $tax_query = tep_db_query("select tax_rates_id, tax_rate, tax_class_title , tax_description FROM " . TABLE_TAX_RATES . " r LEFT JOIN ".TABLE_TAX_CLASS." c ON( c.tax_class_id = r.tax_class_id ) order by r.tax_rates_id");
- while ($tax_rate = tep_db_fetch_array($tax_query)) { ?>
- <li><?php echo tep_draw_checkbox_field('group_tax_rate_exempt_id[' . $tax_rate['tax_rates_id'] . ']','', $tax_rate['tax_rates_id'] , (in_array($tax_rate['tax_rates_id'], (array)@$group_tax_ids_exempt)) ? 1 : 0); ?> <?php echo '('.$tax_rate['tax_class_title'].' - '.$tax_rate['tax_rate'].' )' . $tax_rate['tax_description']; ?></li>
- <?php } ?>
- </ul>
- <p><?php echo __('entry tax rates exempt explain') ?></p>
- </div>
- <div class="button_nav">
- <?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE) . tep_js_back(tep_href_link(customers_groups::FILENAME), IMAGE_CANCEL) ; ?>
- </div>
+
+
+ <fieldset class="block_field">
+ <legend><?php echo __('heading title modules payment'); ?></legend>
+
+ <div class="block_input">
+ <p>
+ <?php echo tep_draw_radio_field('group_payment_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_payment_allowed)? '1' : '0' ), false, 'class="list_active"' ) .
+ ' ' . __('entry group payment set') . ' ' .
+ tep_draw_radio_field('group_payment_settings','', '0', (tep_not_null(customers_groups::$cInfo->group_payment_allowed)? '0' : '1' ), false, 'class="list_active"' ) .
+ ' ' . __('entry group payment default') ;
+ ?>
+ </p>
+
+ <div class="list_content">
+ <ul>
+ <?php foreach(customers_groups::get_array_mod('payment') as $item) echo '<li>'.$item['input'].' '.$item['name'].'</li>'; ?>
+ </ul>
+
+ <p><?php echo __('entry payment set explain') ?></p>
+ </div>
+ </div>
+ </fieldset>
+
+
+
+ <fieldset class="block_field">
+ <legend><?php echo __('heading title modules shipping'); ?></legend>
+
+ <div class="block_input">
+ <p>
+ <?php echo tep_draw_radio_field('group_shipment_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_shipment_allowed)? '1' : '0' ), false, 'class="list_active"') . ' ' . __('entry group shipping set') . ' ' . tep_draw_radio_field('group_shipment_settings','', '0', (tep_not_null(customers_groups::$cInfo->group_shipment_allowed)? '0' : '1' ), false, 'class="list_active"') . ' ' . __('entry group shipping default') ; ?>
+ </p>
+
+ <div class="list_content">
+ <ul>
+ <?php foreach(customers_groups::get_array_mod('shipping') as $item) echo '<li>'.$item['input'].' '.$item['name'].'</li>'; ?>
+ </ul>
+ <p><?php echo __('entry shipping set explain') ?></p>
+ </div>
+ </div>
+ </fieldset>
+
+
+ <fieldset class="block_field">
+ <legend><?php echo __('heading title modules order total'); ?></legend>
+
+ <div class="block_input">
+
+ <p>
+ <?php echo tep_draw_radio_field('group_order_total_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_order_total_allowed)? '1' : '0' ), false, 'class="list_active"') . ' ' . __('entry group order total set') . ' ' . tep_draw_radio_field('group_order_total_settings', '','0', (tep_not_null(customers_groups::$cInfo->group_order_total_allowed)? '0' : '1' ), false, 'class="list_active"') . ' ' . __('entry group order total default') ; ?>
+ </p>
+
+ <div class="list_content">
+ <ul>
+ <?php foreach(customers_groups::get_array_mod('order_total') as $item) echo '<li>'.$item['input'].' '.$item['name'].'</li>'; ?>
+ </ul>
+ <p><?php echo __('entry order total set explain') ?></p>
+ </div>
+ </div>
+ </fieldset>
+
+
+
+ <div class="button_nav">
+ <?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE) . tep_js_back(tep_href_link(customers_groups::FILENAME), IMAGE_CANCEL) ; ?>
+ </div>
+
+
+ </fieldset>
+ </div>
</form>
</div>
Added: trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/javascript/modules/pages/customers_groups.js.php
===================================================================
--- trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/javascript/modules/pages/customers_groups.js.php (rev 0)
+++ trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/javascript/modules/pages/customers_groups.js.php 2012-08-25 07:51:16 UTC (rev 4588)
@@ -0,0 +1,112 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @customers_groups osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 28/12/11, 17:30
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+?>
+<?php if ( in_array(customers_groups::$action, array('edit')) ): ?>
+ <script type="text/javascript"><!--
+
+(function(){ // début de scope local
+OSCSS_JSCORE.customers_groups = OSCSS_JSCORE.customers_groups || {};
+// déclaration de la classe de utils proprement dite
+OSCSS_JSCORE.customers_groups.utils = {
+ // déclaration de nos variables statiques
+
+
+ // déclaration de nos méthodes
+ // Check
+ Init:function( ) {
+
+
+
+
+ // if change
+ $("select#customers_group_tax_exempt").change(function(){
+ self.AdjustmentTaxes();
+ });
+
+ // if change
+ $("input.list_active").change(function(){
+ self.AdjustmentListConent( $( this ) );
+
+ });
+
+
+
+ // onload
+ $(function() {
+
+ self.AdjustmentTaxes();
+
+
+ $("input.list_active").each(function(){
+ self.AdjustmentListConent( $( this ) );
+ });
+
+ });
+
+ },
+
+
+ // Check
+ AdjustmentTaxes:function( ) {
+ var $balisebase = $("select#customers_group_tax_exempt").parent();
+
+ if( $('select#customers_group_tax_exempt option:selected').val() == 1){
+ $balisebase.next().fadeTo("slow", 0.5);
+ $balisebase.next().next().fadeTo("slow", 0.5);
+ }
+ else{
+ $balisebase.next().fadeTo("slow", 1);
+ $balisebase.next().next().fadeTo("slow", 1);
+ }
+
+ },
+
+ AdjustmentListConent:function( $current ) {
+ var $balisebase = $current.parent();
+
+ if( $current.val() == 0){
+ $balisebase.next().fadeTo("slow", 0.5);
+ }
+ else{
+ $balisebase.next().fadeTo("slow", 1);
+ }
+
+ },
+
+
+// var stringKey = $current.val();
+//
+// if(stringKey.length <= 3 )
+// return false;
+//
+// $.get("<?php //echo tep_get_http().DIR_WS_ADMIN .customers_groups::FILENAME ?>",
+// { 'action': "isValidKey", 'cID' : <?php //echo customers_groups::$Id; ?>, 'forceajax' : true , 'stringkey': stringKey },
+// function(data) {
+// $current.replaceWith(data);
+// });
+// return true;
+// },
+
+
+};
+
+// trick JavaScript pour émuler le self:: en PHP : on utilise une variable locale
+var self = OSCSS_JSCORE.customers_groups.utils;
+})(); // fin de scope locale
+
+ //--></script>
+
+
+<?php oscss_cstr::CallBack('OSCSS_JSCORE.customers_groups.utils.Init();'); // Active check key ?>
+
+
+<?php endif; ?>
\ 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...> - 2012-08-24 18:57:08
|
Revision: 4587
http://oscss.svn.sourceforge.net/oscss/?rev=4587&view=rev
Author: oscim
Date: 2012-08-24 18:57:02 +0000 (Fri, 24 Aug 2012)
Log Message:
-----------
suppression reliquat compatibilit?\195?\169 php 4
amelioration coherance code de page d'edition de produit
ajustement less
amelioration js de products.php.js
amelioration page listing stock avec action pour chque ligne de produit
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/functions/general.php
branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/products/stock.listing.gab
branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php
branches/2.1.1/catalog/admin/includes/template/defaut/css/less/datatable.less
Modified: branches/2.1.1/catalog/admin/includes/functions/general.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/functions/general.php 2012-08-22 14:31:12 UTC (rev 4586)
+++ branches/2.1.1/catalog/admin/includes/functions/general.php 2012-08-24 18:57:02 UTC (rev 4587)
@@ -550,8 +550,8 @@
@param array
*/
function convert_json($array){
- if(function_exists('json_encode'))return json_encode($array);
- else return FastJSON::convert($array);
+ if(function_exists('json_encode'))
+ return json_encode($array);
}
Modified: branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-08-22 14:31:12 UTC (rev 4586)
+++ branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-08-24 18:57:02 UTC (rev 4587)
@@ -123,28 +123,30 @@
<ul class="w_100">
<?php if(isset($title) && is_array($title)): ?>
- <?php $i=0; foreach ($title as $item): ?>
+ <?php if (isset(products::$Info->products_sppc)): ?>
+ <li><a href="#products_price-<?php echo 0; ?>"><?php echo __('text customers groups note').tep_image(DIR_WS_ICONS.'icon_help.gif', __('text customers groups note detail')) ?></a></li>
+ <?php endif; ?>
+
+ <?php $i=1; foreach ($title as $item): ?>
<li><a href="#products_price-<?php echo $i++; ?>"><?php echo $item; ?></a></li>
<?php endforeach ; ?>
<?php endif; ?>
- <?php if (isset(products::$Info->products_sppc)): ?>
- <li><a href="#products_price-<?php echo $i++; ?>"><?php echo __('text customers groups note').tep_image(DIR_WS_ICONS.'icon_help.gif', __('text customers groups note detail')) ?></a></li>
- <?php endif; ?>
+
</ul>
<ul class="w_100">
<?php if(isset($title) && is_array($title)): ?>
- <?php $i=0; foreach ($text as $item): ?>
+ <?php $i=1; foreach ($text as $item): ?>
<li id="products_price-<?php echo $i++; ?>"><?php echo $item; ?></li>
<?php endforeach ; ?>
<?php endif; ?>
<?php if (isset(products::$Info->products_sppc)): ?>
- <li id="products_price-<?php echo $i++; ?>" class="w_100">
+ <li id="products_price-0" class="w_100">
<ul class="clear w_100">
<?php foreach (products::$Info->products_sppc as $sppcGpId => $sppcInfos): ?>
<li class="block_input price">
Modified: branches/2.1.1/catalog/admin/includes/gabarit/products/stock.listing.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/products/stock.listing.gab 2012-08-22 14:31:12 UTC (rev 4586)
+++ branches/2.1.1/catalog/admin/includes/gabarit/products/stock.listing.gab 2012-08-24 18:57:02 UTC (rev 4587)
@@ -28,6 +28,7 @@
<th style="width:10%" class="tcenter"><?php echo __('table heading model'); ?></th>
<th style="width:25%" class="tleft"><?php echo __('table heading stock'); ?></th>
<th style="width:12%" class="tleft"><?php echo __('table heading price'); ?></th>
+ <th style="width:12%" class="tleft"><?php echo __(''); ?></th>
</tr>
</thead>
<tbody>
@@ -42,6 +43,19 @@
<td style="width:10%" class="tcenter"><?php echo $row['products_model']; ?></td>
<td style="width:5%" class="tcenter"><?php echo $row['products_quantity']; ?></td>
<td style="width:5%" class="tcenter"><?php echo $row['products_price']; ?></td>
+ <td style="width:5%" class="tcenter"><?php
+printf(
+ CsrtAction::getFormat('row_action'),
+ '' ,
+ sprintf(CsrtAction::getLink('row_action_right', __('image view public') , 'publiclink'), '', tep_catalog_href_link('index.php', 'id=' . $row['products_id'],'SSL', true, 'forceview') ,' target="blank" ' ).
+ ((_cst_bool('STOCK_CHECK'))
+ ? sprintf(CsrtAction::getLink('row_action_right', __('txt stock') , 'stock'), 'fancyView', tep_href_link(FILENAME_STOCK, 'product_id=' . $row['products_id'].'&origin='.FILENAME_STOCK) ,'' )
+ : ''
+ ).
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(FILENAME_PRODUCTS, 'pID=' . $row['products_id'] . '&action=edit') ,'' )
+ );
+
+ ?></td>
</tr>
<?php else : ?>
@@ -52,6 +66,19 @@
<td style="width:10%" class="tcenter"><?php echo $row['products_model']; ?></td>
<td style="width:5%" class="tcenter"><?php echo $row['products_quantity']; ?></td>
<td style="width:5%" class="tcenter"><?php echo $row['products_price']; ?></td>
+ <td style="width:5%" class="tcenter"><?php
+printf(
+ CsrtAction::getFormat('row_action'),
+ '' ,
+ sprintf(CsrtAction::getLink('row_action_right', __('image view public') , 'publiclink'), '', tep_catalog_href_link('index.php', 'id=' . $row['products_id'],'SSL', true, 'forceview') ,' target="blank" ' ).
+ ((_cst_bool('STOCK_CHECK'))
+ ? sprintf(CsrtAction::getLink('row_action_right', __('txt stock') , 'stock'), 'fancyView', tep_href_link(FILENAME_STOCK, 'product_id=' . $row['products_id'].'&origin='.FILENAME_STOCK) ,'' )
+ : ''
+ ).
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(FILENAME_PRODUCTS, 'pID=' . $row['products_id'] . '&action=edit'.'&origin='.FILENAME_STOCK) ,'' )
+ );
+
+ ?></td>
</tr>
<tr class=" attribute stock">
@@ -135,4 +162,5 @@
</tbody>
</table>
+ <br class="clear" />
</div>
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php 2012-08-22 14:31:12 UTC (rev 4586)
+++ branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php 2012-08-24 18:57:02 UTC (rev 4587)
@@ -19,44 +19,85 @@
OSCSS_JSCORE.products.utlis = {
// déclaration de nos variables statiques
+ loopfinal : {},
// déclaration de nos variables statiques
- settings : {
+ prices: {
+ base : 0,
+ gross : 0,
+ final : 0,
},
+
+
+
// déclaration de nos méthodes
// Check
Init:function( ) {
var taxRate = self.getTaxRate();
+ self.GetAllValues();
+
$("input#products_price, select#products_tax_class_id").change(function(){
- self.updateGross( $(this) );
+ self.updateGross();
+ self.AppliValues();
});
$("input#products_price_gross").change(function(){
self.updateNet( $(this) );
+ self.AppliValues();
});
+
},
+
// Public methode
- updateGross:function( ) {
- var grossValue = self.CalculGross( $("input#products_price").val() );
+ GetAllValues:function( ) {
+ self.prices.gross = $("input#products_price_gross").val( );
+ self.prices.final = $("input#products_price_final").val( );
+ self.prices.base = $("input#products_price").val( );
+ },
- $("input#products_price_gross").val( self.doRound(grossValue, 6) );
- $("input#products_price_final").val( self.doRound(grossValue, 6) );
+ AppliValues:function( ) {
+ $("input#products_price_gross").val( self.doRound( self.prices.gross, 6) );
+// $("input#products_price_final").val( self.doRound( self.prices.final, 6) );
+ $("input#products_price").val( self.doRound( self.prices.base, 6) );
},
+ updateGross:function() {
+ self.prices.base = $("input#products_price").val();
+ var grossValue = self.CalculGross( self.prices.base );
+
+ self.prices.gross = self.doRound( grossValue , 6);
+// self.prices.final = self.doRound( grossValue , 6) ;
+
+ self.CalculFinal( grossValue);
+ },
+
updateNet:function( $current ) {
- var netValue = $current.val();
+ self.prices.gross = $current.val();
- $("input#products_price_final").val( self.doRound(netValue, 6) );
- $("input#products_price").val( self.doRound( self.CalculNet( netValue ) , 6) );
+ self.prices.base = self.doRound( self.CalculNet( self.prices.gross ) , 6) ;
+// self.prices.final = self.doRound( self.prices.gross , 6) ;
+
+ self.CalculFinal( self.prices.gross );
},
// Internal Methode ( private )
+ CalculFinal:function( basefinal ) {
+
+ for( var item in self.loopfinal ){
+ println( item +':'+ self.loopfinal[item] );
+
+
+ }
+
+ self.prices.final = self.doRound( basefinal , 6) ;
+ },
+
CalculGross:function( value ) {
var taxRate = self.getTaxRate();
@@ -66,6 +107,7 @@
return value;
},
+
CalculNet:function( value ) {
var taxRate = self.getTaxRate();
@@ -75,9 +117,11 @@
return value;
},
+
doRound:function( x, places) {
return Math.round(x * Math.pow(10, places)) / Math.pow(10, places);
},
+
getTaxRate:function( ) {
var tax_rates = new Array();
<?php
Modified: branches/2.1.1/catalog/admin/includes/template/defaut/css/less/datatable.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/defaut/css/less/datatable.less 2012-08-22 14:31:12 UTC (rev 4586)
+++ branches/2.1.1/catalog/admin/includes/template/defaut/css/less/datatable.less 2012-08-24 18:57:02 UTC (rev 4587)
@@ -199,7 +199,6 @@
.dataTables_wrapper {
position: relative;
clear: both;
- min-height:200px;
.bw-gradient( @color_bg_gradient_base, @color_bg_gradient_eob, @color_bg_gradient_eon) ;
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-22 14:31:23
|
Revision: 4586
http://oscss.svn.sourceforge.net/oscss/?rev=4586&view=rev
Author: oscim
Date: 2012-08-22 14:31:12 +0000 (Wed, 22 Aug 2012)
Log Message:
-----------
suppression elmeent obsolete , comptaibilit?\195?\169 php < 5.3
Removed Paths:
-------------
branches/2.1.1/catalog/common/classes/FastJSON.php
Deleted: branches/2.1.1/catalog/common/classes/FastJSON.php
===================================================================
--- branches/2.1.1/catalog/common/classes/FastJSON.php 2012-08-21 06:47:46 UTC (rev 4585)
+++ branches/2.1.1/catalog/common/classes/FastJSON.php 2012-08-22 14:31:12 UTC (rev 4586)
@@ -1,368 +0,0 @@
-<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
-/**_______________________________________
- *
- * FastJSON,
- * simple and fast Pear Service_JSON encoder/decoder alternative
- * [http://pear.php.net/pepr/pepr-proposal-show.php?id=198]
- * ---------------------------------------
- * This class is about two time faster than Pear Service_JSON class.
- * This class is probably not powerful as Service_JSON but it has
- * no dependencies and converts correctly ASCII range 0x00 - 0x1F too.
- * There's any string convertion, just regular RFC specific characters are converted
- * into \u00XX string.
- * To don't have problems with other chars try to use utf8_encode($json_encoded_string).
- * To recieve correctly JSON strings from JavaScript use encodeURIComponent then
- * use, if is necessary, utef8_decode before JS to PHP convertion.
- * decode method doesn't returns a standard object class but You can
- * create the corret class directly with FastJSON::convert method
- * and with them You can manage JS Date objects too.
- * ---------------------------------------
- * Summary of static public methods
- *
- * convert
- * extra, special method
- *
- * decode
- * converts a valid JSON string
- * into a native PHP variable
- *
- * encode
- * converts a native php variable
- * into a valid JSON string
- * ---------------------------------------
- *
- * Special FastJSON::convert method Informations
- * _______________________________________
- * ---------------------------------------
- * This method is used by FastJSON::encode method but should be used
- * to do these convertions too:
- *
- * - JSON string to time() integer:
- *
- * FastJSON::convert(decodedDate:String):time()
- *
- * If You recieve a date string rappresentation You
- * could convert into respective time() integer.
- * Example:
- * FastJSON::convert(FastJSON::decode($clienttime));
- * // i.e. $clienttime = 2006-11-09T14:42:30
- * // returned time will be an integer useful with gmdate or date
- * // to create, for example, this string
- * // Thu Nov 09 2006 14:42:30 GMT+0100 (Rome, Europe)
- *
- * - time() to JSON string:
- *
- * FastJSON::convert(time():Int32, true:Boolean):JSON Date String format
- *
- * You could send server time() informations and send them to clients.
- * Example:
- * FastJSON::convert(time(), true);
- * // i.e. 2006-11-09T14:42:30
- *
- * - associative array to generic class:
- *
- * FastJSON::convert(array(params=>values), new GenericClass):new Instance of GenericClass
- *
- * With a decoded JSON object You could convert them
- * into a new instance of your Generic Class.
- * Example:
- * class MyClass {
- * var $param = "somevalue";
- * function MyClass($somevar) {
- * $this->somevar = $somevar;
- * };
- * function getVar = function(){
- * return $this->somevar;
- * };
- * };
- *
- * $instance = new MyClass("example");
- * $encoded = FastJSON::encode($instance);
- * // {"param":"somevalue"}
- *
- * $decoded = FastJSON::decode($encoded);
- * // $decoded instanceof Object => true
- * // $decoded instanceof MyClass => false
- *
- * $decoded = FastJSON::convert($decoded, new MyClass("example"));
- * // $decoded instanceof Object => true
- * // $decoded instanceof MyClass => true
- *
- * $decoded->getVar(); // example
- *
- * ---------------------------------------
- *
- * @author Andrea Giammarchi
- * @site http://www.devpro.it/
- * @version 0.4 [fixed string convertion problems, add stdClass optional convertion instead of associative array (used by default)]
- * @requires anything
- * @compatibility PHP >= 4
- * @license
- * ---------------------------------------
- *
- * Copyright (c) 2006 - 2007 Andrea Giammarchi
- *
- * Permission is hereby granted, free of charge,
- * to any person obtaining a copy of this software and associated
- * documentation files (the "Software"),
- * to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
- * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * _______________________________________
- */
-class FastJSON {
-
- // public methods
-
- /**
- * public static method
- *
- * FastJSON::convert(params:* [, result:Instance]):*
- *
- * @param * String or Object
- * @param Instance optional new generic class instance if first
- * parameter is an object.
- * @return * time() value or new Instance with object parameters.
- *
- * @note please read Special FastJSON::convert method Informations
- */
- public static function convert($params, $result = null){
- switch(gettype($params)){
- case 'array':
- $tmp = array();
- foreach($params as $key => $value) {
- if(($value = FastJSON::encode($value)) !== '')
- array_push($tmp, FastJSON::encode(strval($key)).':'.$value);
- };
- $result = '{'.implode(',', $tmp).'}';
- break;
- case 'boolean':
- $result = $params ? 'true' : 'false';
- break;
- case 'double':
- case 'float':
- case 'integer':
- $result = $result !== null ? strftime('%Y-%m-%dT%H:%M:%S', $params) : strval($params);
- break;
- case 'NULL':
- $result = 'null';
- break;
- case 'string':
- $i = create_function('&$e, $p, $l', 'return intval(substr($e, $p, $l));');
- if(preg_match('/^[0-9]{4}\-[0-9]{2}\-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/', $params))
- $result = mktime($i($params, 11, 2), $i($params, 14, 2), $i($params, 17, 2), $i($params, 5, 2), $i($params, 9, 2), $i($params, 0, 4));
- break;
- case 'object':
- $tmp = array();
- if(is_object($result)) {
- foreach($params as $key => $value)
- $result->$key = $value;
- } else {
- $result = get_object_vars($params);
- foreach($result as $key => $value) {
- if(($value = FastJSON::encode($value)) !== '')
- array_push($tmp, FastJSON::encode($key).':'.$value);
- };
- $result = '{'.implode(',', $tmp).'}';
- }
- break;
- }
- return $result;
- }
-
- /**
- * public method
- *
- * FastJSON::decode(params:String[, useStdClass:Boolean]):*
- *
- * @param String valid JSON encoded string
- * @param Bolean uses stdClass instead of associative array if params contains objects (default false)
- * @return * converted variable or null
- * is params is not a JSON compatible string.
- * @note This method works in an optimist way. If JSON string is not valid
- * the code execution will die using exit.
- * This is probably not so good but JSON is often used combined with
- * XMLHttpRequest then I suppose that's better more protection than
- * just some WARNING.
- * With every kind of valid JSON string the old error_reporting level
- * and the old error_handler will be restored.
- *
- * @example
- * FastJSON::decode('{"param":"value"}'); // associative array
- * FastJSON::decode('{"param":"value"}', true); // stdClass
- * FastJSON::decode('["one",two,true,false,null,{},[1,2]]'); // array
- */
- public static function decode($encode, $stdClass = false){
- $pos = 0;
- $slen = is_string($encode) ? strlen($encode) : null;
- if($slen !== null) {
- $error = error_reporting(0);
- set_error_handler(array('FastJSON', '__exit'));
- $result = FastJSON::__decode($encode, $pos, $slen, $stdClass);
- error_reporting($error);
- restore_error_handler();
- }
- else
- $result = null;
- return $result;
- }
-
- /**
- * public method
- *
- * FastJSON::encode(params:*):String
- *
- * @param $decode * Array, Boolean, Float, Int, Object, String or NULL variable.
- * @return String JSON genric object rappresentation
- * or empty string if param is not compatible.
- *
- * @example
- * FastJSON::encode(array(1,"two")); // '[1,"two"]'
- *
- * $obj = new MyClass();
- * obj->param = "value";
- * obj->param2 = "value2";
- * FastJSON::encode(obj); // '{"param":"value","param2":"value2"}'
- */
- public static function encode($decode){
- $result = '';
- switch(gettype($decode)){
- case 'array':
- if(!count($decode) || array_keys($decode) === range(0, count($decode) - 1)) {
- $keys = array();
- foreach($decode as $value) {
- if(($value = FastJSON::encode($value)) !== '')
- array_push($keys, $value);
- }
- $result = '['.implode(',', $keys).']';
- }
- else
- $result = FastJSON::convert($decode);
- break;
- case 'string':
- $replacement = FastJSON::__getStaticReplacement();
- $result = '"'.str_replace($replacement['find'], $replacement['replace'], $decode).'"';
- break;
- default:
- if(!is_callable($decode))
- $result = FastJSON::convert($decode);
- break;
- }
- return $result;
- }
-
- // private methods, uncommented, sorry
- public static function __getStaticReplacement(){
- static $replacement = array('find'=>array(), 'replace'=>array());
- if($replacement['find'] == array()) {
- foreach(array_merge(range(0, 7), array(11), range(14, 31)) as $v) {
- $replacement['find'][] = chr($v);
- $replacement['replace'][] = "\\u00".sprintf("%02x", $v);
- }
- $replacement['find'] = array_merge(array(chr(0x5c), chr(0x2F), chr(0x22), chr(0x0d), chr(0x0c), chr(0x0a), chr(0x09), chr(0x08)), $replacement['find']);
- $replacement['replace'] = array_merge(array('\\\\', '\\/', '\\"', '\r', '\f', '\n', '\t', '\b'), $replacement['replace']);
- }
- return $replacement;
- }
- public static function __decode(&$encode, &$pos, &$slen, &$stdClass){
- switch($encode{$pos}) {
- case 't':
- $result = true;
- $pos += 4;
- break;
- case 'f':
- $result = false;
- $pos += 5;
- break;
- case 'n':
- $result = null;
- $pos += 4;
- break;
- case '[':
- $result = array();
- ++$pos;
- while($encode{$pos} !== ']') {
- array_push($result, FastJSON::__decode($encode, $pos, $slen, $stdClass));
- if($encode{$pos} === ',')
- ++$pos;
- }
- ++$pos;
- break;
- case '{':
- $result = $stdClass ? new stdClass : array();
- ++$pos;
- while($encode{$pos} !== '}') {
- $tmp = FastJSON::__decodeString($encode, $pos);
- ++$pos;
- if($stdClass)
- $result->$tmp = FastJSON::__decode($encode, $pos, $slen, $stdClass);
- else
- $result[$tmp] = FastJSON::__decode($encode, $pos, $slen, $stdClass);
- if($encode{$pos} === ',')
- ++$pos;
- }
- ++$pos;
- break;
- case '"':
- switch($encode{++$pos}) {
- case '"':
- $result = "";
- break;
- default:
- $result = FastJSON::__decodeString($encode, $pos);
- break;
- }
- ++$pos;
- break;
- default:
- $tmp = '';
- preg_replace('/^(\-)?([0-9]+)(\.[0-9]+)?([eE]\+[0-9]+)?/e', '$tmp = "\\1\\2\\3\\4"', substr($encode, $pos));
- if($tmp !== '') {
- $pos += strlen($tmp);
- $nint = intval($tmp);
- $nfloat = floatval($tmp);
- $result = $nfloat == $nint ? $nint : $nfloat;
- }
- break;
- }
- return $result;
- }
- public static function __decodeString(&$encode, &$pos) {
- $replacement = FastJSON::__getStaticReplacement();
- $endString = FastJSON::__endString($encode, $pos, $pos);
- $result = str_replace($replacement['replace'], $replacement['find'], substr($encode, $pos, $endString));
- $pos += $endString;
- return $result;
- }
- public static function __endString(&$encode, $position, &$pos) {
- do {
- $position = strpos($encode, '"', $position + 1);
- }while($position !== false && FastJSON::__slashedChar($encode, $position - 1));
- if($position === false)
- trigger_error('', E_USER_WARNING);
- return $position - $pos;
- }
- public static function __exit($str, $a, $b) {
- exit($a.'FATAL: FastJSON decode method failure [malicious or incorrect JSON string]');
- }
- public static function __slashedChar(&$encode, $position) {
- $pos = 0;
- while($encode{$position--} === '\\')
- $pos++;
- return $pos % 2;
- }
-}
-?>
\ 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...> - 2012-08-21 06:47:52
|
Revision: 4585
http://oscss.svn.sourceforge.net/oscss/?rev=4585&view=rev
Author: oscim
Date: 2012-08-21 06:47:46 +0000 (Tue, 21 Aug 2012)
Log Message:
-----------
coquille
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/modules/pages/ggsitemap.php
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/ggsitemap.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/ggsitemap.php 2012-08-20 17:09:34 UTC (rev 4584)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/ggsitemap.php 2012-08-21 06:47:46 UTC (rev 4585)
@@ -298,8 +298,7 @@
*/
function GenerateSitemap($data, $file){
$content = '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
- $content = '<?xml-stylesheet type="text/xsl" href="gss.xsl"?>' . "\n";
- $content .= '<urlset xmlns="http://www.google.com/schemas/sitemap/0.9">' . "\n";
+ $content .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . "\n";
foreach ($data as $url){
$content .= "\t" . '<url>' . "\n";
@@ -324,7 +323,6 @@
*/
function GenerateSitemapIndex(){
$content = '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
- $content = '<?xml-stylesheet type="text/xsl" href="gss.xsl"?>' . "\n";
$content .= '<sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.84">' . "\n";
$pattern = defined('GOOGLE_SITEMAP_COMPRESS')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-20 17:09:40
|
Revision: 4584
http://oscss.svn.sourceforge.net/oscss/?rev=4584&view=rev
Author: oscim
Date: 2012-08-20 17:09:34 +0000 (Mon, 20 Aug 2012)
Log Message:
-----------
correction coquille
ajustemebt css
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/template/defaut/css/less/forms.less
branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less
Modified: branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-08-20 17:07:54 UTC (rev 4583)
+++ branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-08-20 17:09:34 UTC (rev 4584)
@@ -95,76 +95,82 @@
<?php echo tep_draw_pull_down_menu('products_tax_class_id', products::$tax_class_array, products::$Info->products_tax_class_id, '').'<span class="required">*</span>'; ?><br />
</li>
<li class="block_input">
+
+ <div class="fleft w_50">
<label class="inline" for="products_price"><?php echo __('text products price net'); ?></label>
<?php echo tep_draw_input_field('products_price','', products::$Info->products_price, ' class="price" style=" " size="16" ').'<span class="required">*</span>'; ?>
+ </div>
+ <div class="fleft w_50">
+ <label class="inline" for="products_price_gross"><?php echo __('text products price gross'); ?></label>
+ <?php echo tep_draw_input_field('products_price_gross','', (string)tep_add_tax(products::$Info->products_price, tep_get_tax_rate(products::$Info->products_tax_class_id)) , ' class="price" style=" " size="16" '); ?>
+ </div>
</li>
- <li class="block_input">
- <label class="inline" for="products_price_gross"><?php echo __('text products price gross'); ?></label>
- <?php echo tep_draw_input_field('products_price_gross','', (string)tep_add_tax(products::$Info->products_price, tep_get_tax_rate(products::$Info->products_tax_class_id)) , ' class="price" style=" " size="16" '); ?>
- </li>
-
<?php
/**
- @brief Call variation price for products
+ @brief Call variation price for products
*/
?>
<?php foreach (products::$modules->__call('display_inline',array('flag'=>'price','pid'=> products::$Info->products_id)) as $value){ $title[]=$value['title']; $text[]=$value['text']; } ?>
- <li class="block_input">
- <fieldset class="block_field">
- <legend class="Ctrtirroir"><?php echo __('Option de prix supplementaire') ?></legend>
- <div class="tirroir tabs">
+ <?php if( (isset($title) && is_array($title)) || isset(products::$Info->products_sppc) ): ?>
- <ul class="w_100">
+ <li class="block_input">
+ <fieldset class="block_field">
+ <legend class="Ctrtirroir"><?php echo __('Option de prix supplementaire') ?></legend>
+ <div class="tirroir tabs">
- <?php if(isset($title) && is_array($title)): ?>
- <?php $i=0; foreach ($title as $item): ?>
- <li><a href="#products_price-<?php echo $i++; ?>"><?php echo $item; ?></a></li>
- <?php endforeach ; ?>
- <?php endif; ?>
+ <ul class="w_100">
- <?php if (isset(products::$Info->products_sppc)): ?>
- <li><a href="#products_price-<?php echo $i++; ?>"><?php echo __('text customers groups note').tep_image(DIR_WS_ICONS.'icon_help.gif', __('text customers groups note detail')) ?></a></li>
- <?php endif; ?>
+ <?php if(isset($title) && is_array($title)): ?>
+ <?php $i=0; foreach ($title as $item): ?>
+ <li><a href="#products_price-<?php echo $i++; ?>"><?php echo $item; ?></a></li>
+ <?php endforeach ; ?>
+ <?php endif; ?>
- </ul>
+ <?php if (isset(products::$Info->products_sppc)): ?>
+ <li><a href="#products_price-<?php echo $i++; ?>"><?php echo __('text customers groups note').tep_image(DIR_WS_ICONS.'icon_help.gif', __('text customers groups note detail')) ?></a></li>
+ <?php endif; ?>
+ </ul>
- <ul class="w_100">
- <?php if(isset($title) && is_array($title)): ?>
- <?php $i=0; foreach ($text as $item): ?>
- <li id="products_price-<?php echo $i++; ?>"><?php echo $item; ?></li>
- <?php endforeach ; ?>
- <?php endif; ?>
+ <ul class="w_100">
- <?php if (isset(products::$Info->products_sppc)): ?>
- <li id="products_price-<?php echo $i++; ?>" class="w_100">
- <ul class="clear w_100">
- <?php foreach (products::$Info->products_sppc as $sppcGpId => $sppcInfos): ?>
- <li class="block_input price">
- <label class="inline" for="<?php echo 'sppcprice_' . $sppcGpId; ?>">
- <?php echo $sppcInfos['sppcname']; ?>
- </label>
+ <?php if(isset($title) && is_array($title)): ?>
+ <?php $i=0; foreach ($text as $item): ?>
+ <li id="products_price-<?php echo $i++; ?>"><?php echo $item; ?></li>
+ <?php endforeach ; ?>
+ <?php endif; ?>
- <span class="number">
- <?php echo tep_draw_input_field('sppcprice[' . $sppcGpId . ']','', (($sppcInfos['sppcprice'] >0) ? $sppcInfos['sppcprice'] : products::$Info->products_price ), ' class="price" style=" " size="16" '); ?>
- </span>
- <span class="status">
- <?php echo tep_draw_checkbox_field('sppcoption[' . $sppcGpId . ']', '', 'sppcoption[' . $sppcGpId . ']',$sppcInfos['sppcprice']!=''?1:0) .' '. __('@product active price group') ; ?>
- </span>
- </li>
- <?php endforeach;?>
- </ul>
- </li>
- <?php endif; ?>
- </ul>
+ <?php if (isset(products::$Info->products_sppc)): ?>
+ <li id="products_price-<?php echo $i++; ?>" class="w_100">
+ <ul class="clear w_100">
+ <?php foreach (products::$Info->products_sppc as $sppcGpId => $sppcInfos): ?>
+ <li class="block_input price">
+ <label class="inline" for="<?php echo 'sppcprice_' . $sppcGpId; ?>">
+ <?php echo $sppcInfos['sppcname']; ?>
+ </label>
- </div>
- </fieldset>
- </li>
+ <span class="number">
+ <?php echo tep_draw_input_field('sppcprice[' . $sppcGpId . ']','', (($sppcInfos['sppcprice'] >0) ? $sppcInfos['sppcprice'] : products::$Info->products_price ), ' class="price" style=" " size="16" '); ?>
+ </span>
+ <span class="status">
+ <?php echo tep_draw_checkbox_field('sppcoption[' . $sppcGpId . ']', '', 'sppcoption[' . $sppcGpId . ']',$sppcInfos['sppcprice']!=''?1:0) .' '. __('@product active price group') ; ?>
+ </span>
+ </li>
+ <?php endforeach;?>
+ </ul>
+ </li>
+ <?php endif; ?>
+ </ul>
+ </div>
+ </fieldset>
+ </li>
+ <?php endif; ?>
+
+
<li class="block_input">
<label class="inline" for="products_price_gross"><?php echo __('text products final price'); ?></label>
<?php echo tep_draw_input_field('products_price_final','', (string)tep_add_tax(products::$Info->products_price, tep_get_tax_rate(products::$Info->products_tax_class_id)) , 'disabled="disabled" class="price" style=" " size="16" '); ?>
Modified: branches/2.1.1/catalog/admin/includes/template/defaut/css/less/forms.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/defaut/css/less/forms.less 2012-08-20 17:07:54 UTC (rev 4583)
+++ branches/2.1.1/catalog/admin/includes/template/defaut/css/less/forms.less 2012-08-20 17:09:34 UTC (rev 4584)
@@ -102,8 +102,8 @@
/* remplacement true /false par icone */
.edit-input-value.Val-true ,
.edit-input-value.Val-false {font-size:0;}
- .edit-input-value-alternate.Val-true {background:transparent url(img/1/check.png) left top no-repeat; }
- .edit-input-value-alternate.Val-false {background:transparent url(img/1/busy.png) left top no-repeat;}
+ .edit-input-value-alternate.Val-true {background:transparent url("../../img/1/check.png") left top no-repeat; }
+ .edit-input-value-alternate.Val-false {background:transparent url("../../img/1/busy.png") left top no-repeat;}
}
}
@@ -160,7 +160,7 @@
select option {display:block; float:none;clear:both;width:100%}
- label { line-height: 18px; margin-right: 10px; display:inline-block; text-align: right; padding: 0 0 2px 0;}
+ label { line-height: 18px; margin-right: 10px; display:inline-block; padding: 0 0 2px 0;}
ul{
list-style:none;
Modified: branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less 2012-08-20 17:07:54 UTC (rev 4583)
+++ branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less 2012-08-20 17:09:34 UTC (rev 4584)
@@ -136,7 +136,7 @@
/* toogle item complet js action */
h4.Ctrtirroir,
-h5.Ctrtirroir{ margin: 10px 0; padding: 0 0 0 (@padding_base * 2); font-size: (@font_size * 1.1); }
+h5.Ctrtirroir{ margin: 10px 0; padding: 0 0 0 20px; font-size: (@font_size * 1.1); }
.Ctrtirroir {
background:transparent url("../../../../../images/icons/icon_down.gif") left top no-repeat;
padding-left:20px;
@@ -602,7 +602,16 @@
* Forms
*/
+ // rattrapage fichier Forms.less
+ form .block_form .block_input span.edit-input .edit-input-value-alternate.Val-true {
+ background-image: url("../../img/1/check.png");
+ }
+ form .block_form .block_input span.edit-input .edit-input-value-alternate.Val-false {
+ background-image: url("../../img/1/busy.png");
+ }
+
+
input.radioInput {width:30px;}
div#form_bt { width: 80%; margin: 1em 2em;}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-20 17:08:00
|
Revision: 4583
http://oscss.svn.sourceforge.net/oscss/?rev=4583&view=rev
Author: oscim
Date: 2012-08-20 17:07:54 +0000 (Mon, 20 Aug 2012)
Log Message:
-----------
amelioration js de specials
Report module ecotax dans le trunk
Modified Paths:
--------------
trunk/extensions/SPECIALS_stable/catalog/admin/includes/javascript/modules/products/specials.js.php
Added Paths:
-----------
trunk/extensions/ECOTAX_stable/
Modified: trunk/extensions/SPECIALS_stable/catalog/admin/includes/javascript/modules/products/specials.js.php
===================================================================
--- trunk/extensions/SPECIALS_stable/catalog/admin/includes/javascript/modules/products/specials.js.php 2012-08-11 22:03:52 UTC (rev 4582)
+++ trunk/extensions/SPECIALS_stable/catalog/admin/includes/javascript/modules/products/specials.js.php 2012-08-20 17:07:54 UTC (rev 4583)
@@ -24,29 +24,59 @@
DisplayAdjust:function( ) {
- // adjust input disabled based on select mode
-// $('select.special_mode').focus(function() {
- $("select.special_mode").change(function(){
+ // adjust input disabled based on select mode (% / FIXE )
+ $("select.special_mode").change(function(){
- var mode = $(this).val();
+ var mode = $(this).val();
- if( mode == 0){
- $(this).prev().attr("disabled", "disabled");
- $(this).prev().prev().removeAttr("disabled");
- }
- // pourc mode
- else if(1){
- $(this).prev().removeAttr("disabled");
- $(this).prev().prev().attr("disabled", "disabled");
- }
+ if( mode == 0){
+ $(this).prev().attr("disabled", "disabled");
+ $(this).prev().prev().removeAttr("disabled");
+ }
+ // pourc mode
+ else if(1){
+ $(this).prev().removeAttr("disabled");
+ $(this).prev().prev().attr("disabled", "disabled");
+ }
- $(this).next().attr("disabled", "disabled");
- })
- .change();
-// });
+ $(this).next().attr("disabled", "disabled");
+ })
+ .change();
- // calculate pourc based on price net
+ /**
+ Fade block line price if not actived
+ */
+ // adjust input disabled based on select mode
+ $("#SpecialInline input[type=checkbox]").each(function(){
+ if( $(this).attr('checked') =='checked' ){
+ $(this).parent().parent().fadeTo("slow", 1);
+ }
+ else{
+ $(this).parent().parent().fadeTo("slow", 0.5);
+ }
+ });
+
+ $("#SpecialInline input[type=checkbox]").change(function(){
+ if( $(this).attr('checked') =='checked' ){
+ $(this).parent().parent().fadeTo("slow", 1);
+ }
+ else{
+ $(this).parent().parent().fadeTo("slow", 0.5);
+ }
+ });
+
+ $("#SpecialInline input[type=checkbox]").mouseover(function(){
+ $(this).parent().parent().fadeTo("slow", 1);
+ });
+ $("#SpecialInline input[type=checkbox]").mouseout(function(){
+ $(this).parent().parent().fadeTo("slow", 0.5);
+ });
+
+
+ /**
+ calculate pourc based on price net
+ */
$('input.special_price').focus(function() {
$("input.special_price").change(function(){
var price = $(this).val();
@@ -61,7 +91,9 @@
.change();
});
- // calculate pirce based on pourc
+ /*
+ calculate pirce based on pourc
+ */
$('input.special_pourc').focus(function() {
$("input.special_pourc").change(function(){
var pourc = $(this).val();
@@ -76,7 +108,14 @@
.change();
});
+
+
+ // onload
$(function() {
+
+ /**
+ add js date and calendard
+ */
$.datepicker.setDefaults($.extend({
duration: '',
changeMonth: true,
@@ -91,11 +130,15 @@
));
$('.date').datepicker();
});
+
+
},
-
+ /**
+ Internal methode
+ */
calculprice:function( base_price , pourc ){
return ( base_price / ( 1 + (pourc/100) ) );
},
@@ -119,7 +162,7 @@
-<?php if (products::$action == 'edit'): ?>
+<?php /*if (products::$action == 'edit'): ?>
<script type="text/javascript"><!--
$(function() {
@@ -128,4 +171,4 @@
//--></script>
-<?php endif; ?>
\ No newline at end of file
+<?php endif;*/ ?>
\ 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...> - 2012-08-11 22:04:00
|
Revision: 4582
http://oscss.svn.sourceforge.net/oscss/?rev=4582&view=rev
Author: oscim
Date: 2012-08-11 22:03:52 +0000 (Sat, 11 Aug 2012)
Log Message:
-----------
report correction install table specials
correctuion coquille diverse
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/gabarit/customers/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
branches/2.1.1/catalog/admin/includes/modules/pages/customers.php
branches/2.1.1/catalog/install/includes/sql/mysql/tables/osc_specials.sql
Added Paths:
-----------
branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_specials.sql
Modified: branches/2.1.1/catalog/admin/includes/gabarit/customers/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/customers/display_view.edit.gab 2012-08-11 22:02:56 UTC (rev 4581)
+++ branches/2.1.1/catalog/admin/includes/gabarit/customers/display_view.edit.gab 2012-08-11 22:03:52 UTC (rev 4582)
@@ -131,21 +131,24 @@
else echo tep_draw_radio_field('customers_group_ra','customers_group_ra', '0', (((bool)customers::$Info->customers_group_ra)? false:true), customers::$Info->customers_group_ra) . ' ' . __('entry customers group ra no') . ' ' . tep_draw_radio_field('customers_group_ra','customers_group_ra1', '1',(((bool)customers::$Info->customers_group_ra)? true:false), customers::$Info->customers_group_ra) . ' ' . __('entry customers group ra yes'); ?>
</p>
<p class="block_input input-one">
- <label for="customers_shopping_points"><?php echo __('entry customers points'); ?></label>
- <?php echo tep_result_up_field(customers::$Info,'customers_shopping_points'); ?>
+ <label for="customers_shopping_points"><?php echo __('entry customers points'); ?></label>
+ <?php echo tep_result_up_field(customers::$Info,'customers_shopping_points'); ?>
</p>
- <!-- BOF Separate Pricing per Customer -->
- <p class="block_input input-one">
- <label for="customers_group_id"><?php echo __('entry customers group name'); ?></label>
- <?php echo tep_result_up_field(customers::$Info,'customers_group_id','tep_get_grp_name','', false, true); ?>
- </p>
+ <?php foreach (customers::$modules->__call('display_inline',array('flag'=>'rightblock','cid'=> customers::$Info->customers_id)) as $value){ $title[]=$value['title']; $text[]=$value['text']; } ?>
+ <?php if(isset($title) && is_array($title)): ?>
+ <?php $i=0; foreach ($text as $item): ?>
+ <li><?php echo $item; ?></li>
+ <?php endforeach ; ?>
+ <?php $title=$text=array(); endif; ?>
+
+
<?php if (in_array(customers::$action,array('new','insert'))) : ?>
<!-- Mode de creation / Notification Client -->
<p class="block_input input-one">
- <label for="new_customers_notif"><?php echo __('entry customers notif created new account'); ?></label>
- <?php echo tep_draw_checkbox_field('new_customers_notif', 'new_customers_notif', 'on', false); ?>
+ <label for="new_customers_notif"><?php echo __('entry customers notif created new account'); ?></label>
+ <?php echo tep_draw_checkbox_field('new_customers_notif', 'new_customers_notif', 'on', false); ?>
</p>
<?php endif; ?>
Modified: branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-08-11 22:02:56 UTC (rev 4581)
+++ branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-08-11 22:03:52 UTC (rev 4582)
@@ -111,12 +111,13 @@
?>
<?php foreach (products::$modules->__call('display_inline',array('flag'=>'price','pid'=> products::$Info->products_id)) as $value){ $title[]=$value['title']; $text[]=$value['text']; } ?>
- <li>
- <h4 class="Ctrtirroir"><?php echo __('Option de prix supplementaire') ?></h4>
- <ul class="tirroir tabs_lang">
- <li>
- <ul>
+ <li class="block_input">
+ <fieldset class="block_field">
+ <legend class="Ctrtirroir"><?php echo __('Option de prix supplementaire') ?></legend>
+ <div class="tirroir tabs">
+ <ul class="w_100">
+
<?php if(isset($title) && is_array($title)): ?>
<?php $i=0; foreach ($title as $item): ?>
<li><a href="#products_price-<?php echo $i++; ?>"><?php echo $item; ?></a></li>
@@ -128,10 +129,10 @@
<?php endif; ?>
</ul>
- </li>
- <li>
- <ul>
+
+ <ul class="w_100">
+
<?php if(isset($title) && is_array($title)): ?>
<?php $i=0; foreach ($text as $item): ?>
<li id="products_price-<?php echo $i++; ?>"><?php echo $item; ?></li>
@@ -139,23 +140,29 @@
<?php endif; ?>
<?php if (isset(products::$Info->products_sppc)): ?>
- <li id="products_price-<?php echo $i++; ?>" class="block_input">
- <ul>
+ <li id="products_price-<?php echo $i++; ?>" class="w_100">
+ <ul class="clear w_100">
<?php foreach (products::$Info->products_sppc as $sppcGpId => $sppcInfos): ?>
- <li class="block_input">
+ <li class="block_input price">
<label class="inline" for="<?php echo 'sppcprice_' . $sppcGpId; ?>">
- <?php echo tep_draw_checkbox_field('sppcoption[' . $sppcGpId . ']', '', 'sppcoption[' . $sppcGpId . ']',$sppcInfos['sppcprice']!=''?1:0) . ' ' . $sppcInfos['sppcname']; ?>
+ <?php echo $sppcInfos['sppcname']; ?>
</label>
- <?php echo tep_draw_input_field('sppcprice[' . $sppcGpId . ']','', $sppcInfos['sppcprice'], ' class="price" style=" " size="16" '); ?>
+ <span class="number">
+ <?php echo tep_draw_input_field('sppcprice[' . $sppcGpId . ']','', (($sppcInfos['sppcprice'] >0) ? $sppcInfos['sppcprice'] : products::$Info->products_price ), ' class="price" style=" " size="16" '); ?>
+ </span>
+ <span class="status">
+ <?php echo tep_draw_checkbox_field('sppcoption[' . $sppcGpId . ']', '', 'sppcoption[' . $sppcGpId . ']',$sppcInfos['sppcprice']!=''?1:0) .' '. __('@product active price group') ; ?>
+ </span>
</li>
<?php endforeach;?>
</ul>
</li>
<?php endif; ?>
</ul>
- </li>
- </ul>
+
+ </div>
+ </fieldset>
</li>
<li class="block_input">
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-08-11 22:02:56 UTC (rev 4581)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-08-11 22:03:52 UTC (rev 4582)
@@ -105,7 +105,7 @@
/* inline */
$lang['product type :']="Type :" ;
-
+ $lang['@product active price group'] = "Prix actif";
/* Fiche One products */
$lang['heading title edit']="Fiche produit - Edition d'un produit" ;
$lang['tab products data']="Caractéristiques" ;
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/customers.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/customers.php 2012-08-11 22:02:56 UTC (rev 4581)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/customers.php 2012-08-11 22:03:52 UTC (rev 4582)
@@ -70,9 +70,12 @@
@var array info all tabs for filter listings
*/
public static $allfields = array();
+ /**
+ @var array info all tabs for filter listings , specifical owner sub module
+ */
+ protected static $allfieldsexternal = array();
-
public function __construct(){
self::GetConf();
}
@@ -95,9 +98,8 @@
// Use factory class aca
//self::$modules=new accountACA();
- self::$modules=new AcaFactory('account'/*,'MODULE_ACCOUNT_INSTALLED_BO'*/);
- self::$modules->set_image_handler();
+
self::$languages = tep_get_languages();
self::$newsletter_array=array(array('id' => '1', 'text' => __('entry newsletter yes')),
@@ -106,7 +108,10 @@
}
+ self::$modules=new AcaFactory('account'/*,'MODULE_ACCOUNT_INSTALLED_BO'*/);
+// self::$modules->set_image_handler();
+
global $languages_id;
/**
@remarks define var execution sql in GetDBValue()
@@ -196,12 +201,12 @@
'alias'=>'group_id',
'text'=>__('@customers table heading group id'),
);
- self::$allfields['cg.customers_group_name'] = array(
- 'sort'=>true,
- 'alias'=>'cat_title',
- 'text'=>__('@customers table heading group name'),
- 'default'=>true,
- );
+// self::$allfields['cg.customers_group_name'] = array(
+// 'sort'=>true,
+// 'alias'=>'cat_title',
+// 'text'=>__('@customers table heading group name'),
+// 'default'=>true,
+// );
self::$allfields['c.customers_discount'] = array(
'sort'=>true,
@@ -241,6 +246,21 @@
'text'=>__('@customers table heading number of logons'),
'default'=>true,
);
+
+
+ /* DEB Sub module add col */
+ $r = self::$modules->__call('GetConf', array('type'=>'allfields')) ;
+
+ foreach($r as $mod=>$value){
+ foreach($value as $key=>$array){
+ self::$allfields[$key] = $array;
+
+ self::$allfieldsexternal[$key] = $array;
+ self::$allfieldsexternal[$key]['module'] = $mod;
+ }
+ }
+ /* END Sub module add col */
+
self::$allfields['c.customers_group_ra'] = array(
'sort'=>true,
'alias'=>'group_ra',
@@ -274,6 +294,16 @@
// min fields and not view directly colonne fields
$listfield = " ";
+
+ /* DEB Sub module add table */
+ $r = self::$modules->__call('GetConf', array('type'=>'forcelistfields')) ;
+ foreach($r as $mod=>$value){
+ foreach($value as $key=>$string){
+ $listfield .= $string;
+ }
+ }
+ /* END Sub module add col */
+
$_SESSION['filters']['allfields'] = array();
// put in
if(isset($_SESSION['filters'][__CLASS__]['allfields']))
@@ -709,12 +739,32 @@
$query_raw = "select ".$adjust->listfields.", c.customers_id as id from " . TABLE_CUSTOMERS . " c ".
- " LEFT JOIN " . TABLE_CUSTOMERS_INFO . " ci ON(c.customers_id =ci.customers_info_id ) ".
- " LEFT JOIN " . TABLE_CUSTOMERS_GROUPS . " cg ON(c.customers_group_id = cg.customers_group_id) ".
- ((strlen($adjust->sWhere)>4) ? " WHERE ".substr($adjust->sWhere, 3) : '').
- " GROUP BY c.customers_id ".
- " ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' ci.customers_info_date_account_created DESC ');
+ " LEFT JOIN " . TABLE_CUSTOMERS_INFO . " ci ON(c.customers_id =ci.customers_info_id ) ";
+// " LEFT JOIN " . TABLE_CUSTOMERS_GROUPS . " cg ON(c.customers_group_id = cg.customers_group_id) ";
+ /* DEB Sub module add table */
+ $r = self::$modules->__call('GetConf', array('languages_id'=>(int)$adjust->languages_id, 'type'=>'tables')) ;
+ foreach($r as $mod=>$value){
+ foreach($value as $key=>$string){
+ $query_raw .= $string;
+ }
+ }
+ /* END Sub module add col */
+
+ $query_raw .= ((strlen($adjust->sWhere)>4) ? " WHERE ".substr($adjust->sWhere, 3) : '').
+ " GROUP BY c.customers_id ";
+
+ /* DEB Sub module add table */
+ $r = self::$modules->__call('GetConf', array('languages_id'=>(int)$adjust->languages_id, 'type'=>'group_by')) ;
+ foreach($r as $mod=>$value){
+ foreach($value as $key=>$string){
+ $query_raw .= $string;
+ }
+ }
+ /* END Sub module add col */
+
+ $query_raw .= " ORDER BY ".((!empty($adjust->sOrder)) ? $adjust->sOrder : ' ci.customers_info_date_account_created DESC ');
+
$_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows);
$_query = $DB->query($query_raw);
@@ -906,26 +956,8 @@
}
- /**
- * \fn tep_get_grp_name($id)
- * \brief get group name for customer id
- * @param unknown_type $id
- */
- public static function tep_get_grp_name($id){
- $res=tep_db_query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " ");
- if(tep_db_num_rows($res)>1 && self::$action !='noedit'){
- while($item = tep_db_fetch_array($res))
- $array[]=array('id'=> $item['customers_group_id'] , 'text'=>$item['customers_group_name']);
- return tep_draw_pull_down_menu('customers_group_id', $array, $id);
- }
- else {
- $query = tep_db_fetch_array(tep_db_query("select customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id='".$id."' "));
- return $query['customers_group_name'];
- }
- }
-
/**
* \fn userTestNotExists($customers_email_address)
* \brief test user exists
@@ -974,6 +1006,17 @@
case 'listing':
global $query_numrows,$languages_id;
+ /* DEB Sub module add col */
+ $external = array();
+ foreach(self::$allfieldsexternal as $key => $value ){
+ $clean = substr($key, (strpos($key, '.')+1));
+ $alias = (isset($value['alias'])? $value['alias'] : $clean);
+ $external[] = $alias;
+ $process[$alias] = $value['module'];
+ }
+ /* END Sub module add col */
+
+
while ($item = $_query->fetchAssoc()) {
$ord =array();
@@ -985,6 +1028,12 @@
elseif($k == 'group_ra') $ord[$k]=self::RowStatusDa($item);
elseif(in_array($k, array('added','modified','last_logon')) ) $ord[$k]=tep_date_short($item[$k]);
elseif($k == 'discount') $ord[$k]=$item[$k].' %';
+ /* DEB Sub module add col */
+ elseif( in_array($k, $external) ){
+ $class = self::$modules->modules[$process[$k]];
+ $ord[$k]= $class->formatdbvalue($k, $item);
+ }
+ /* END Sub module add col */
else $ord[$k]=$item[$k];
}
Modified: branches/2.1.1/catalog/install/includes/sql/mysql/tables/osc_specials.sql
===================================================================
--- branches/2.1.1/catalog/install/includes/sql/mysql/tables/osc_specials.sql 2012-08-11 22:02:56 UTC (rev 4581)
+++ branches/2.1.1/catalog/install/includes/sql/mysql/tables/osc_specials.sql 2012-08-11 22:03:52 UTC (rev 4582)
@@ -20,8 +20,9 @@
specials_last_modified datetime default '1000-01-01 00:00:00' null ,
expires_date datetime default '1000-01-01 00:00:00' null ,
date_status_change datetime default '1000-01-01 00:00:00' null ,
- status int(1) default '1' not null ,
+ status smallint(1) default '1' not null ,
specials_begin_date datetime ,
customers_group_id int(11) default '0' not null,
+ special_apply_mode smallint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (specials_id)
) DEFAULT CHARSET=utf8;
Added: branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_specials.sql
===================================================================
--- branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_specials.sql (rev 0)
+++ branches/2.1.1/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_specials.sql 2012-08-11 22:03:52 UTC (rev 4582)
@@ -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_specials ADD COLUMN special_apply_mode smallint(1) NOT NULL DEFAULT '0';
\ 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...> - 2012-08-11 22:03:03
|
Revision: 4581
http://oscss.svn.sourceforge.net/oscss/?rev=4581&view=rev
Author: oscim
Date: 2012-08-11 22:02:56 +0000 (Sat, 11 Aug 2012)
Log Message:
-----------
correction suite sur les modules
Modified Paths:
--------------
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/customers_groups.txt
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/modules/account/sppc_cust_force.php
trunk/extensions/CUSTOMERS_GROUPS_stable/install.xml
trunk/extensions/SPECIALS_stable/catalog/admin/includes/modules/products/specials.php
Modified: trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/customers_groups.txt
===================================================================
--- trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/customers_groups.txt 2012-08-11 18:07:07 UTC (rev 4580)
+++ trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/customers_groups.txt 2012-08-11 22:02:56 UTC (rev 4581)
@@ -11,6 +11,15 @@
@encode UTF-8
*/
$lang['heading title']='Groupes';
+
+
+$lang['@customersgroups table heading group name']='Groupe';
+$lang['@customersgroups table heading customers_group_id']='Grp.Id.';
+$lang['@customersgroups table heading customers_group_show_tax']='Grp taxe active';
+$lang['@customersgroups table heading group_discount']='Grp. remise';
+$lang['@customers_groups heading inline']='Groupe Client';
+
+
$lang['heading title search']='Recherche :';
$lang['heading title modules payment']='Modules de paiement';
$lang['heading title modules shipping']='Modules d\'expédition';
@@ -31,6 +40,7 @@
+
$lang['entry groups name']='Groupe  Nom :';
$lang['entry group name max length']='  Longueur maximum : 32 caractères';
$lang['entry group show tax']='Voir prix avec/sans taxe :';
Modified: trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/modules/account/sppc_cust_force.php
===================================================================
--- trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/modules/account/sppc_cust_force.php 2012-08-11 18:07:07 UTC (rev 4580)
+++ trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/modules/account/sppc_cust_force.php 2012-08-11 22:02:56 UTC (rev 4581)
@@ -10,7 +10,8 @@
@class sppc_cust_force
Gestion des detail de module pour un client specifiques
*/
-class sppc_cust_force implements InterfaceModule{
+class sppc_cust_force
+ implements InterfaceModule{
public static $cInfo;
@@ -21,10 +22,97 @@
$this->title = __('module aca sppc cust force text title');
$this->description = __('module aca sppc cust force text description');
$this->sort_order = (defined('MODULE_ACA_SPPC_CUST_FORCE_SORT_ORDER')) ? MODULE_ACA_SPPC_CUST_FORCE_SORT_ORDER : 0;
+ // active this module
$this->enabled =true;
+ // active right inline block
+ $this->rightblock = true;
+
+ global $oscss, $language;
+ $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/pages/customers_groups.txt');
}
+
+ /**
+ @brief Load , adjust and define var environement GetConf master module
+ @param $opt array
+ type => '' string name type for define return
+ languages_id => '' int
+ */
+ public function GetConf($opt){
+ $array = array();
+
+ switch ($opt['type']) {
+ case 'allfields':
+ $array['cg.customers_group_name'] = array(
+ 'sort'=>true,
+ 'alias'=>'cat_title',
+ 'text'=>__('@customersgroups table heading group name'),
+ 'default'=>true,
+ );
+ $array['cg.customers_group_id'] = array(
+ 'sort'=>true,
+ 'alias'=>'customers_group_id',
+ 'text'=>__('@customersgroups table heading customers_group_id'),
+ 'width'=>'6%',
+ 'class'=>'tcenter',
+// 'default'=>true,
+ );
+ $array['cg.customers_group_show_tax'] = array(
+ 'sort'=>true,
+ 'alias'=>'customers_group_show_tax',
+ 'text'=>__('@customersgroups table heading customers_group_show_tax'),
+ 'width'=>'6%',
+ 'class'=>'tcenter',
+// 'default'=>true,
+ );
+ $array['cg.group_discount'] = array(
+ 'sort'=>true,
+ 'alias'=>'group_discount',
+ 'text'=>__('@customersgroups table heading group_discount'),
+ 'width'=>'6%',
+ 'class'=>'tcenter',
+ 'default'=>true,
+ );
+
+ break;
+
+ case 'tables':
+ $array['cg'] =" LEFT JOIN " . TABLE_CUSTOMERS_GROUPS . " cg ON(c.customers_group_id = cg.customers_group_id) ";
+ break;
+ }
+ return $array;
+ }
+
+
+ /**
+ @brief format db value for this allfields
+ @param $key string name key
+ @param $item array
+ */
+ public function formatdbvalue($key,$item){
+ global $languages_id;
+
+ switch($key){
+ case 'customers_group_show_tax':
+ $value =
+ sprintf(
+ CsrtAction::getFormat('row_etat'),
+ (int)$item[$key],
+ ( ($item[$key] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ )
+ ;
+
+ break;
+ default:
+ $value = $item[$key] ;
+ }
+
+ return $value;
+ }
+
+
+
public function update_table_second() {
// This function returns an array with variables to insert into TABLE_PRODUCTS
@@ -116,6 +204,30 @@
}
/**
+ @fn display_inline($array)
+ @brief specific for page edit products, and optionnal price
+ @param $array array
+ TODO: Not engine correct
+ */
+ public function display_inline($array) {
+
+/**
+ TODO Couplage avec groupe client
+*/
+// customers::$Info->customers_group_id
+// print_r(customers::$action);
+ $m = '<div>'.
+
+ '<p class="block_input">'.
+ '<label>'.__('@customers_groups heading inline').'</label>'.
+ self::tep_get_grp_name(customers::$Info->customers_group_id, ((customers::$action =='edit')? true : false ) ) .
+ '</p>
+ <div>';
+
+ return array('title'=> __('@customers_groups heading inline') ,'text'=> $m);
+ }
+
+ /**
Tabs in products
Ask each module about what to dispay in the product editor of each module.
*/
@@ -131,7 +243,25 @@
}
+ /**
+ * \fn tep_get_grp_name($id)
+ * \brief get group name for customer id
+ * @param unknown_type $id
+ */
+ public static function tep_get_grp_name($id, $edit = true){
+ $res=tep_db_query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " ");
+ if(tep_db_num_rows($res)>0 && $edit ){
+ while($item = tep_db_fetch_array($res))
+ $array[]=array('id'=> $item['customers_group_id'] , 'text'=>$item['customers_group_name']);
+ return tep_draw_pull_down_menu('customers_group_id', $array, $id);
+ }
+ else {
+ $query = tep_db_fetch_array(tep_db_query("select customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id='".$id."' "));
+ return $query['customers_group_name'];
+ }
+ }
+
/**
array list mod activ
@param
Modified: trunk/extensions/CUSTOMERS_GROUPS_stable/install.xml
===================================================================
--- trunk/extensions/CUSTOMERS_GROUPS_stable/install.xml 2012-08-11 18:07:07 UTC (rev 4580)
+++ trunk/extensions/CUSTOMERS_GROUPS_stable/install.xml 2012-08-11 22:02:56 UTC (rev 4581)
@@ -34,11 +34,11 @@
</addfilelg>
<add2end>
- <file name="admin/includes/boxes/07_catalog.php" />
+ <file name="admin/includes/boxes/05_customers.php" />
<add type="php">
<![CDATA[ $tabl_link[]= array(FILENAME_CUSTOMERS_GROUPS, 'BOX_CUSTOMERS_CUSTOMERS_GROUP', 'customers',@$img['customers']);]]>
</add>
- </add2end>
+ </add2end>
<add2end>
<file name="admin/includes/tables_files_modules.php" />
@@ -46,7 +46,18 @@
<![CDATA[define('FILENAME_CUSTOMERS_GROUPS', 'customers_groups.php');]]>
</add>
</add2end>
+
+ <add2endlg>
+ <file name="admin/includes/languages/%LANGUAGE%/boxes/05_customers.php" />
+ <add type="php" lgref="fr_FR">
+ <![CDATA[define('BOX_CUSTOMERS_CUSTOMERS_GROUP', 'Groupe client');]]>
+ </add>
+ <add type="php" lgref="en_EN">
+ <![CDATA[define('BOX_CUSTOMERS_CUSTOMERS_GROUP', 'Customers groups');]]>
+ </add>
+ </add2endlg>
+
<config>
<group_key>CG_OPTION_MODULES</group_key>
<key>MODULE_ACA_SPPC_CUST_FORCE_SORT_ORDER</key>
Modified: trunk/extensions/SPECIALS_stable/catalog/admin/includes/modules/products/specials.php
===================================================================
--- trunk/extensions/SPECIALS_stable/catalog/admin/includes/modules/products/specials.php 2012-08-11 18:07:07 UTC (rev 4580)
+++ trunk/extensions/SPECIALS_stable/catalog/admin/includes/modules/products/specials.php 2012-08-11 22:02:56 UTC (rev 4581)
@@ -300,6 +300,7 @@
}
else{
$array['products_id']=$products_id;
+ $array['customers_group_id']=$key;
$r=tep_db_perform(TABLE_SPECIALS, $array );
}
}
@@ -370,15 +371,16 @@
);
if (isset(products::$Info->products_sppc)){
+
foreach (products::$Info->products_sppc as $sppcGpId => $sppcInfos){
-
+
if(!isset(self::$sInfo[$sppcGpId])){
self::$sInfo[$sppcGpId] = array(
'products_id'=> (int)products::$Info->products_id,
'specials_new_products_price'=> '',
'expires_date'=>'',
'specials_begin_date'=>'',
- 'customers_group_id'=> $sppcGpId,
+ 'customers_group_id'=> (int)$sppcGpId,
'customers_group_name'=> $sppcInfos['sppcname'],
'special_apply_mode'=> 0,
'status'=> 0,
@@ -390,7 +392,8 @@
}
}
self::$sInfo[0]['customers_group_name']= __('@specials customer groupe base');
-
+// print_r(self::$sInfo);
+// exit;
return array('title'=> __('heading specials inline') ,'text'=> tep_get_include_contents('products/'.__CLASS__.'/'.__FUNCTION__.'.edit'));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-11 18:07:16
|
Revision: 4580
http://oscss.svn.sourceforge.net/oscss/?rev=4580&view=rev
Author: oscim
Date: 2012-08-11 18:07:07 +0000 (Sat, 11 Aug 2012)
Log Message:
-----------
Suite correction sur le fichier less
Suite mise en oeuvre nettoyage fichier js.php
report dans les sous module products d'element manquant lors d'execution sql
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/application_bottom.php
branches/2.1.1/catalog/admin/includes/classes/drivers/sqlproduct.php
branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/package/display_view.source.edit.gab
branches/2.1.1/catalog/admin/includes/javascript/modules/pages/adminUsers.js.php
branches/2.1.1/catalog/admin/includes/javascript/modules/pages/orders.js.php
branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php
branches/2.1.1/catalog/admin/includes/javascript/oscss.js
branches/2.1.1/catalog/admin/includes/modules/pages/orders.php
branches/2.1.1/catalog/admin/includes/modules/pages/products.php
branches/2.1.1/catalog/admin/includes/modules/products/header_tags.php
branches/2.1.1/catalog/admin/includes/modules/products/products_extra.php
branches/2.1.1/catalog/admin/includes/template/defaut/css/less/datatable.less
branches/2.1.1/catalog/admin/includes/template/defaut/css/less/styles.less
branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less
Modified: branches/2.1.1/catalog/admin/includes/application_bottom.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/application_bottom.php 2012-08-11 18:04:00 UTC (rev 4579)
+++ branches/2.1.1/catalog/admin/includes/application_bottom.php 2012-08-11 18:07:07 UTC (rev 4580)
@@ -96,9 +96,12 @@
/** Init page event js */
function post_load_page(){
- /// Active Display message
+ /// Active Display message
OSCSS_JSCORE.utils.notif.ViewNotif();
+ // active preview box and toolip
+ OSCSS_JSCORE.utils.preview.Init();
+
// force reload link and adjust for open in dialog box
OSCSS_JSCORE.utils.AdjustLink.OpenInDialog();
Modified: branches/2.1.1/catalog/admin/includes/classes/drivers/sqlproduct.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/classes/drivers/sqlproduct.php 2012-08-11 18:04:00 UTC (rev 4579)
+++ branches/2.1.1/catalog/admin/includes/classes/drivers/sqlproduct.php 2012-08-11 18:07:07 UTC (rev 4580)
@@ -110,13 +110,13 @@
if ($action == 'insert_product') {
- $sql_data_array = array_merge($sql_data_array, self::$modules->get_insert_table_products ());
+ $sql_data_array = array_merge($sql_data_array, self::$modules->get_insert_table_products());
tep_db_perform(TABLE_PRODUCTS, $sql_data_array);
}
elseif ($action == 'update_product') {
$sql_data_array['products_last_modified'] ='now()';
- $sql_data_array = array_merge($sql_data_array, self::$modules->get_update_table_products ());
+ $sql_data_array = array_merge($sql_data_array, self::$modules->get_update_table_products());
tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'");
}
Modified: branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2012-08-11 18:04:00 UTC (rev 4579)
+++ branches/2.1.1/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2012-08-11 18:07:07 UTC (rev 4580)
@@ -630,10 +630,10 @@
+ <div class="main-orders master">
-
<div class="main-orders block fleft w_50 padd_w">
<div class="block_field fleft w_50" >
@@ -737,8 +737,8 @@
</table>
</div>
+</div>
-
<div class="button_nav">
<?php echo tep_js_back(tep_href_link(orders::FILENAME), IMAGE_CANCEL);?>
</div>
Modified: branches/2.1.1/catalog/admin/includes/gabarit/package/display_view.source.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/package/display_view.source.edit.gab 2012-08-11 18:04:00 UTC (rev 4579)
+++ branches/2.1.1/catalog/admin/includes/gabarit/package/display_view.source.edit.gab 2012-08-11 18:07:07 UTC (rev 4580)
@@ -17,6 +17,8 @@
<div class=" block_form">
<div class="edit">
<?php if(package::$action == 'source_add'): ?>
+
+Not implemented in this current version
<p class="block_input">
<label class="inline" for="key"><?php echo __('@package src key'); ?></label>
<?php echo tep_draw_input_field('key', '', (string)package::$list->key , ' class="w_70" ', true); ?>
Modified: branches/2.1.1/catalog/admin/includes/javascript/modules/pages/adminUsers.js.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/modules/pages/adminUsers.js.php 2012-08-11 18:04:00 UTC (rev 4579)
+++ branches/2.1.1/catalog/admin/includes/javascript/modules/pages/adminUsers.js.php 2012-08-11 18:07:07 UTC (rev 4580)
@@ -15,6 +15,9 @@
tep_include_file (DIR_WS_TEMPLATE."jquery.validate.css",true);
tep_include_file ("includes/javascript/jquery.validate.min.js",true);
?>
+
+<?php oscss_cstr::CallBack('OSCSS_JSCORE.orders.utils.Init();'); // Active check key ?>
+
<script type="text/javascript">
$(function(){
// validate signup form on keyup and submit
@@ -29,7 +32,6 @@
minlength: 3
},
admin_email: {
-// required: true,
checkmail: true,
email: true
},
@@ -58,70 +60,38 @@
});
+ jQuery.validator.addMethod("checkmail", function(value, element) {
+ var exists;
+ //function to call inside ajax callback
+ function set_exists(x){
+ exists = x;
+ }
+ $.ajax({
+ url: "<?php echo adminUsers::FILENAME ?>",
+ type: "GET",
+ async: false, // set to false so order of operations is correct
+ data: { action:"CheckMail", ajax : "true", cID : '<?php echo @$_GET['cID'] ?>' , email : value},
+ success: function(data){
+ if(data == true){
+ set_exists(true);
+ }
+ else{
+ set_exists(false);
+ }
+ }
+ });
+ if(exists == true){
+ return true;
+ }
+ else{
+ return false;
+ }
+ },
+ jQuery.format("this email already exists")
+ );
-
-
-
-
- jQuery.validator.addMethod("checkmail", function(value, element) {
-// var result = false;
-var exists;
-
-//function to call inside ajax callback
-function set_exists(x){
- exists = x;
-}
-
-
-$.ajax({
- url: "<?php echo adminUsers::FILENAME ?>",
- type: "GET",
- async: false, // set to false so order of operations is correct
- data: { action:"CheckMail", ajax : "true", cID : '<?php echo @$_GET['cID'] ?>' , email : value},
- success: function(data){
- if(data == true){
- set_exists(true);
- }
- else{
- set_exists(false);
- }
- }
-});
-if(exists == true){
- return true;
-}
-else{
- return false;
-}
-
-// var result = $.get("<?php echo adminUsers::FILENAME ?>", { action:"CheckMail", ajax : "true", uID : '<?php echo adminUsers::$Info->id ?>' },
-// function success(data) {
-// // alert(data);
-// // if(data === '1')
-// // result = false;
-// // // alert('dfdf');
-// // else
-// result = true;
-// return true;
-// return false;
-// return result;
-// });
-// alert(result);
-// return true;
- },
- jQuery.format("this email already exists")
- );
-
-// ?action=CheckMail&cID=1&flag=0&forceajax=true
-/*
- $("#admin_email").onout( function () {
- $.get("<?php //echo adminUsers::FILENAME ?>", { action:"CheckMail", },
- function success(data) {
- $("#state").replaceWith(data);
- });
- });*/
- });
- </script>
+ });
+</script>
<?php endif; ?>
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/javascript/modules/pages/orders.js.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/modules/pages/orders.js.php 2012-08-11 18:04:00 UTC (rev 4579)
+++ branches/2.1.1/catalog/admin/includes/javascript/modules/pages/orders.js.php 2012-08-11 18:07:07 UTC (rev 4580)
@@ -1,119 +1,67 @@
<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @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 28/12/11, 17:30
+ @date 10/08/12, 17:30
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
?>
-<?php if (orders::$action == 'edit'):
+<?php if (orders::$action == 'edit'): ?>
- tep_include_file (DIR_WS_TEMPLATE."jquery.validate.css",true);
- tep_include_file ("includes/javascript/jquery.validate.min.js",true);
+ <script type="text/javascript"><!--
-?>
- <script type="text/javascript"><!--
- function disabled(inputs){$(inputs).css.display='none';}
- function activ(inputs){$(inputs).css.display='inline';}
+(function(){ // début de scope local
+OSCSS_JSCORE.orders = OSCSS_JSCORE.orders || {};
+// déclaration de la classe de validation proprement dite
+OSCSS_JSCORE.orders.utils = {
+ // déclaration de nos variables statiques
- /// ScreenShot product in hover link products
- this.screenshotPreview = function(){
- /* CONFIG */
+ // déclaration de nos méthodes
+ // Check
+ Init:function( ) {
- xOffset = 10;
- yOffset = 30;
- // these 2 variable determine popup's distance from the cursor
- // you might want to adjust to get the right result
- /* END CONFIG */
- $("a.screenshot").hover(function(e){
- this.t = this.title;
- this.title = "";
- var c = (this.t != "") ? "<br/>" + this.t : "";
- $("body").append("<p id='screenshot'><img src='"+ this.rel +"' alt='url preview' />"+ c +"</p>");
- $("#screenshot")
- .css("top",(e.pageY - xOffset) + "px")
- .css("left",(e.pageX + yOffset) + "px")
- .fadeIn("fast");
- },
- function(){
- this.title = this.t;
- $("#screenshot").remove();
- });
- $("a.screenshot").mousemove(function(e){
- $("#screenshot")
- .css("top",(e.pageY - xOffset) + "px")
- .css("left",(e.pageX + yOffset) + "px");
- });
- };
+ /// Edit and info payment
+ $("#modpayment").change( function () {
+ $.get("./aca.php", { 'action':"editmod",'action_type' : "pages", 'action_class' : "orders", 'action_method' : "display_view" , 'modtype' : "payment", 'oID': "<?php echo (int)orders::$oID ?>", 'mod': this.value },
+ function success(data) {
+ $("#modPay").html(data);
+ });
+ });
+ /// Edit and change info block shipping
+ $("#modshipping").change( function () {
+ $.get("./aca.php", { 'action':"editmod",'action_type' : "pages", 'action_class' : "orders", 'action_method' : "display_view" , 'modtype' : "shipping", 'oID': "<?php echo (int)orders::$oID ?>", 'mod': this.value },
+ function success(data) {
+ $("#modShip").html(data);
+ });
+ });
- // starting the script on page load
- $(document).ready(function(){
- screenshotPreview();
- disabled('#cont_comments');
+ // starting the script on page load
+ $(document).ready(function(){
+ // loop for
+ $(".tirroir").each( function () {
+ $(this).hide();
+ });
- /// Edit and info payment
- $("#modpayment").change( function () {
- $.get("./aca.php", { 'action':"editmod",'action_type' : "pages", 'action_class' : "orders", 'action_method' : "display_view" , 'modtype' : "payment", 'oID': "<?php echo (int)orders::$oID ?>", 'mod': this.value },
- function success(data) {
- $("#modPay").html(data);
- });
- });
+ });
+ },
- /// Edit and change info block shipping
- $("#modshipping").change( function () {
- $.get("./aca.php", { 'action':"editmod",'action_type' : "pages", 'action_class' : "orders", 'action_method' : "display_view" , 'modtype' : "shipping", 'oID': "<?php echo (int)orders::$oID ?>", 'mod': this.value },
- function success(data) {
- $("#modShip").html(data);
- });
- });
- });
+};
+// trick JavaScript pour émuler le self:: en PHP : on utilise une variable locale
+var self = OSCSS_JSCORE.orders.utils;
+})(); // fin de scope locale
+ //--></script>
- // validate signup form on keyup and submit for shipping
-// $(function(){
-// $("#add_deliv").validate({
-// rules: {
-// shipping_tracing_number: {
-// required: true,
-// minlength: 3
-// },
-// },
-// messages: {
-// shipping_tracing_number: {
-// required: " <?php //echo addslashes(__('js alert numero expedition')) ?>",
-// minlength: " <?php //echo addslashes(__('your numero must consist of at least 3 characters')) ?>"
-// },
-// errorElement: "span",
-// errorPlacement: function(error, element) {
-// error.appendTo( element.parent());
-// },
-// // onkeyup: true ;
-// });
-// });
+<?php oscss_cstr::CallBack('OSCSS_JSCORE.orders.utils.Init();'); // Active check key ?>
- //--></script>
-
- <style type="text/css">
- /* */
-
- #screenshot{
- position:absolute;
- border:1px solid #ccc;
- background:#333;
- padding:5px;
- display:none;
- color:#fff;
- }
-
- </style>
<?php endif; ?>
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php 2012-08-11 18:04:00 UTC (rev 4579)
+++ branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php 2012-08-11 18:07:07 UTC (rev 4580)
@@ -9,11 +9,8 @@
@encode UTF-8
*/
-/// put js listing post_load
-oscss_cstr::CallBack('screenshotPreview();');
?>
-
<script type="text/javascript"><!--
(function(){ // début de scope local
@@ -134,49 +131,8 @@
}
-// function Toolip(){
- /// ScreenShot product in hover link products
- this.screenshotPreview = function(){
- /* CONFIG */
- xOffset = 10;
- yOffset = 30;
- // these 2 variable determine popup's distance from the cursor
- // you might want to adjust to get the right result
-
- /* END CONFIG */
- $("a.screenshot").hover(function(e){
- this.t = this.title;
- this.title = "";
- var c = (this.t != "") ? "<br/>" + this.t : "";
- $("body").append("<p id='screenshot'><img src='"+ this.rel +"' alt='url preview' />"+ c +"</p>");
- $("#screenshot")
- .css("top",(e.pageY - xOffset) + "px")
- .css("left",(e.pageX + yOffset) + "px")
- .fadeIn("fast");
- },
- function(){
- this.title = this.t;
- $("#screenshot").remove();
- });
- $("a.screenshot").mousemove(function(e){
- $("#screenshot")
- .css("top",(e.pageY - xOffset) + "px")
- .css("left",(e.pageX + yOffset) + "px");
- });
-
- };
-// }
-
-
-
-
-
-
-
-
-
$(function() {
$("a.fancyajax.manufacturers").fancybox({
'overlayOpacity': 0.6,
@@ -223,8 +179,7 @@
<?php oscss_cstr::CallBack('OSCSS_JSCORE.products.utlis.Init();'); // Active check key ?>
- // force adjust display price
-// OSCSS_JSCORE.products.utlis.updateGross();
+
});
//--></script>
Modified: branches/2.1.1/catalog/admin/includes/javascript/oscss.js
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/oscss.js 2012-08-11 18:04:00 UTC (rev 4579)
+++ branches/2.1.1/catalog/admin/includes/javascript/oscss.js 2012-08-11 18:07:07 UTC (rev 4580)
@@ -112,12 +112,11 @@
// suppression de la pile
self.Clean();
- }
+ },
+
};
// fin de classe
-
-
// trick JavaScript pour émuler le self:: en PHP : on utilise une variable locale
var self = OSCSS_JSCORE.utils.notif;
@@ -125,6 +124,7 @@
+
// Gestion des notification
// déclaration de la classe de validation proprement dite
OSCSS_JSCORE.utils.AdjustLink = {
@@ -242,11 +242,62 @@
},
-};
+};
+// fin de classe
+
+
+
+
+
+ // Gestion des notification
+ // déclaration de la classe de validation proprement dite
+ OSCSS_JSCORE.utils.preview = {
+
+ Init:function(){
+ OSCSS_JSCORE.utils.preview.Preview();
+ },
+
+ Preview:function(){
+ /// ScreenShot product in hover link products
+// this.screenshotPreview = function(){
+ /* CONFIG */
+
+ xOffset = 10;
+ yOffset = 30;
+
+ // these 2 variable determine popup's distance from the cursor
+ // you might want to adjust to get the right result
+
+ /* END CONFIG */
+ $("a.screenshot").hover(function(e){
+ this.t = this.title;
+ this.title = "";
+ var c = (this.t != "") ? "<br/>" + this.t : "";
+ $("body").append("<p id='screenshot'><img src='"+ this.rel +"' alt='url preview' />"+ c +"</p>");
+ $("#screenshot")
+ .css("top",(e.pageY - xOffset) + "px")
+ .css("left",(e.pageX + yOffset) + "px")
+ .fadeIn("fast");
+ },
+ function(){
+ this.title = this.t;
+ $("#screenshot").remove();
+ });
+ $("a.screenshot").mousemove(function(e){
+ $("#screenshot")
+ .css("top",(e.pageY - xOffset) + "px")
+ .css("left",(e.pageX + yOffset) + "px");
+ });
+// };
+ },
+
+
+ };
+ // fin de classe
+ // trick JavaScript pour émuler le self:: en PHP : on utilise une variable locale
+// var self = OSCSS_JSCORE.utils.preview;
-
-
})(); // fin de scope local
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/orders.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/orders.php 2012-08-11 18:04:00 UTC (rev 4579)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/orders.php 2012-08-11 18:07:07 UTC (rev 4580)
@@ -277,10 +277,10 @@
if(
- ( isset($in_session[$clean]) && (string)$in_session[$clean] == 'on' )
+ ( isset($in_session[$alias]) && (string)$in_session[$alias] == 'on' )
|| ( count($in_session) <=1 && ( is_array($row) && isset($row['default']) && $row['default'] == true) )
) {
- $_SESSION['filters']['allfields'][$clean] = 'on';
+ $_SESSION['filters']['allfields'][$alias] = 'on';
/**
@remarks this define col theader title, and ajust html code
*/
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/products.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/products.php 2012-08-11 18:04:00 UTC (rev 4579)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/products.php 2012-08-11 18:07:07 UTC (rev 4580)
@@ -221,23 +221,7 @@
}
/* END Datatype RootListing categorie */
- /* DEB Datatype RootListing manufacturer */
- if( DataTypes::is_active('manufacturer')) {
- self::$allfields['p.manufacturers_id']= array(
- 'sort'=>true,
- 'alias'=>'manufacturers_id',
- 'text'=>__('products table heading manufacturers id'),
- );
- self::$allfields['m.manufacturers_name']= array(
- 'sort'=>true,
- 'alias'=>'manuf_title',
- 'text'=>__('products table heading manufacturers'),
- 'width'=>'12%',
- );
- }
- /* END Datatype RootListing manufacturer */
-
/* DEB Datatype RootListing featured */
if( DataTypes::is_active('featured')) {
self::$allfields['fada.featured_id']= array(
@@ -348,6 +332,17 @@
// min fields and not view directly colonne fields
$listfield = ' cat.categories_id, ';
+ /* DEB Sub module add table */
+ $r = self::$modules->__call('GetConf', array('type'=>'forcelistfields')) ;
+ foreach($r as $mod=>$value){
+ foreach($value as $key=>$string){
+ $listfield .= $string;
+ }
+ }
+ /* END Sub module add col */
+
+
+
// put in
if(isset($_SESSION['filters'][__CLASS__]['allfields']))
$_SESSION['filters']['allfields'] = $_SESSION['filters'] [__CLASS__]['allfields'];
@@ -771,7 +766,7 @@
'products_weight' => (isset($_POST['products_weight'])? tep_db_prepare_input($_POST['products_weight']) : 0) ,
'products_status' => tep_db_prepare_input($_POST['products_status']),
'products_tax_class_id' => tep_db_prepare_input($_POST['products_tax_class_id']),
- 'manufacturers_id' => (isset($_POST['manufacturers_id']) ?tep_db_prepare_input($_POST['manufacturers_id']) : ''),
+// 'manufacturers_id' => (isset($_POST['manufacturers_id']) ?tep_db_prepare_input($_POST['manufacturers_id']) : ''),
'track_stock' => (isset($_POST['track_stock']) ? tep_db_prepare_input($_POST['track_stock']) : ((self::$modules->type_flag==1 ) ? 1 : 0) ),
'products_ordered' => (isset($_POST['products_ordered']) ? tep_db_prepare_input($_POST['products_ordered']) : '0' )
);
@@ -980,7 +975,9 @@
}
- $query_raw = "select ".$adjust->listfields.", p.products_id as id FROM " . TABLE_PRODUCTS . " p ".
+ $query_raw = "select ".$adjust->listfields;
+
+ $query_raw .=", p.products_id as id FROM " . TABLE_PRODUCTS . " p ".
" LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON(p.products_id = pd.products_id and pd.language_id = '" . (int)$adjust->languages_id . "') ";
if( DataTypes::is_active('categorie')){
@@ -989,10 +986,10 @@
" LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " catd ON( catd.categories_id =p2p.categories_id AND catd.language_id='".(int)$adjust->languages_id."' ) ";
}
- if( DataTypes::is_active('manufacturer'))
- $query_raw .= " LEFT JOIN " . TABLE_MANUFACTURERS . " m ON( m.manufacturers_id=p.manufacturers_id ) ";
+// if( DataTypes::is_active('manufacturer'))
+// $query_raw .= " LEFT JOIN " . TABLE_MANUFACTURERS . " m ON( m.manufacturers_id=p.manufacturers_id ) ";
+//
-
if( DataTypes::is_active('featured')) {
$query_raw .= " LEFT JOIN " . TABLE_FEATURED_DATA . " fada ON( fada.datatype_id=p.products_id AND datatype = 'product' ) ";
$query_raw .= " LEFT JOIN " . TABLE_FEATURED_DESCRIPTION . " fad ON( fad.featured_id=fada.featured_id AND fad.languages_id = '".(int)$adjust->languages_id."' ) ";
Modified: branches/2.1.1/catalog/admin/includes/modules/products/header_tags.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/products/header_tags.php 2012-08-11 18:04:00 UTC (rev 4579)
+++ branches/2.1.1/catalog/admin/includes/modules/products/header_tags.php 2012-08-11 18:07:07 UTC (rev 4580)
@@ -159,6 +159,20 @@
parent::insert_db_values(self::$pInfo->tag_id,$action,$pInfo,$language_id);
}
+
+ /**
+ @brief action delete product
+ */
+ public function delete_product($products_id){
+ $products_query = tep_db_query("SELECT tag_id FROM " . TABLE_FULL_TAG . " ft WHERE ft.page_type='product' and ft.page_id = '" . (int)$products_id . "' ");
+ $products = tep_db_fetch_array($products_query);
+// $products['tag_id'];
+
+ tep_db_query("DELETE FROM ".TABLE_FULL_TAG_DESCRIPTION." WHERE tag_id ='".(int)$products['tag_id']."' " );
+
+ return tep_db_query("DELETE FROM ".TABLE_FULL_TAG." ft WHERE ft.page_type='product' and ft.page_id ='".(int)$products_id."' " );
+ }
+
/**
Edition/affichage produit
UP db
Modified: branches/2.1.1/catalog/admin/includes/modules/products/products_extra.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/products/products_extra.php 2012-08-11 18:04:00 UTC (rev 4579)
+++ branches/2.1.1/catalog/admin/includes/modules/products/products_extra.php 2012-08-11 18:07:07 UTC (rev 4580)
@@ -122,16 +122,20 @@
}
- public function delete_account ($id){
+ /**
+ @brief action delete product
+ */
+ public function delete_product($products_id){
$extra_fields_query = tep_db_query("select ce.epf_id as id, epf_input_type as type, epf_active_value_language as active_value_language from " . TABLE_PRODUCTS_EXTRA_FIELDS . " ce where ce.epf_status=1 AND epf_special_mod='' ");
while($extra_fields = tep_db_fetch_array($extra_fields_query)) {
//! This function returns an array with variables to update into TABLE_ADDRESS_BOOK
- tep_db_query("delete from " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " eppf where products_id=" . (int)$id." AND products_extra_fields_id='".$extra_fields['id']."' ");
+ tep_db_query("delete from " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " eppf where products_id=" . (int)$products_id." AND products_extra_fields_id='".$extra_fields['id']."' ");
}
- }
+ }
+
/**
@brief copie products
*/
Modified: branches/2.1.1/catalog/admin/includes/template/defaut/css/less/datatable.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/defaut/css/less/datatable.less 2012-08-11 18:04:00 UTC (rev 4579)
+++ branches/2.1.1/catalog/admin/includes/template/defaut/css/less/datatable.less 2012-08-11 18:07:07 UTC (rev 4580)
@@ -39,6 +39,7 @@
.dataTableBase,
.dataTableSearch,
.dataTable{
+ float:left;
width:100%;
border-width:0;
border:1px solid @color_012;
Modified: branches/2.1.1/catalog/admin/includes/template/defaut/css/less/styles.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/defaut/css/less/styles.less 2012-08-11 18:04:00 UTC (rev 4579)
+++ branches/2.1.1/catalog/admin/includes/template/defaut/css/less/styles.less 2012-08-11 18:07:07 UTC (rev 4580)
@@ -137,7 +137,7 @@
h5.Ctrtirroir{ margin: 10px 0; padding: 0 0 0 (@padding_base * 2); font-size: (@font_size * 1.1); }
.Ctrtirroir {
background:transparent url("../../../../../images/icons/icon_down.gif") left top no-repeat;
- padding-left:(@padding_base * 2);
+ padding-left:20px;
height:@lineheight;
}
.Ctrtirroir.closed {background:transparent url("../../../../../images/icons/icon_arrow_right.gif") left top no-repeat; }
@@ -148,9 +148,6 @@
/* Section Notification */
div#messageStack{
- height: auto!important;
- height: 25px;
- min-height: 25px;
min-width:(@display_max_width * 0.75 ) ;
width:(@display_width * 0.75 ) ;
display:block;
@@ -861,8 +858,10 @@
zoom: 1;
.ui-tabs-nav {
- margin: 0;
- padding: 0;
+ display: inline-block;
+ margin: 0;
+ padding: 0;
+ width: 100%;
li {
list-style: none;
Modified: branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less 2012-08-11 18:04:00 UTC (rev 4579)
+++ branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less 2012-08-11 18:07:07 UTC (rev 4580)
@@ -139,8 +139,9 @@
h5.Ctrtirroir{ margin: 10px 0; padding: 0 0 0 (@padding_base * 2); font-size: (@font_size * 1.1); }
.Ctrtirroir {
background:transparent url("../../../../../images/icons/icon_down.gif") left top no-repeat;
- padding-left:(@padding_base * 2);
+ padding-left:20px;
height:@lineheight;
+ font-weight:bold;
cursor : pointer;
&:hover{
@@ -149,7 +150,7 @@
}
}
.Ctrtirroir.closed {background:transparent url("../../../../../images/icons/icon_arrow_right.gif") left top no-repeat; }
-fieldset ul.tirroir li { float: left; position: relative; width: 100%;}
+fieldset ul.tirroir li { float: left; position: relative; width: auto;}
@@ -157,9 +158,6 @@
/* Section Notification */
div#messageStack{
- height: auto!important;
- height: 25px;
- min-height: 25px;
min-width:(@display_max_width * 0.75 ) ;
width:(@display_width * 0.75 ) ;
display:block;
@@ -648,6 +646,7 @@
* Section specific Orders page
*/
.main-orders{
+
fieldset{
.border-radius(5px);
.rounded(5px);
@@ -691,13 +690,23 @@
}
.block {
- width: 46%;
- margin:@margin (@margin / 2);
+
background:#c9c9c9;
.border-radius(5px,5px,5px,5px);
.box-shadow(2px 5px 3px rgba(0,0,0,0.5));
}
+
+ &.master{
+ width: 100%;
+ display:table;
+
+ .block{
+ display:table-cell;
+ width: 49%;
+ margin:@margin (@margin / 2);
+ }
+ }
}
/* Ajsutement customer page */
@@ -886,8 +895,10 @@
zoom: 1;
.ui-tabs-nav {
- margin: 0;
- padding: 0;
+ display: inline-block;
+ margin: 0;
+ padding: 0;
+ width: 100%;
li {
list-style: none;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-11 18:04:07
|
Revision: 4579
http://oscss.svn.sourceforge.net/oscss/?rev=4579&view=rev
Author: oscim
Date: 2012-08-11 18:04:00 +0000 (Sat, 11 Aug 2012)
Log Message:
-----------
correction module manufacturer
Modified Paths:
--------------
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/languages/fr_FR/modules/products/manufacturers.txt
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/modules/products/manufacturers.php
trunk/extensions/MANUFACTURERS_stable/install.xml
Added Paths:
-----------
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/gabarit/products/
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/gabarit/products/manufacturers/
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/gabarit/products/manufacturers/display_inline.edit.gab
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/javascript/
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/javascript/modules/
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/javascript/modules/products/
trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/javascript/modules/products/manufacturers.js.php
Added: trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/gabarit/products/manufacturers/display_inline.edit.gab
===================================================================
--- trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/gabarit/products/manufacturers/display_inline.edit.gab (rev 0)
+++ trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/gabarit/products/manufacturers/display_inline.edit.gab 2012-08-11 18:04:00 UTC (rev 4579)
@@ -0,0 +1,24 @@
+<?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 10/08/12, 18:05
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+ <fieldset id="ManufacturersInline" class="block_field">
+<legend><?php echo __('@manufactures heading inline') ?></legend>
+ <p class="block_input">
+ <span class="valuenumber">
+ <?php echo tep_draw_pull_down_menu('manufacturers_id', manufacturers::in_manufacturers('',false) , manufacturers::$mInfo['manufacturers_id'], ' class="manufacturersselect " '); ?>
+ </span>
+
+ <span class="valuestatus">
+ <?php echo tep_draw_checkbox_field('manufacturers_status','', 'on' , (((int) manufacturers::$mInfo['manufacturers_id']<=0)? false : true ), ' class="special_price price" size="16" ', false) .' '.__('@manufacturers txt status'); ?>
+ </span>
+
+ </p>
+ </fieldset>
Added: trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/javascript/modules/products/manufacturers.js.php
===================================================================
--- trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/javascript/modules/products/manufacturers.js.php (rev 0)
+++ trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/javascript/modules/products/manufacturers.js.php 2012-08-11 18:04:00 UTC (rev 4579)
@@ -0,0 +1,52 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @manufacturers osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 28/12/11, 17:30
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+global $languages_selected;
+?>
+<script type="text/javascript"><!--
+
+(function(){ // début de scope local
+OSCSS_JSCORE.manufacturers = OSCSS_JSCORE.manufacturers || {};
+// déclaration de la classe de validation proprement dite
+OSCSS_JSCORE.manufacturers.utlis = {
+ // déclaration de nos variables statiques
+
+
+ // déclaration de nos méthodes
+ // Check
+ DisplayAdjust:function( ) {
+
+ // adjust input disabled based on select mode
+ $("input[name=manufacturers_status]").change(function(){
+
+ if( $(this).attr('checked') =='checked' ){
+ $('#manufacturers_id').removeAttr("disabled");
+ }
+ else{
+ $('#manufacturers_id').attr("disabled", "disabled");
+ }
+
+ })
+ .change();
+ },
+
+
+};
+
+// trick JavaScript pour émuler le self:: en PHP : on utilise une variable locale
+var self = OSCSS_JSCORE.manufacturers.utlis;
+
+var master = OSCSS_JSCORE.products.utlis;
+})(); // fin de scope locale
+
+//--></script>
+
+
+<?php oscss_cstr::CallBack('OSCSS_JSCORE.manufacturers.utlis.DisplayAdjust();'); // Active check key ?>
Modified: trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/languages/fr_FR/modules/products/manufacturers.txt
===================================================================
--- trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/languages/fr_FR/modules/products/manufacturers.txt 2012-08-11 14:46:57 UTC (rev 4578)
+++ trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/languages/fr_FR/modules/products/manufacturers.txt 2012-08-11 18:04:00 UTC (rev 4579)
@@ -8,4 +8,18 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
+
+$lang['@manufacturers table heading manufacturers id']= "Fabricant id.";
+$lang['@manufacturers table heading manufacturers_image']= "Fabricant Img.";
+$lang['@manufacturers table heading manufacturers']= "Fabricant Nom";
+$lang['@manufacturers table heading date_added']= "Fabricant ajouté le";
+$lang['@manufacturers table heading last_modified']= "Fabricant modifié le";
+$lang['@manufacturers table heading url_clicked']= "Fabricant clické";
+$lang['@manufacturers table heading date_last_click']= "Fabricant dernier click";
+// $lang['@manufacturers table heading last_modified']= "Fabricant id.";
+
+
+$lang['@manufactures heading inline']= "Fabricant";
+$lang['@manufacturers txt status']= "definir fabricant";
+$lang['@manufacturers select']= "Fabricants...";
?>
\ No newline at end of file
Modified: trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/modules/products/manufacturers.php
===================================================================
--- trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/modules/products/manufacturers.php 2012-08-11 14:46:57 UTC (rev 4578)
+++ trunk/extensions/MANUFACTURERS_stable/catalog/admin/includes/modules/products/manufacturers.php 2012-08-11 18:04:00 UTC (rev 4579)
@@ -21,6 +21,10 @@
public static $manufacturers_array = array();
public static $pInfo;
+ /**
+ @var tmp array for transport var in .gab file s
+ */
+ public static $mInfo;
/**
Constructeur
@@ -30,8 +34,10 @@
$this->title = __('module aca manufacturers text title');
$this->description = __('module aca manufacturers text description');
$this->sort_order = (defined('MODULE_ACA_MANUFACTURERS_SORT_ORDER')) ? MODULE_ACA_MANUFACTURERS_SORT_ORDER : '';
+ // flag for active / inactive this global module
$this->enabled = DataTypes::is_active('manufacturer');
-// $this->general=true;
+ // flag active call methode display_inline in section "general"
+ $this->general=true;
if($this->enabled) {
global $language;
@@ -44,42 +50,173 @@
}
}
+
/**
+ @brief Load , adjust and define var environement GetConf master module
+ @param $opt array
+ type => '' string name type for define return
+ languages_id => '' int
*/
- public function check_action($actions){
+ public function GetConf($opt){
+ global $languages_id;
+ $array = array();
+ switch ($opt['type']) {
+ case 'allfields':
+ $array['p.manufacturers_id'] = array(
+ 'sort'=>true,
+ 'alias'=>'manufacturers_id',
+ 'text'=>__('@manufacturers table heading manufacturers id'),
+ 'width'=>'8%',
+ 'class'=>'tleft',
+// 'default'=>true,
+ );
+ $array['m.manufacturers_image'] = array(
+ 'sort'=>true,
+ 'alias'=>'manufacturers_image',
+ 'text'=>__('@manufacturers table heading manufacturers_image'),
+ 'width'=>'12%',
+ );
+ $array['m.manufacturers_name'] = array(
+ 'sort'=>true,
+ 'alias'=>'manuf_title',
+ 'text'=>__('@manufacturers table heading manufacturers'),
+ 'width'=>'12%',
+ );
+ $array['m.date_added'] = array(
+ 'sort'=>true,
+ 'alias'=>'manuf_date_added',
+ 'text'=>__('@manufacturers table heading date_added'),
+ 'width'=>'12%',
+ );
+ $array['m.last_modified'] = array(
+ 'sort'=>true,
+ 'alias'=>'manuf_last_modified',
+ 'text'=>__('@manufacturers table heading last_modified'),
+ 'width'=>'12%',
+ );
+ $array['mi.url_clicked'] = array(
+ 'sort'=>true,
+ 'alias'=>'manuf_url_clicked',
+ 'text'=>__('@manufacturers table heading url_clicked'),
+ 'width'=>'12%',
+ );
+ $array['mi.date_last_click'] = array(
+ 'sort'=>true,
+ 'alias'=>'manuf_date_last_click',
+ 'text'=>__('@manufacturers table heading date_last_click'),
+ 'width'=>'12%',
+ );
- return $actions;
+ break;
+
+ case 'tables':
+
+ $array['m'] = " LEFT JOIN " . TABLE_MANUFACTURERS . " m ON( m.manufacturers_id=p.manufacturers_id ) ";
+ $array['mi'] = " LEFT JOIN " . TABLE_MANUFACTURERS_INFO . " mi ON( mi.manufacturers_id=m.manufacturers_id AND mi.languages_id = '".$languages_id."' ) ";
+
+ break;
+
+ case 'forcelistfields':
+ $array[] =" m.manufacturers_image ,";
+
+ break;
+
+ }
+ return $array;
+ }
+
+
+ /**
+ @brief format db value for this allfields
+ @param $key string name key
+ @param $item array
+ */
+ public function formatdbvalue($key,$item){
+ global $languages_id;
+
+ switch($key){
+ case 'manuf_date_added':
+ case 'manuf_last_modified':
+ case 'manuf_date_last_click':
+ $value = (( !empty($item[$key]) && $item[$key] !='1000-01-01 00:00:00' )? tep_date_short($item[$key]) : '');
+ break;
+ case 'manuf_title':
+ $value = '<a rel="'.tep_href_link('document.php', 'mod=img&&w=200&h=200&key='.md5( $item['manufacturers_image'])) .'" class="screenshot" href="#" title="" onclick="return false;"> '.$item['manuf_title'].'</a>';
+ break;
+ default:
+ $value = $item[$key] ;
+ }
+
+ return $value;
+ }
+
+
+ /**
+ */
+ public function get_header_js ($action) {
+ ?>
+ <style type="text/css">
+ #ManufacturersInline{
+ display:table;
+ }
+ #ManufacturersInline span{
+ display:table-cell;
+ display: inline-block;
+ height: 20px;
+ width: 29%;
+ }
+
+ #ManufacturersInline select,
+ #ManufacturersInline input{
+ min-width: 10%;
+ width: 90%;
+ margin:0 5px;
+ padding:0;
+ }
+
+ </style>
+ <?php
+
+
+ tep_include_file(DIR_WS_JS . "modules/products/".__CLASS__.".js.php",true);
+
+ return '';
}
+
+
/**
- The $post contains only post values for this module pInfo is an array: [field name][language id]=value
*/
-// function load_post_values ($post) {
-// self::$pInfo=$post;
-// }
+ public function check_action($actions){
+ return $actions;
+ }
/**
Edition produit
UP db
*/
-// function insert_table_products ($language_id) {
-// $myarray=array( 'manufacturers_id' => self::$pInfo['manufacturers_id'] );
-// return $myarray;
-// }
+ function insert_table_products () {
+ if(isset($_POST['manufacturers_status']) && (string)$_POST['manufacturers_status'] == 'on')
+ $myarray=array( 'manufacturers_id' => (isset($_POST['manufacturers_id']) ?tep_db_prepare_input($_POST['manufacturers_id']) : '') );
+ else
+ $myarray=array( 'manufacturers_id' => '' );
+
+
+ return $myarray;
+ }
+
/**
Edition produit
UP db
*/
-// function update_table_products ($language_id) {
-// $myarray= $this->insert_table_products ($language_id);
-//
-// print_r($_POST);
-// exit;
-// return $myarray;
-// }
+ function update_table_products () {
+ $myarray= $this->insert_table_products ();
+ return $myarray;
+ }
+
/**
Chargement des db
@@ -96,11 +233,12 @@
$DB=Database::getInstance();
$this->load_db_values (products::$Info->products_id);
+ self::$mInfo['manufacturers_id'] = (int)products::$Info->manufacturers_id;
+
/// use master gabarit
$m= MGabCont::CallGab('edit',__FUNCTION__,'products/'.__CLASS__);
-
- return array('title'=> __('heading manufactures') ,'text'=> 'ototo'/*$m*/);
+ return array('title'=> ''/*__('@manufactures heading inline')*/ ,'text'=> $m);
}
@@ -108,15 +246,6 @@
Suppression apres confirmation
*/
public function delete_product ($products_id){
-// error_reporting(E_ALL);
-// if (!isset($products_id)) return false;
-// $this->load_db_values ($products_id);
-// foreach($this->fans as $k=>$v) {
-// !online
-// if ( is_array($v) ) {
-// $query = tep_db_query("DELETE FROM " . TABLE_MANUFACTURERS . " WHERE customers_id ='".$v['customers_id']."' limit 1 ");
-// }
-// }
}
@@ -126,12 +255,15 @@
@version 1.4
utilisé pour recharger ajax
*/
- function in_manufacturers($selected='',$print=true) {
+ public static function in_manufacturers($selected='',$print=true) {
$manufacturers_array = $sortie='';
+ $manufacturers_array[] = array('id' => '','text' => __('@manufacturers select') );
+
$manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");
while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
$manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'],'text' => $manufacturers['manufacturers_name']);
- if ($selected==$manufacturers['manufacturers_id']) $sortie .='<option value="'.$manufacturers['manufacturers_id'].'" selected="selected">'.$manufacturers['manufacturers_name'].'</option>';
+
+ if (!empty($selected) && $selected==$manufacturers['manufacturers_id']) $sortie .='<option value="'.$manufacturers['manufacturers_id'].'" selected="selected">'.$manufacturers['manufacturers_name'].'</option>';
else $sortie .='<option value="'.$manufacturers['manufacturers_id'].'">'.$manufacturers['manufacturers_name'].'</option>';
}
@@ -149,7 +281,7 @@
function install() {
- 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_MANUFACTURERS_SORT_ORDER', '0', 'Sort order of process.', '".$key."', '0', now())");
+ tep_db_query("insert IGNORE 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_MANUFACTURERS_SORT_ORDER', '0', 'Sort order of process.', '".$key."', '0', now())");
}
Modified: trunk/extensions/MANUFACTURERS_stable/install.xml
===================================================================
--- trunk/extensions/MANUFACTURERS_stable/install.xml 2012-08-11 14:46:57 UTC (rev 4578)
+++ trunk/extensions/MANUFACTURERS_stable/install.xml 2012-08-11 18:04:00 UTC (rev 4579)
@@ -19,7 +19,10 @@
<file name="admin/includes/gabarit/manufacturers/display_view.edit.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/javascript/products/manufacturersjs.php" />
+
<file name="common/classes/datatype_drivers/Data_manufacturer.php" />
<file name="templates/defaut/includes/boxes/manufacturers.php" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-11 14:47:04
|
Revision: 4578
http://oscss.svn.sourceforge.net/oscss/?rev=4578&view=rev
Author: oscim
Date: 2012-08-11 14:46:57 +0000 (Sat, 11 Aug 2012)
Log Message:
-----------
correction et amelioration
suppression page special , et integration complete dans la page produit
Modified Paths:
--------------
trunk/extensions/SPECIALS_stable/catalog/admin/includes/languages/fr_FR/modules/products/specials.txt
trunk/extensions/SPECIALS_stable/catalog/admin/includes/modules/products/specials.php
trunk/extensions/SPECIALS_stable/install.xml
Added Paths:
-----------
trunk/extensions/SPECIALS_stable/catalog/admin/includes/gabarit/products/
trunk/extensions/SPECIALS_stable/catalog/admin/includes/gabarit/products/specials/
trunk/extensions/SPECIALS_stable/catalog/admin/includes/gabarit/products/specials/display_inline.edit.gab
trunk/extensions/SPECIALS_stable/catalog/admin/includes/javascript/modules/products/
trunk/extensions/SPECIALS_stable/catalog/admin/includes/javascript/modules/products/specials.js.php
Added: trunk/extensions/SPECIALS_stable/catalog/admin/includes/gabarit/products/specials/display_inline.edit.gab
===================================================================
--- trunk/extensions/SPECIALS_stable/catalog/admin/includes/gabarit/products/specials/display_inline.edit.gab (rev 0)
+++ trunk/extensions/SPECIALS_stable/catalog/admin/includes/gabarit/products/specials/display_inline.edit.gab 2012-08-11 14:46:57 UTC (rev 4578)
@@ -0,0 +1,34 @@
+<?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 10/08/12, 18:05
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+ <ul id="SpecialInline">
+ <?php foreach(specials::$sInfo as $item) : ?>
+ <li class="block_input">
+ <h5><?php echo $item['customers_group_name'] ?></h5>
+
+ <span class="valuenumber">
+ <?php echo tep_draw_input_field('special_price['.$item['customers_group_id'].']','', $item['specials_new_products_price'], ' class="special_price price" size="16" ', false); ?>
+ <?php echo tep_draw_input_field('special_price_pourc['.$item['customers_group_id'].']','', (string)round( ( 100 - ( ($item['specials_new_products_price'] *100) / products::$Info->products_price ) ), 2) , ' class="special_pourc price pourc " size="16" '.( $item['special_apply_mode'] == 1) ).'%'; ?>
+ <?php echo tep_draw_pull_down_menu('special_mode['.$item['customers_group_id'].']', specials::$mode , $item['special_apply_mode'], ' class="special_mode w_10" '); ?>
+ <?php echo tep_draw_input_field('special_price_gross['.$item['customers_group_id'].']','', (string)tep_add_tax($item['specials_new_products_price'] , tep_get_tax_rate(products::$Info->products_tax_class_id)), ' class="price " size="16" ' ); ?>
+ </span>
+
+ <span class="valuedate">
+ <?php echo tep_draw_input_field('specials_begin_date['.$item['customers_group_id'].']','', (string)tep_date_short($item['specials_begin_date']), ' class="special_date_begin date w_30" size="16" ', false); ?>
+ <?php echo tep_draw_input_field('expires_date['.$item['customers_group_id'].']','', (string)tep_date_short($item['expires_date']), ' class="special_date_expire date w_30 " size="16" ', false); ?>
+ </span>
+
+ <span class="valuestatus">
+ <?php echo tep_draw_checkbox_field('special_status['.$item['customers_group_id'].']','', 'on' , (((int)$item['status']==0)? false : true ), ' class="special_price price" size="16" ', false) .' '.__('@specials txt status'); ?>
+ </span>
+ </li>
+ <?php endforeach; ?>
+ </ul>
Added: trunk/extensions/SPECIALS_stable/catalog/admin/includes/javascript/modules/products/specials.js.php
===================================================================
--- trunk/extensions/SPECIALS_stable/catalog/admin/includes/javascript/modules/products/specials.js.php (rev 0)
+++ trunk/extensions/SPECIALS_stable/catalog/admin/includes/javascript/modules/products/specials.js.php 2012-08-11 14:46:57 UTC (rev 4578)
@@ -0,0 +1,131 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @specials osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 28/12/11, 17:30
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+global $languages_selected;
+?>
+<script type="text/javascript"><!--
+
+(function(){ // début de scope local
+OSCSS_JSCORE.specials = OSCSS_JSCORE.specials || {};
+// déclaration de la classe de validation proprement dite
+OSCSS_JSCORE.specials.utlis = {
+ // déclaration de nos variables statiques
+
+
+ // déclaration de nos méthodes
+ // Check
+ DisplayAdjust:function( ) {
+
+
+ // adjust input disabled based on select mode
+// $('select.special_mode').focus(function() {
+ $("select.special_mode").change(function(){
+
+ var mode = $(this).val();
+
+ if( mode == 0){
+ $(this).prev().attr("disabled", "disabled");
+ $(this).prev().prev().removeAttr("disabled");
+ }
+ // pourc mode
+ else if(1){
+ $(this).prev().removeAttr("disabled");
+ $(this).prev().prev().attr("disabled", "disabled");
+ }
+
+ $(this).next().attr("disabled", "disabled");
+ })
+ .change();
+// });
+
+
+ // calculate pourc based on price net
+ $('input.special_price').focus(function() {
+ $("input.special_price").change(function(){
+ var price = $(this).val();
+ var base_price = $("input#products_price").val();
+
+ var new_pourc =self.calculpourc( base_price,price);
+
+ $(this).next().val( new_pourc );
+
+ $(this).next().next().next().val( master.CalculGross(price) );
+ })
+ .change();
+ });
+
+ // calculate pirce based on pourc
+ $('input.special_pourc').focus(function() {
+ $("input.special_pourc").change(function(){
+ var pourc = $(this).val();
+ var base_price = $("input#products_price").val();
+
+ var new_price = self.calculprice( base_price,pourc);
+
+ $(this).prev().val( new_price );
+
+ $(this).next().next().val( master.CalculGross(new_price) );
+ })
+ .change();
+ });
+
+ $(function() {
+ $.datepicker.setDefaults($.extend({
+ duration: '',
+ changeMonth: true,
+ changeYear: true,
+ showOn: 'button',
+// showTime: true,
+// time24h: true,
+ buttonImage: '<?php echo DIR_WS_ICONS ?>calendar.gif',
+ buttonImageOnly: true
+ }
+ <?php if ($languages_selected != 'en') echo ",\n"."$.datepicker.regional['".$languages_selected."']"."\n"; ?>
+ ));
+ $('.date').datepicker();
+ });
+ },
+
+
+
+
+ calculprice:function( base_price , pourc ){
+ return ( base_price / ( 1 + (pourc/100) ) );
+ },
+ calculpourc:function( base_price , price ){
+ return ( 100 - ((parseFloat( price ) * 100) / parseFloat( base_price) ) );
+ },
+
+};
+
+// trick JavaScript pour émuler le self:: en PHP : on utilise une variable locale
+var self = OSCSS_JSCORE.specials.utlis;
+
+var master = OSCSS_JSCORE.products.utlis;
+})(); // fin de scope locale
+
+//--></script>
+
+
+<?php oscss_cstr::CallBack('OSCSS_JSCORE.specials.utlis.DisplayAdjust();'); // Active check key ?>
+
+
+
+
+<?php if (products::$action == 'edit'): ?>
+ <script type="text/javascript"><!--
+
+ $(function() {
+
+ });
+
+ //--></script>
+
+<?php endif; ?>
\ No newline at end of file
Modified: trunk/extensions/SPECIALS_stable/catalog/admin/includes/languages/fr_FR/modules/products/specials.txt
===================================================================
--- trunk/extensions/SPECIALS_stable/catalog/admin/includes/languages/fr_FR/modules/products/specials.txt 2012-08-11 13:34:09 UTC (rev 4577)
+++ trunk/extensions/SPECIALS_stable/catalog/admin/includes/languages/fr_FR/modules/products/specials.txt 2012-08-11 14:46:57 UTC (rev 4578)
@@ -3,7 +3,7 @@
@licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 22/06/2012, 12:04
+ @date 04/06/12, 12:04
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -18,5 +18,22 @@
$lang["Laissez la date d'échéance vide pour aucune expiration"]= "Laissez la date d'échéance vide pour aucune expiration";
$lang["Date d'expiration :<small>(jj/mm/aaaa)</small>"]= "Date d'expiration :<small>(jj/mm/aaaa)</small>";
-$lang['@specials products table heading special price']= 'Promotions';
+
+
+$lang['heading specials inline']= 'Promotion';
+$lang['@specials customer groupe base']= 'Groupe client particulier';
+$lang['@specials table heading special_id']= 'Special.Id';
+$lang['@specials table heading specials_new_products_price']= 'Special.Px';
+$lang['@specials table heading specials_date_added']= 'Special. ajouté le';
+$lang['@specials table heading specials_last_modified']= 'Special. modifié';
+$lang['@specials table heading expires_date']= 'Special.expire';
+$lang['@specials table heading date_status_change']= 'Special. etat modifié';
+$lang['@specials table heading status']= 'Special. etat';
+$lang['@specials table heading specials_begin_date']= 'Special. débute le';
+$lang['@specials table heading customers_group_id']= 'Special. groupe client';
+
+
+$lang['@specials txt status']= 'Actif';
+$lang['@specials mode fixed']= 'Fixe';
+$lang['@specials mode pourc']= 'en %';
?>
\ No newline at end of file
Modified: trunk/extensions/SPECIALS_stable/catalog/admin/includes/modules/products/specials.php
===================================================================
--- trunk/extensions/SPECIALS_stable/catalog/admin/includes/modules/products/specials.php 2012-08-11 13:34:09 UTC (rev 4577)
+++ trunk/extensions/SPECIALS_stable/catalog/admin/includes/modules/products/specials.php 2012-08-11 14:46:57 UTC (rev 4578)
@@ -1,11 +1,10 @@
<?php
/**
- @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @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>
- @subpackage specials
- @version 2.1.1
- @date 14/04/2012, 19:45
+ @version 2.1.0
+ @date 23/12/10, 19:45
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class specials
@@ -20,285 +19,389 @@
public $code;
/**
- @var boolean
+ @a boolean
si true ferme popup en fin de cycle
*/
public $closeview;
/**
- @var $action string
- */
+ @var string
+ */
public static $action;
/**
@var object
*/
public static $sInfo;
/**
- @var array
+ @param array
*/
- public static $tax_class_array=array(
- 'id'=>0,
- 'text'=>'',
- 'value'=>'0'
- );
+ public static $tax_class_array;
/**
- @var array
+ @param array
*/
public static $p_array;
+
+
+
/**
- @var flag price boolean for active panel option price in edit page products
+ @var array mode for value calcul
*/
- public $price;
+ public static $mode = array();
-
- /**
- @brief constructor
- */
+// class constructor
function __construct() {
$this->code = __CLASS__;
$this->title = __('MODULE_ACAPRO_SPECIAL_TEXT_TITLE');
$this->description = __('MODULE_ACAPRO_SPECIAL_TEXT_DESCRIPTION') ;
$this->sort_order = (defined('MODULE_ACAPRO_SPECIAL_SORT_ORDER')) ? MODULE_ACAPRO_SPECIAL_SORT_ORDER : 0 ;
$this->enabled = true;
- $this->price = false;
+
+ $this->price = true;
+
$this->closeview=false;
+
+
+ self::$mode[0] = array('id'=> 0, 'text'=> __('@specials mode fixed') );
+ self::$mode[1] = array('id'=> 1, 'text'=> __('@specials mode pourc') );
}
+
+
/**
+ @brief Load , adjust and define var environement GetConf master module
+ @param $opt array
+ type => '' string name type for define return
+ languages_id => '' int
*/
- public function get_header_js ($action) {
- global $current_theme,$languages_selected;
+ public function GetConf($opt){
+ $array = array();
- // force load calculate array taxe for js function
- $this->load_db_taxe(products::$pInfo->products_id);
+ switch ($opt['type']) {
+ case 'allfields':
+ $array['ps.special_id'] = array(
+ 'sort'=>true,
+ 'alias'=>'specials_id',
+ 'text'=>__('@specials table heading special_id'),
+ 'width'=>'8%',
+ 'class'=>'tleft',
+// 'default'=>true,
+ );
+ $array['ps.specials_new_products_price'] = array(
+ 'sort'=>true,
+ 'alias'=>'specials_new_products_price',
+ 'text'=>__('@specials table heading specials_new_products_price'),
+ 'width'=>'8%',
+ 'class'=>'tleft',
+// 'default'=>true,
+ );
+ $array['ps.specials_date_added'] = array(
+ 'sort'=>true,
+ 'alias'=>'specials_date_added',
+ 'text'=>__('@specials table heading specials_date_added'),
+ 'width'=>'8%',
+ 'class'=>'tleft',
+// 'default'=>true,
+ );
+ $array['ps.specials_last_modified'] = array(
+ 'sort'=>true,
+ 'alias'=>'specials_last_modified',
+ 'text'=>__('@specials table heading specials_last_modified'),
+ 'width'=>'8%',
+ 'class'=>'tleft',
+// 'default'=>true,
+ );
+ $array['ps.expires_date'] = array(
+ 'sort'=>true,
+ 'alias'=>'expires_date',
+ 'text'=>__('@specials table heading expires_date'),
+ 'width'=>'8%',
+ 'class'=>'tleft',
+// 'default'=>true,
+ );
+ $array['ps.date_status_change'] = array(
+ 'sort'=>true,
+ 'alias'=>'date_status_change',
+ 'text'=>__('@specials table heading date_status_change'),
+ 'width'=>'8%',
+ 'class'=>'tleft',
+// 'default'=>true,
+ );
+ $array['ps.status'] = array(
+ 'sort'=>true,
+ 'alias'=>'specials_status',
+ 'text'=>__('@specials table heading status'),
+ 'width'=>'8%',
+ 'class'=>'tleft',
+// 'default'=>true,
+ );
+ $array['ps.specials_begin_date'] = array(
+ 'sort'=>true,
+ 'alias'=>'specials_begin_date',
+ 'text'=>__('@specials table heading specials_begin_date'),
+ 'width'=>'8%',
+ 'class'=>'tleft',
+// 'default'=>true,
+ );
+ $array['ps.customers_group_id'] = array(
+ 'sort'=>true,
+ 'alias'=>'customers_group_id',
+ 'text'=>__('@specials table heading customers_group_id'),
+ 'width'=>'8%',
+ 'class'=>'tleft',
+// 'default'=>true,
+ );
+ break;
- tep_include_file(DIR_WS_JS . "modules/pages/".__CLASS__.".js.php",true);
- return '';
- }
+ case 'tables':
- public function check_action ($actions){
- global $currencies;
+ $array['ps'] = " LEFT JOIN " . TABLE_SPECIALS . " ps ON( ps.products_id=p.products_id AND customers_group_id = 0 ) ";
- self::$action=$act=$actions['action'];
+ break;
+ }
+ return $array;
+ }
- switch (self::$action){
- case 'insert_special':
- $specials_array = array();
- $specials_query = tep_db_query("select p.products_id from " . TABLE_PRODUCTS . " p, " . TABLE_SPECIALS . " s where s.products_id = p.products_id");
- while ($specials = tep_db_fetch_array($specials_query)) {
- $specials_array[] = $specials['products_id'];
- }
- $list_products=tep_get_product_list($specials_array);
- foreach($list_products as $k=>$v) self::$p_array[]=array('id'=>$v['products_id'],'text'=>$v['products_name'].' (' . $currencies->format($v['products_price']) . ') ');
- break;
+ /**
+ @brief format db value for this allfields
+ @param $key string name key
+ @param $item array
+ */
+ public function formatdbvalue($key,$item){
+ global $languages_id;
+ switch($key){
+ case 'specials_date_added':
+ case 'specials_last_modified':
+ case 'date_status_change':
+ case 'specials_begin_date':
+ case 'expires_date':
+ $value = (( !empty($item[$key]) && $item[$key] !='1000-01-01 00:00:00' )? tep_date_short($item[$key]) : '');
+ break;
+/**
+ TODO remplacer l'id du groupe par son nom
+*/
+ case 'specials_status':
+ $value =
+ sprintf(
+ CsrtAction::getFormat('row_etat'),
+ (int)$item[$key],
+ ( ($item[$key] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ )
+ ;
- default:
- if( method_exists($this,$act) ) $this->$act();
- }
+ break;
+ default:
+ $value = $item[$key] ;
+ }
+// exit;
+ return $value;
+ }
- if(isset($_GET['forceview']) && $this->closeview) {
- echo '<script type="text/javascript">window.parent.$.fn.fancybox.close();</script>';
- echo tep_js_back(tep_href_link(products::FILENAME), IMAGE_BACK);
- }
-// else tep_redirect(tep_href_link(FILENAME_SPECIALS, 'page=' . $page . '&sID=' . $specials_id.'&row_by_page='.$row_by_page));
- if(isset($_GET['origin_reload']))tep_redirect(tep_href_link($_GET['origin_reload']));
- return $actions;
- }
-
/**
- @fn display_ColumnRowAction($id)
- @brief Affichage dans la liste central colonne action
- @param $id integer
- @return string
*/
- public function display_ColumnRowAction($id) {
- $this->load_db_values($id);
- if(isset(self::$sInfo) && isset(self::$sInfo->products_id) && self::$sInfo->products_id==$id)
- $contents = ' <a class="buttonimg fancyView iframe" href="' . tep_href_link('aca.php', 'action=update_special&action_type=products&action_class='.__CLASS__.'&action_method=display_view&products_id=' .$id . '') . '">' . tep_image(DIR_WS_ICONS . 'special_on.png',__('image special') ). '</a> ';
- else
- $contents = ' <a class="buttonimg fancyView iframe" href="' . tep_href_link('aca.php', 'action=insert_special&action_type=products&action_class='.__CLASS__.'&action_method=display_view&products_id=' .$id . '') . '">' . tep_image(DIR_WS_ICONS . 'special_off.png',__('image special') ). '</a> ';
+ public function get_header_js ($action) {
+ ?>
+ <style type="text/css">
+ #SpecialInline{
+ display:table;
+ }
+ .valuenumber{
+ display:table-cell;
+ display: inline-block;
+ height: 20px;
+ width: 100%;
+ }
+ .valuedate{
+ display:table-cell;
+ display: inline-block;
+ height: 20px;
+ width: 40%;
+ }
+ .valuestatus{
+ display:table-cell;
+ display: inline-block;
+ height: 20px;
+ width: 25%;
+ }
- return $contents;
- }
+ #SpecialInline .valuedate .hasDatepicker{
+ float:none;
+ }
+ </style>
+ <?php
- /**
- Recup element stocké dans db
- */
- public function load_db_values($products_id) {
- global $languages_id;
- $product_query = tep_db_query("select p.products_id, pd.products_name, p.products_price,s.specials_id, s.specials_new_products_price, s.expires_date, s.specials_begin_date from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = s.products_id and s.products_id = '" . (int)$products_id . "'");
- $product = tep_db_fetch_array($product_query);
- self::$sInfo = ( (tep_db_num_rows($product_query)>0) ? new objectInfo($product) : array() );
- return (tep_db_num_rows($product_query)>0)? true : false;
+ tep_include_file(DIR_WS_JS . "modules/products/".__CLASS__.".js.php",true);
+
+ return '';
}
+
/**
- @fn display_inline($array)
- @brief specific for page edit products, and optionnal price
- @param $array array
+ @brief Enregsitrement des prix specials
+ @param $products_id int
*/
- public function display_inline($array) {
- $this->load_db_values (products::$pInfo->products_id);
+ public function after_update ($products_id) {
- /**
- @remarks use gabarit not centralised in /specials/, but in poducts/specials/
- */
- return array(
- 'title'=> __('heading specials inline') ,
- 'text'=> tep_get_include_contents(''.__CLASS__.'/products.display_view.inline')
- );
- }
+ $all_adjust = array();
+ if(is_array($_POST['special_mode']))
+ foreach($_POST['special_mode'] as $key=>$row){
- /**
- @fn display_view()
- @brief call by ajax and fancy
- */
- public function display_view(){
+ // no price
+ if(isset($_POST['special_price'][$key]) && (float)$_POST['special_price'][$key] > 0)
+ $new = tep_db_prepare_input($_POST['special_price'][$key]);
+ elseif(isset($_POST['special_price_pourc'][$key]) && (float)$_POST['special_price_pourc'][$key] > 0){
+ $products_price = tep_db_prepare_input($_POST['products_price']);
+ $new = ($products_price - (( tep_db_prepare_input($_POST['special_price_pourc'][$key]) / 100) * $products_price));
+ }
+ else
+ $new = false;
- if(isset($_GET['products_id']) && ( $this->load_db_values((int)$_GET['products_id']) ) )
- $form_action = 'update';
+ if($new !=false) {
+ $all_adjust[$key]['special_apply_mode'] = (int)$row;
+ $all_adjust[$key]['specials_new_products_price'] = $new;
- else
- $form_action = 'insert';
+ if(isset($_POST['specials_begin_date'][$key]) && (float)$_POST['specials_begin_date'][$key] > 0){
+ $date_available = tep_db_prepare_input( $_POST['specials_begin_date'][$key] ) ;
+ $date_available = (date('Y-m-d') < tep_date_raw($date_available)) ? tep_date_raw($date_available) : '1000-01-01 00:00:00';
- switch (self::$action) {
- case 'edit':
- case 'new':
- default:
- /**
- @remarks use gabarit centralised in /specials/, not specific for this modules
- */
- return
- '<form id="new_special" action="' . tep_href_link('aca.php','action_type=products&action_class='.__CLASS__.'&action='.$form_action.'_special_exe&products_id=' .(int)$_GET['products_id'] . '&forceview=true', 'NONSSL') . '" method="post">'."\n".
- tep_get_include_contents(__CLASS__.'/'.__FUNCTION__.'.edit').
- '</form>';
- }
- }
+ $all_adjust[$key]['specials_begin_date'] = $date_available;
+ }
-//=====================================
-// Functions for modules specific
-//=====================================
+ if(isset($_POST['expires_date'][$key]) && (float)$_POST['expires_date'][$key] > 0){
+ $date_expire = tep_db_prepare_input( $_POST['expires_date'][$key] ) ;
+ $date_expire = (date('Y-m-d') < tep_date_raw($date_expire) && $date_available < tep_date_raw($date_expire) ) ? tep_date_raw($date_expire) : '1000-01-01 00:00:00';
- /**
- Class taxe array
- */
- public function load_db_taxe ($products_id=0) {
+ $all_adjust[$key]['expires_date'] = $date_expire;
+ }
- if($products_id <=0)
- return ;
+ if(isset($_POST['special_status'][$key]) && (float)$_POST['special_status'][$key] == 'on')
+ $all_adjust[$key]['status'] = 1;
+ else
+ $all_adjust[$key]['status'] = 0;
- $tax_class_query = tep_db_query("SELECT s.products_id,s.specials_id,t.tax_class_id, t.tax_class_title FROM " . TABLE_PRODUCTS . " p, " . TABLE_TAX_CLASS . " t, ".TABLE_SPECIALS." s WHERE s.products_id=".(int)$products_id." AND p.products_id=s.products_id AND p.products_tax_class_id=t.tax_class_id;");
- $tax_class = tep_db_fetch_array($tax_class_query);
+ }
+ else
+ tep_db_query("DELETE FROM ".TABLE_SPECIALS." WHERE products_id = '".(int)$products_id."' AND customers_group_id = '".$group."' " );
+ }
- $this->tax_class_array =$tax_class_array = array('id' => $tax_class['tax_class_id'],
- 'text' => $tax_class['tax_class_title'],
- 'value' => tep_get_tax_rate_value($tax_class['tax_class_id']));
+ foreach($all_adjust as $group=>$array){
+
+ $res = tep_db_query($sql="SELECT specials_id FROM " . TABLE_SPECIALS . " s WHERE products_id = '" . (int)$products_id . "' AND customers_group_id = '".$group."' ");
+
+ if( $res->__get('numRows') > 0 ){
+ $arr = $res->fetchAssoc();
+ $r=tep_db_perform(TABLE_SPECIALS, $array , 'update', " products_id = '" . (int)$products_id . "' AND specials_id = '".$arr['specials_id']."' ");
+ }
+ else{
+ $array['products_id']=$products_id;
+ $r=tep_db_perform(TABLE_SPECIALS, $array );
+ }
+ }
+
}
- /**
- Recup des produits n'etant pas en promos
- */
- public function load_db_list_product_no_special(){
- $specials_array = array();
- $specials_query = tep_db_query("select p.products_id from " . TABLE_PRODUCTS . " p, " . TABLE_SPECIALS . " s where s.products_id = p.products_id");
- while ($specials = tep_db_fetch_array($specials_query)) {
- $specials_array[] = $specials['products_id'];
- }
+ /**
+ @brief action delete product
+ */
+ public function delete_product($products_id){
+ return tep_db_query("DELETE FROM ".TABLE_SPECIALS." WHERE products_id = '".(int)$products_id."' " );
+ }
- $list_products=tep_get_product_list($specials_array);
- foreach($list_products as $k=>$v)
- $p_array[]=array('id'=>$v['products_id'],'text'=>$v['products_name'].' (' . $currencies->format($v['products_price']) . ') ');
+ public function check_action ($actions){
+ global $currencies;
- $this->parray=$p_array;
+ return $actions;
}
/**
- Recup element product
+ @fn display_ColumnRowAction($id)
+ @brief Affichage dans la liste central colonne action
+ @param $id integer
+ @return string
*/
- public function load_db_product($products_id) {
+// public function display_ColumnRowAction($id) {
+// }
+
+ /**
+ Recup element stocké dans db
+ */
+ public function load_db_values($products_id) {
global $languages_id;
+ $product_query = tep_db_query($sql="select s.products_id, s.specials_id, s.specials_new_products_price, s.expires_date, s.specials_begin_date , s.status from ". TABLE_SPECIALS . " s where s.products_id = '" . (int)$products_id . "'");
+ $product = $product_query->fetchAssoc();
- $product_query = tep_db_query($sql="select p.products_id, pd.language_id, pd.products_name, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = '" . (int)$products_id . "'");
+ self::$sInfo = ( (tep_db_num_rows($product_query)>0) ? new objectInfo($product) : array() );
- $product = tep_db_fetch_array($product_query);
- self::$sInfo = ( (tep_db_num_rows($product_query)>0) ? new objectInfo($product) : array() );
+ return (tep_db_num_rows($product_query)>0)? true : false;
}
-
-
/**
- @fn insert_special_exe()
- @brief call by form in page products
+ @fn display_inline($array)
+ @brief specific for page edit products, and optionnal price
+ @param $array array
+ TODO: Not engine correct
*/
- public function insert_special_exe(){
- $action=(isset(self::$action)? 'update' : 'insert');
- $specials_price = tep_db_prepare_input($_POST['specials_price']);
- $value_discount = tep_db_prepare_input($_POST['value_discount']);
+ public function display_inline($array) {
- $specials_begin_date = tep_db_prepare_input($_POST['specials_begin_date']);
+/**
+ TODO Couplage avec groupe client
+*/
+ $product_query = tep_db_query($sql="select s.products_id, s.specials_id, s.specials_new_products_price, s.expires_date, s.status, s.specials_begin_date , customers_group_id, special_apply_mode from ". TABLE_SPECIALS . " s where s.products_id = '" . (int)products::$Info->products_id . "'");
+ $product = $product_query->fetchAllAssoc();
- $specials_begin_date = tep_date_raw($specials_begin_date);
- $expires_date = tep_db_prepare_input($_POST['expires_date']);
- $expires_date = tep_date_raw($expires_date);
- $begin_hour = tep_db_prepare_input($_POST['begin_hour']);
- $expires_hour = tep_db_prepare_input($_POST['expires_hour']);
+ self::$sInfo = ( (tep_db_num_rows($product_query)>0)
+ ? $product
+ : array(array(
+ 'products_id'=> (int)products::$Info->products_id,
+ 'specials_new_products_price'=> '',
+ 'expires_date'=>'',
+ 'specials_begin_date'=>'',
+ 'customers_group_id'=> 0,
+ 'customers_group_name'=> __('@specials customer groupe base'),
+ 'special_apply_mode'=> 0,
+ 'status'=> 0,
+ ))
+ );
- $sql_data_array = array('specials_begin_date' => ((($specials_begin_date)&& $specials_begin_date!='--')? $specials_begin_date: '0000-00-00').' '.(tep_not_null($begin_hour)?$begin_hour:'00:00').':00',
- 'expires_date' => ((tep_not_null($expires_date) && $expires_date!='--')? $expires_date: '0000-00-00').' '.(tep_not_null($expires_hour)?$expires_hour:'00:00').':00');
+ if (isset(products::$Info->products_sppc)){
+ foreach (products::$Info->products_sppc as $sppcGpId => $sppcInfos){
+
+ if(!isset(self::$sInfo[$sppcGpId])){
+ self::$sInfo[$sppcGpId] = array(
+ 'products_id'=> (int)products::$Info->products_id,
+ 'specials_new_products_price'=> '',
+ 'expires_date'=>'',
+ 'specials_begin_date'=>'',
+ 'customers_group_id'=> $sppcGpId,
+ 'customers_group_name'=> $sppcInfos['sppcname'],
+ 'special_apply_mode'=> 0,
+ 'status'=> 0,
+ );
+ }
+ else{
+ self::$sInfo[$sppcGpId]['customers_group_name']= $sppcInfos['sppcname'];
+ }
+ }
+ }
+ self::$sInfo[0]['customers_group_name']= __('@specials customer groupe base');
- if (self::$action == 'insert') {
- $products_id = tep_db_prepare_input($_POST['products_id']);
+ return array('title'=> __('heading specials inline') ,'text'=> tep_get_include_contents('products/'.__CLASS__.'/'.__FUNCTION__.'.edit'));
+ }
- if (tep_not_null($value_discount)) {
- $new_special_insert_query = tep_db_query("select products_id, products_price from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
- $new_special_insert = tep_db_fetch_array($new_special_insert_query);
- $products_price = $new_special_insert['products_price'];
- $specials_price = ($products_price - (($specials_price / 100) * $products_price));
- }
- $insert_sql_data = array ('products_id' => intval($products_id),
- 'specials_new_products_price' => tep_db_input($specials_price),
- 'specials_date_added' => 'now()',
- 'status' => '1');
- $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
-
- tep_db_perform(TABLE_SPECIALS, $sql_data_array);
-
-// tep_redirect(tep_href_link(FILENAME_SPECIALS, 'page=' . $page));
- } elseif (self::$action == 'update') {
- $specials_id = tep_db_prepare_input($_POST['specials_id']);
- $products_price = tep_db_prepare_input($_POST['products_price']);
-
- if (tep_not_null($value_discount) ) $specials_price = ($products_price - (($value_discount / 100) * $products_price));
-
- $update_sql_data = array ('specials_new_products_price' => tep_db_input($specials_price),
- 'specials_last_modified' => 'now()');
-
- $sql_data_array = array_merge($sql_data_array, $update_sql_data);
-
- tep_db_perform(TABLE_SPECIALS, $sql_data_array, 'update', "specials_id = '" . intVal($specials_id) . "'");
-
-// tep_redirect(tep_href_link(FILENAME_SPECIALS, 'sID=' . $specials_id));
- }
- $this->closeview=true;
- }
-
/**
- @fn update_special_exe()
- @brief call by form in page products
+ @fn display_view()
+ @brief call by ajax and fancy
*/
- public function update_special_exe(){
- if(isset($_GET['pID']) && $this->load_db_values((int)$_GET['pID']) ) $this->load_db_values ((int)$_GET['pID']);
- self::$action='update';
- $this->insert_special_exe('','update');
+ public function display_view(){
+ return false;
}
Modified: trunk/extensions/SPECIALS_stable/install.xml
===================================================================
--- trunk/extensions/SPECIALS_stable/install.xml 2012-08-11 13:34:09 UTC (rev 4577)
+++ trunk/extensions/SPECIALS_stable/install.xml 2012-08-11 14:46:57 UTC (rev 4578)
@@ -10,38 +10,39 @@
</description>
<addfile>
- <file name="admin/includes/modules/pages/specials.php" />
+<!-- <file name="admin/includes/modules/pages/specials.php" /> -->
<file name="admin/includes/modules/products/specials.php" />
- <file name="admin/includes/gabarit/specials/display_view.listing.gab" />
- <file name="admin/includes/gabarit/specials/display_view.edit.gab" />
-<!-- <file name="admin/includes/gabarit/specials.newChoose.gab" /> -->
- <file name="admin/includes/gabarit/specials/display_view.delete.gab" />
- <file name="admin/includes/gabarit/specials/products.display_view.inline.gab" />
+<!-- <file name="admin/includes/gabarit/specials/display_view.listing.gab" /> -->
+<!-- <file name="admin/includes/gabarit/specials/display_view.edit.gab" /> -->
+<!-- <file name="admin/includes/gabarit/specials/display_view.delete.gab" /> -->
- <file name="admin/includes/javascript/modules/pages/specials.js.php" />
+ <file name="admin/includes/gabarit/specials/products/specials/display_inline.edit.gab" />
+
+<!-- <file name="admin/includes/javascript/modules/pages/specials.js.php" /> -->
+ <file name="admin/includes/javascript/modules/products/specials.js.php" />
<file name="includes/modules/generic/specials.php" />
</addfile>
<addfilelg>
- <file name="admin/includes/languages/%LANGUAGE%/modules/pages/specials.txt" lgref="fr_FR" />
+<!-- <file name="admin/includes/languages/%LANGUAGE%/modules/pages/specials.txt" lgref="fr_FR" /> -->
<file name="admin/includes/languages/%LANGUAGE%/modules/products/specials.txt" lgref="fr_FR" />
</addfilelg>
- <add2endlg>
+<!-- <add2endlg>
<file name="admin/includes/languages/%LANGUAGE%/boxes/07_catalog.php" />
<add type="php" lgref="fr_FR"><![CDATA[define('BOX_CATALOG_SPECIALS', 'Promotion');]]></add>
<add type="php" lgref="en_EN"><![CDATA[define('BOX_CATALOG_SPECIALS', 'Special');]]></add>
- </add2endlg>
+ </add2endlg>-->
- <add2end>
+<!-- <add2end>
<file name="admin/includes/boxes/07_catalog.php" />
<add type="php"><![CDATA[ $tabl_link[]= array(FILENAME_SPECIALS, 'BOX_CATALOG_SPECIALS', 'specials', @$img['specials']);]]></add>
- </add2end>
+ </add2end>-->
<config>
<group_key>CG_OPTION_MODULES</group_key>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-11 13:34:16
|
Revision: 4577
http://oscss.svn.sourceforge.net/oscss/?rev=4577&view=rev
Author: oscim
Date: 2012-08-11 13:34:09 +0000 (Sat, 11 Aug 2012)
Log Message:
-----------
correction coquille dans le js
amelioration et nettoyage du code
correction block filtre cat
ajustement form.less
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.categorie.gab
branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php
branches/2.1.1/catalog/admin/includes/modules/pages/products.php
branches/2.1.1/catalog/admin/includes/template/defaut/css/less/forms.less
branches/2.1.1/catalog/admin/includes/template/oscss/definition.less
Modified: branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.categorie.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.categorie.gab 2012-08-10 23:56:07 UTC (rev 4576)
+++ branches/2.1.1/catalog/admin/includes/gabarit/MGabCont/filter.categorie.gab 2012-08-11 13:34:09 UTC (rev 4577)
@@ -19,8 +19,8 @@
}
?>
<fieldset>
- <legend class="Ctrtirroir"><?php echo __('@filters filter legend choose categorie'); ?></legend>
- <ul class="tirroir">
+ <legend><?php echo __('@filters filter legend choose categorie'); ?></legend>
+ <ul>
<?php foreach(categorieUtility::get_category_tree(array('datatype'=>MGabCont::CallSt('GetClassDatatype'),'language_id'=>$languages_id , 'exclude'=>array('0'))) as $k=>$item): ?>
<li class="<?php echo ((bool)(count($_SESSION['filters']['categorie']) <=0 || (string)$_SESSION['filters']['categorie'][$item['id']] == 'on')? 'select' : '' ) ?>">
<?php echo tep_draw_checkbox_field('filters[categorie]['.$item['id'].']', 'filters[categorie]['.$item['id'].']', 'on', (bool)(count($_SESSION['filters']['categorie']) <=0 || (string)$_SESSION['filters']['categorie'][$item['id']] == 'on')); ?>
Modified: branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-08-10 23:56:07 UTC (rev 4576)
+++ branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-08-11 13:34:09 UTC (rev 4577)
@@ -8,7 +8,7 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
-
+global $currencies;
?>
<h3><?php echo __('heading title edit'); ?></h3>
@@ -96,11 +96,11 @@
</li>
<li class="block_input">
<label class="inline" for="products_price"><?php echo __('text products price net'); ?></label>
- <?php echo tep_draw_input_field('products_price','', products::$Info->products_price, '').'<span class="required">*</span>'; ?>
+ <?php echo tep_draw_input_field('products_price','', products::$Info->products_price, ' class="price" style=" " size="16" ').'<span class="required">*</span>'; ?>
</li>
<li class="block_input">
<label class="inline" for="products_price_gross"><?php echo __('text products price gross'); ?></label>
- <?php echo tep_draw_input_field('products_price_gross','', products::$Info->products_price, ''); ?>
+ <?php echo tep_draw_input_field('products_price_gross','', (string)tep_add_tax(products::$Info->products_price, tep_get_tax_rate(products::$Info->products_tax_class_id)) , ' class="price" style=" " size="16" '); ?>
</li>
@@ -114,54 +114,57 @@
<li>
<h4 class="Ctrtirroir"><?php echo __('Option de prix supplementaire') ?></h4>
<ul class="tirroir tabs_lang">
- <li>
- <ul>
- <?php if(isset($title) && is_array($title)): ?>
- <?php $i=0; foreach ($title as $item): ?>
- <li><a href="#products_price-<?php echo $i++; ?>"><?php echo $item; ?></a></li>
- <?php endforeach ; ?>
- <?php endif; ?>
- <?php if (isset(products::$Info->products_sppc)): ?>
- <li><a href="#products_price-<?php echo $i++; ?>"><?php echo __('text customers groups note').tep_image(DIR_WS_ICONS.'icon_help.gif', __('text customers groups note detail')) ?></a></li>
- <?php endif; ?>
- </ul>
- </li>
- <li>
- <ul>
+ <li>
+ <ul>
+
+ <?php if(isset($title) && is_array($title)): ?>
+ <?php $i=0; foreach ($title as $item): ?>
+ <li><a href="#products_price-<?php echo $i++; ?>"><?php echo $item; ?></a></li>
+ <?php endforeach ; ?>
+ <?php endif; ?>
+
+ <?php if (isset(products::$Info->products_sppc)): ?>
+ <li><a href="#products_price-<?php echo $i++; ?>"><?php echo __('text customers groups note').tep_image(DIR_WS_ICONS.'icon_help.gif', __('text customers groups note detail')) ?></a></li>
+ <?php endif; ?>
+
+ </ul>
+ </li>
+ <li>
+ <ul>
+
<?php if(isset($title) && is_array($title)): ?>
- <?php $i=0; foreach ($text as $item): ?>
- <li id="products_price-<?php echo $i++; ?>"><?php echo $item; ?></li>
- <?php endforeach ; ?>
- <?php endif; ?>
- <?php if (isset(products::$Info->products_sppc)): ?>
- <li id="products_price-<?php echo $i++; ?>" class="block_input">
- <ul>
- <?php foreach (products::$Info->products_sppc as $sppcGpId => $sppcInfos): ?>
- <li class="block_input">
- <label class="inline" for="<?php echo 'sppcprice_' . $sppcGpId; ?>"><?php
- echo tep_draw_checkbox_field('sppcoption[' . $sppcGpId . ']', '', 'sppcoption[' . $sppcGpId . ']',$sppcInfos['sppcprice']!=''?1:0) . ' ' . $sppcInfos['sppcname']; ?>
- </label><?php
- echo tep_draw_input_field('sppcprice[' . $sppcGpId . ']','', $sppcInfos['sppcprice']); ?>
- </li>
- <?php endforeach;?>
- </ul>
- </li>
- <?php endif; ?>
- </ul>
- </li>
+ <?php $i=0; foreach ($text as $item): ?>
+ <li id="products_price-<?php echo $i++; ?>"><?php echo $item; ?></li>
+ <?php endforeach ; ?>
+ <?php endif; ?>
+
+ <?php if (isset(products::$Info->products_sppc)): ?>
+ <li id="products_price-<?php echo $i++; ?>" class="block_input">
+ <ul>
+ <?php foreach (products::$Info->products_sppc as $sppcGpId => $sppcInfos): ?>
+ <li class="block_input">
+ <label class="inline" for="<?php echo 'sppcprice_' . $sppcGpId; ?>">
+ <?php echo tep_draw_checkbox_field('sppcoption[' . $sppcGpId . ']', '', 'sppcoption[' . $sppcGpId . ']',$sppcInfos['sppcprice']!=''?1:0) . ' ' . $sppcInfos['sppcname']; ?>
+ </label>
+
+ <?php echo tep_draw_input_field('sppcprice[' . $sppcGpId . ']','', $sppcInfos['sppcprice'], ' class="price" style=" " size="16" '); ?>
+ </li>
+ <?php endforeach;?>
+ </ul>
+ </li>
+ <?php endif; ?>
+ </ul>
+ </li>
</ul>
</li>
<li class="block_input">
<label class="inline" for="products_price_gross"><?php echo __('text products final price'); ?></label>
- <?php echo tep_draw_input_field('products_price_final','', products::$Info->products_price, 'disabled="disabled"'); ?>
+ <?php echo tep_draw_input_field('products_price_final','', (string)tep_add_tax(products::$Info->products_price, tep_get_tax_rate(products::$Info->products_tax_class_id)) , 'disabled="disabled" class="price" style=" " size="16" '); ?>
</li>
</ul>
</fieldset>
- <script type="text/javascript"><!--
- updateGross();
- // --></script>
<?php endif; ?>
Modified: branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php 2012-08-10 23:56:07 UTC (rev 4576)
+++ branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php 2012-08-11 13:34:09 UTC (rev 4577)
@@ -23,11 +23,16 @@
OSCSS_JSCORE.products.utlis = {
// déclaration de nos variables statiques
+ // déclaration de nos variables statiques
+ settings : {
+ },
// déclaration de nos méthodes
// Check
Init:function( ) {
+ var taxRate = self.getTaxRate();
+
$("input#products_price, select#products_tax_class_id").change(function(){
self.updateGross( $(this) );
});
@@ -38,32 +43,44 @@
},
- // Check
+ // Public methode
updateGross:function( ) {
+ var grossValue = self.CalculGross( $("input#products_price").val() );
- var grossValue = $("input#products_price").val();
- var taxRate = self.getTaxRate();
-
- if (taxRate > 0) { grossValue = grossValue * ((taxRate / 100) + 1); }
-
$("input#products_price_gross").val( self.doRound(grossValue, 6) );
$("input#products_price_final").val( self.doRound(grossValue, 6) );
},
updateNet:function( $current ) {
var netValue = $current.val();
- var taxRate = self.getTaxRate();
$("input#products_price_final").val( self.doRound(netValue, 6) );
+ $("input#products_price").val( self.doRound( self.CalculNet( netValue ) , 6) );
+ },
- if (taxRate > 0) { netValue = netValue / ((taxRate / 100) + 1); }
- $("input#products_price").val( self.doRound(netValue, 6) );
+ // Internal Methode ( private )
+ CalculGross:function( value ) {
+ var taxRate = self.getTaxRate();
+
+ if (taxRate > 0) {
+ value = value * ((taxRate / 100) + 1);
+ }
+
+ return value;
},
+ CalculNet:function( value ) {
+ var taxRate = self.getTaxRate();
+
+ if (taxRate > 0) {
+ value = value / ((taxRate / 100) + 1);
+ }
+
+ return value;
+ },
doRound:function( x, places) {
return Math.round(x * Math.pow(10, places)) / Math.pow(10, places);
},
-
getTaxRate:function( ) {
var tax_rates = new Array();
<?php
@@ -94,9 +111,9 @@
//--></script>
-<?php oscss_cstr::CallBack('OSCSS_JSCORE.products.utlis.Init();'); // Active check key ?>
+
<script type="text/javascript"><!--
@@ -188,7 +205,7 @@
// --></script>
- <?php if (products::$action == 'edit'): ?>
+<?php if (products::$action == 'edit'): ?>
<script type="text/javascript"><!--
$(function() {
@@ -205,9 +222,11 @@
$('#bt_products_date_available').datepicker({altField: '#products_date_available'});
- OSCSS_JSCORE.products.utlis.updateGross();
+<?php oscss_cstr::CallBack('OSCSS_JSCORE.products.utlis.Init();'); // Active check key ?>
+ // force adjust display price
+// OSCSS_JSCORE.products.utlis.updateGross();
});
//--></script>
- <?php endif; ?>
+<?php endif; ?>
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/products.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/products.php 2012-08-10 23:56:07 UTC (rev 4576)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/products.php 2012-08-11 13:34:09 UTC (rev 4577)
@@ -762,7 +762,7 @@
if (isset(self::$Id)) $products_id = tep_db_prepare_input(self::$Id);
$products_date_available = (isset($_POST['products_date_available'])) ? tep_db_prepare_input($_POST['products_date_available']) : '';
- $products_date_available = (date('Y-m-d') < tep_date_raw($products_date_available)) ? tep_date_raw($products_date_available) : 'null';
+ $products_date_available = (date('Y-m-d') < tep_date_raw($products_date_available)) ? tep_date_raw($products_date_available) : '1000-01-01 00:00:00';
$params['sqlarray'] = array('products_quantity' => (isset($_POST['products_quantity']) ? tep_db_prepare_input($_POST['products_quantity']) : 0),
'products_model' => (isset($_POST['products_model'])? tep_db_prepare_input($_POST['products_model']) : ''),
Modified: branches/2.1.1/catalog/admin/includes/template/defaut/css/less/forms.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/defaut/css/less/forms.less 2012-08-10 23:56:07 UTC (rev 4576)
+++ branches/2.1.1/catalog/admin/includes/template/defaut/css/less/forms.less 2012-08-11 13:34:09 UTC (rev 4577)
@@ -23,7 +23,6 @@
-
// master central display
form{
padding:0;
@@ -128,8 +127,37 @@
}
select,
- input[type="text"] { min-width:62%; display:inline-block;}
+ input[type="text"] {
+ min-width:62%;
+ display:inline-block;
+
+ &.w_5 {
+ min-width:5%;
+ width:5%;
+ }
+ &.w_10 {
+ min-width:10%;
+ width:10%;
+ }
+ &.w_20 {
+ min-width:20%;
+ width:20%;
+ }
+ &.w_30 {
+ min-width:30%;
+ width:30%;
+ }
+ }
+ input.price,
+ input[type=text].price,
+ input[type=hidden].price{
+ width :120px;
+ min-width :120px;
+ text-align : right;
+ }
+
+
select option {display:block; float:none;clear:both;width:100%}
label { line-height: 18px; margin-right: 10px; display:inline-block; text-align: right; padding: 0 0 2px 0;}
Modified: branches/2.1.1/catalog/admin/includes/template/oscss/definition.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/oscss/definition.less 2012-08-10 23:56:07 UTC (rev 4576)
+++ branches/2.1.1/catalog/admin/includes/template/oscss/definition.less 2012-08-11 13:34:09 UTC (rev 4577)
@@ -171,6 +171,7 @@
+
// POPUP
@color_title_txt : @color_011;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-10 23:56:16
|
Revision: 4576
http://oscss.svn.sourceforge.net/oscss/?rev=4576&view=rev
Author: oscim
Date: 2012-08-10 23:56:07 +0000 (Fri, 10 Aug 2012)
Log Message:
-----------
suite nettoyage du code
suite nettoyage section js des page products, et mise en oeuvre d'un code non intrusif
ajout control sur la clef dans cms_content
report du comportement de la class messageStack avec la variable forceajax, flag sur add/add_session
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/classes/osCSS_messageStack.php
branches/2.1.1/catalog/admin/includes/exts/package/packageRepository.php
branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
branches/2.1.1/catalog/admin/includes/modules/pages/cms_content.php
branches/2.1.1/catalog/admin/includes/modules/pages/package.php
branches/2.1.1/catalog/admin/includes/template/defaut/stylesheet-1.css
branches/2.1.1/catalog/admin/includes/template/oscss/stylesheet-1.css
Added Paths:
-----------
branches/2.1.1/catalog/admin/includes/javascript/modules/pages/cms_content.js.php
branches/2.1.1/catalog/admin/includes/javascript/modules/pages/package.js.php
Modified: branches/2.1.1/catalog/admin/includes/classes/osCSS_messageStack.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/classes/osCSS_messageStack.php 2012-08-10 22:15:07 UTC (rev 4575)
+++ branches/2.1.1/catalog/admin/includes/classes/osCSS_messageStack.php 2012-08-10 23:56:07 UTC (rev 4576)
@@ -44,7 +44,17 @@
return self::getInstance();
}
+ /* Alias */
+ public function add_session($message, $type = 'error') {
+ $this->add($message, $type);
+ }
public function add($message, $type = 'error') {
+ $messageStackFunction = (isset($_GET['forceajax']) ? '_add' : '_add_session' );
+ $this->$messageStackFunction($message, $type);
+ }
+
+
+ private function _add($message, $type = 'error') {
static $nobl;
if(!is_array($nobl)) $nobl = array();
@@ -64,7 +74,7 @@
}
}
- public function add_session($message, $type = 'error') {
+ private function _add_session($message, $type = 'error') {
global $messageToStack;
if (!tep_session_is_registered('messageToStack')) {
Modified: branches/2.1.1/catalog/admin/includes/exts/package/packageRepository.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/exts/package/packageRepository.php 2012-08-10 22:15:07 UTC (rev 4575)
+++ branches/2.1.1/catalog/admin/includes/exts/package/packageRepository.php 2012-08-10 23:56:07 UTC (rev 4576)
@@ -92,9 +92,7 @@
}
catch(Exception $e){
-
- $messageStackFunction = (isset($_GET['forceajax']) ? 'add' : 'add_session' );
- $messageStack->$messageStackFunction($e->getMessage(),'error' );
+ $messageStack->add_session($e->getMessage(),'error' );
return false;
}
@@ -143,8 +141,7 @@
return false;
}
catch(Exception $e){
- $messageStackFunction = (isset($_GET['forceajax']) ? 'add' : 'add_session' );
- $messageStack->$messageStackFunction($e->getMessage(),'error' );
+ $messageStack->add_session($e->getMessage(),'error' );
return false;
}
}
@@ -201,8 +198,7 @@
}
catch(Exception $e){
- $messageStackFunction = (isset($_GET['forceajax']) ? 'add' : 'add_session' );
- $messageStack->$messageStackFunction($e->getMessage(),'error' );
+ $messageStack->add_session($e->getMessage(),'error' );
return false;
}
@@ -233,8 +229,7 @@
}
}
catch(Exception $e){
- $messageStackFunction = (isset($_GET['forceajax']) ? 'add' : 'add_session' );
- $messageStack->$messageStackFunction($e->getMessage(),'error' );
+ $messageStack->add_session($e->getMessage(),'error' );
}
}
@@ -251,26 +246,25 @@
public static function InitConnexion($repo, $action = ''){
global $messageStack;
- $messageStackFunction = (isset($_GET['forceajax']) ? 'add' : 'add_session' );
if(!$re= fileUtility::url_fopen( self::HrefSrc($repo, $action ) ) ){
- $messageStack->$messageStackFunction('recuperation repository impossible :'.$repo->repository,'error' );
+ $messageStack->add_session('recuperation repository impossible :'.$repo->repository,'error' );
return false;
}
else {
if(!$Repos = simplexml_load_string($re)){
- $messageStack->$messageStackFunction(sprintf(__('package packageRepository contenu illisible pour %s') , $repo->title) ,'error' );
+ $messageStack->add_session(sprintf(__('package packageRepository contenu illisible pour %s') , $repo->title) ,'error' );
return false;
}
if(isset($Repos->error)){
- $messageStack->$messageStackFunction(sprintf(__('package packageRepository error in process for repository %s :>> %s') , $repo->repository , self::FomatError($Repos->error ) ),'error' );
+ $messageStack->add_session(sprintf(__('package packageRepository error in process for repository %s :>> %s') , $repo->repository , self::FomatError($Repos->error ) ),'error' );
return false;
}
if(isset($Repos->warning)){
- $messageStack->$messageStackFunction(sprintf(__('package packageRepository warning for repository %s :>> %s') , $repo->repository , self::FomatError($Repos->warning ) ),'warning' );
+ $messageStack->add_session(sprintf(__('package packageRepository warning for repository %s :>> %s') , $repo->repository , self::FomatError($Repos->warning ) ),'warning' );
}
return $Repos;
Modified: branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-08-10 22:15:07 UTC (rev 4575)
+++ branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-08-10 23:56:07 UTC (rev 4576)
@@ -92,15 +92,15 @@
<li style="clear:both"></li>
<li class="block_input">
<label class="inline" for="products_tax_class_id"><?php echo __('text products tax class'); ?></label>
- <?php echo tep_draw_pull_down_menu('products_tax_class_id', products::$tax_class_array, products::$Info->products_tax_class_id, 'onchange="updateGross()"').'<span class="required">*</span>'; ?><br />
+ <?php echo tep_draw_pull_down_menu('products_tax_class_id', products::$tax_class_array, products::$Info->products_tax_class_id, '').'<span class="required">*</span>'; ?><br />
</li>
<li class="block_input">
<label class="inline" for="products_price"><?php echo __('text products price net'); ?></label>
- <?php echo tep_draw_input_field('products_price','', products::$Info->products_price, 'onkeyup="updateGross()"').'<span class="required">*</span>'; ?>
+ <?php echo tep_draw_input_field('products_price','', products::$Info->products_price, '').'<span class="required">*</span>'; ?>
</li>
<li class="block_input">
<label class="inline" for="products_price_gross"><?php echo __('text products price gross'); ?></label>
- <?php echo tep_draw_input_field('products_price_gross','', products::$Info->products_price, 'onkeyup="updateNet()"'); ?>
+ <?php echo tep_draw_input_field('products_price_gross','', products::$Info->products_price, ''); ?>
</li>
Added: branches/2.1.1/catalog/admin/includes/javascript/modules/pages/cms_content.js.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/modules/pages/cms_content.js.php (rev 0)
+++ branches/2.1.1/catalog/admin/includes/javascript/modules/pages/cms_content.js.php 2012-08-10 23:56:07 UTC (rev 4576)
@@ -0,0 +1,61 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @cms_content osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 28/12/11, 17:30
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+?>
+<?php if ( in_array(cms_content::$action, array('edit')) ): ?>
+ <script type="text/javascript"><!--
+
+(function(){ // début de scope local
+OSCSS_JSCORE.cms_content = OSCSS_JSCORE.cms_content || {};
+// déclaration de la classe de validation proprement dite
+OSCSS_JSCORE.cms_content.validation = {
+ // déclaration de nos variables statiques
+
+
+ // déclaration de nos méthodes
+ // Check
+ isValid:function( ) {
+
+ $("input#content_name").change(function(){
+ self.isValidKey( $(this) );
+ });
+ },
+
+
+ // Check
+ isValidKey:function( $current ) {
+ var stringKey = $current.val();
+
+ if(stringKey.length <= 3 )
+ return false;
+
+ $.get("<?php echo tep_get_http().DIR_WS_ADMIN .cms_content::FILENAME ?>",
+ { 'action': "isValidKey", 'cID' : <?php echo cms_content::$Id; ?>, 'forceajax' : true , 'stringkey': stringKey },
+ function(data) {
+ $current.replaceWith(data);
+ });
+ return true;
+ },
+
+
+};
+
+// trick JavaScript pour émuler le self:: en PHP : on utilise une variable locale
+var self = OSCSS_JSCORE.cms_content.validation;
+})(); // fin de scope locale
+
+ //--></script>
+
+
+<?php oscss_cstr::CallBack('OSCSS_JSCORE.cms_content.validation.isValid();'); // Active check key ?>
+
+
+<?php endif; ?>
\ No newline at end of file
Added: branches/2.1.1/catalog/admin/includes/javascript/modules/pages/package.js.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/modules/pages/package.js.php (rev 0)
+++ branches/2.1.1/catalog/admin/includes/javascript/modules/pages/package.js.php 2012-08-10 23:56:07 UTC (rev 4576)
@@ -0,0 +1,123 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @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 28/12/11, 17:30
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+?>
+<?php if ( in_array(package::$action, array('source_add')) ): ?>
+ <script type="text/javascript"><!--
+
+(function(){ // début de scope local
+OSCSS_JSCORE.package = OSCSS_JSCORE.package || {};
+// déclaration de la classe de validation proprement dite
+OSCSS_JSCORE.package.validation = {
+ // déclaration de nos variables statiques
+
+
+ // déclaration de nos méthodes
+ // Check
+ isValid:function( ) {
+
+ $("input#key").change(function(){
+ self.isValidKey( $(this) );
+ });
+ $("input#repository").change(function(){
+ self.isValidUrl( $(this) );
+ });
+
+ $("form#masterforms").submit(function(){
+ return self.isValidConnected(
+ $("input#key"),
+ $("input#repository") ,
+ $("input[type='text']#useradd"),
+ $("input[type='text']#token")
+ );
+ });
+ },
+
+
+ // Check
+ isValidKey:function( $current ) {
+ var stringKey = $current.val();
+
+ if(stringKey.length <= 1 )
+ return false;
+
+ $.get("<?php echo tep_get_http().DIR_WS_ADMIN .package::FILENAME ?>",
+ { 'action': "isValidKey", 'type_data' : "source", 'forceajax' : true , 'stringkey': stringKey },
+ function(data) {
+ $current.replaceWith(data);
+ });
+ return true;
+ },
+
+ isValidUrl:function( $current ) {
+ var stringurl = $current.val();
+
+ if(stringurl.length <= 10 )
+ return false;
+
+ $.get("<?php echo tep_get_http().DIR_WS_ADMIN .package::FILENAME ?>",
+ { 'action': "isValidUrl", 'type_data' : "source", 'forceajax' : true , 'stringurl': stringurl },
+ function(data) {
+ $current.replaceWith(data);
+ });
+ return true;
+ },
+
+ isValidConnected:function( $key, $repository, $user, $token ) {
+
+ var error = false;
+
+ var stringKey = $key.val();
+ if( stringKey.length <= 1 ){
+ $key.addClass('inline error');
+ error = true;
+ }
+
+ var stringurl = $repository.val();
+ if(stringurl.length <= 10 ){
+ $repository.addClass('inline error');
+ error = true;
+ }
+
+ var stringuser = $user.val();
+ var stringtoken = $token.val();
+ if( stringuser.length >=1 && stringtoken.length >= 20 ){
+
+ $.get("<?php echo tep_get_http().DIR_WS_ADMIN .package::FILENAME ?>",
+ { 'action': "isValidConnected", 'type_data' : "source", 'forceajax' : true , 'stringurl': stringurl , 'stringuser': stringuser , 'stringtoken': stringtoken },
+ function(data) {
+ $current.replaceWith(data);
+ });
+ return true;
+
+ }
+ else if( stringuser.length ==0 && stringtoken.length ==0 )
+ return true;
+
+ if(error == true )
+ return false;
+
+
+ return false;
+ },
+};
+
+// trick JavaScript pour émuler le self:: en PHP : on utilise une variable locale
+var self = OSCSS_JSCORE.package.validation;
+})(); // fin de scope locale
+
+ //--></script>
+
+
+<?php oscss_cstr::CallBack('OSCSS_JSCORE.package.validation.isValid();'); // Active check key ?>
+
+
+<?php endif; ?>
\ No newline at end of file
Modified: branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php 2012-08-10 22:15:07 UTC (rev 4575)
+++ branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php 2012-08-10 23:56:07 UTC (rev 4576)
@@ -12,9 +12,95 @@
/// put js listing post_load
oscss_cstr::CallBack('screenshotPreview();');
?>
+
+
<script type="text/javascript"><!--
+(function(){ // début de scope local
+OSCSS_JSCORE.products = OSCSS_JSCORE.products || {};
+// déclaration de la classe de validation proprement dite
+OSCSS_JSCORE.products.utlis = {
+ // déclaration de nos variables statiques
+
+
+ // déclaration de nos méthodes
+ // Check
+ Init:function( ) {
+
+ $("input#products_price, select#products_tax_class_id").change(function(){
+ self.updateGross( $(this) );
+ });
+
+ $("input#products_price_gross").change(function(){
+ self.updateNet( $(this) );
+ });
+ },
+
+
+ // Check
+ updateGross:function( ) {
+
+ var grossValue = $("input#products_price").val();
+ var taxRate = self.getTaxRate();
+
+ if (taxRate > 0) { grossValue = grossValue * ((taxRate / 100) + 1); }
+
+ $("input#products_price_gross").val( self.doRound(grossValue, 6) );
+ $("input#products_price_final").val( self.doRound(grossValue, 6) );
+ },
+
+ updateNet:function( $current ) {
+ var netValue = $current.val();
+ var taxRate = self.getTaxRate();
+
+ $("input#products_price_final").val( self.doRound(netValue, 6) );
+
+ if (taxRate > 0) { netValue = netValue / ((taxRate / 100) + 1); }
+
+ $("input#products_price").val( self.doRound(netValue, 6) );
+ },
+ doRound:function( x, places) {
+ return Math.round(x * Math.pow(10, places)) / Math.pow(10, places);
+ },
+
+ getTaxRate:function( ) {
+ var tax_rates = new Array();
+ <?php
+ for ($i=0, $n=sizeof(products::$tax_class_array); $i<$n; $i++) {
+ if (products::$tax_class_array[$i]['id'] > 0) echo 'tax_rates["' . products::$tax_class_array[$i]['id'] . '"] = ' . tep_get_tax_rate_value(products::$tax_class_array[$i]['id']) . ';' . "\n";
+ }
+ ?>
+
+ var selected_value = document.forms["new_product"].products_tax_class_id.selectedIndex;
+ var parameterVal = document.forms["new_product"].products_tax_class_id[selected_value].value;
+
+ if ( (parameterVal > 0) && (tax_rates[parameterVal] > 0) ) {
+ return tax_rates[parameterVal];
+ }
+ else {
+ return 0;
+ }
+
+ },
+
+};
+
+// trick JavaScript pour émuler le self:: en PHP : on utilise une variable locale
+var self = OSCSS_JSCORE.products.utlis;
+
+})(); // fin de scope locale
+
+//--></script>
+
+
+<?php oscss_cstr::CallBack('OSCSS_JSCORE.products.utlis.Init();'); // Active check key ?>
+
+
+<script type="text/javascript"><!--
+
+
+
/* Appel des pages, et execution de commande*/
function get_ajax(id,vars,lib){
var ter = document.getElementById(id);
@@ -32,38 +118,38 @@
// function Toolip(){
- /// ScreenShot product in hover link products
- this.screenshotPreview = function(){
- /* CONFIG */
+ /// ScreenShot product in hover link products
+ this.screenshotPreview = function(){
+ /* CONFIG */
- xOffset = 10;
- yOffset = 30;
+ xOffset = 10;
+ yOffset = 30;
- // these 2 variable determine popup's distance from the cursor
- // you might want to adjust to get the right result
+ // these 2 variable determine popup's distance from the cursor
+ // you might want to adjust to get the right result
- /* END CONFIG */
- $("a.screenshot").hover(function(e){
- this.t = this.title;
- this.title = "";
- var c = (this.t != "") ? "<br/>" + this.t : "";
- $("body").append("<p id='screenshot'><img src='"+ this.rel +"' alt='url preview' />"+ c +"</p>");
- $("#screenshot")
- .css("top",(e.pageY - xOffset) + "px")
- .css("left",(e.pageX + yOffset) + "px")
- .fadeIn("fast");
- },
- function(){
- this.title = this.t;
- $("#screenshot").remove();
- });
- $("a.screenshot").mousemove(function(e){
- $("#screenshot")
- .css("top",(e.pageY - xOffset) + "px")
- .css("left",(e.pageX + yOffset) + "px");
- });
+ /* END CONFIG */
+ $("a.screenshot").hover(function(e){
+ this.t = this.title;
+ this.title = "";
+ var c = (this.t != "") ? "<br/>" + this.t : "";
+ $("body").append("<p id='screenshot'><img src='"+ this.rel +"' alt='url preview' />"+ c +"</p>");
+ $("#screenshot")
+ .css("top",(e.pageY - xOffset) + "px")
+ .css("left",(e.pageX + yOffset) + "px")
+ .fadeIn("fast");
+ },
+ function(){
+ this.title = this.t;
+ $("#screenshot").remove();
+ });
+ $("a.screenshot").mousemove(function(e){
+ $("#screenshot")
+ .css("top",(e.pageY - xOffset) + "px")
+ .css("left",(e.pageX + yOffset) + "px");
+ });
- };
+ };
// }
@@ -102,140 +188,26 @@
// --></script>
- <?php if (products::$action == 'edit'): ?>
- <script type="text/javascript"><!--
- function disabled_input(inputs){ $(inputs).attr('disabled', 'disabled'); }
+ <?php if (products::$action == 'edit'): ?>
+ <script type="text/javascript"><!--
- function activ_input(inputs){ $(inputs).removeAttr('disabled'); }
+ $(function() {
+ $.datepicker.setDefaults($.extend({
+ duration: '',
+ changeMonth: true,
+ changeYear: true,
+ showOn: 'button',
+ buttonImage: '<?php echo DIR_WS_ICONS . 'calendar.gif';?>',
+ buttonImageOnly: true
+ }
+ <?php if (($lng=language::LangueSelected())&& $lng != 'en') echo ",\n"."$.datepicker.regional['".$lng."']"."\n"; ?>
+ ));
+ $('#bt_products_date_available').datepicker({altField: '#products_date_available'});
- $(function() {
- $.datepicker.setDefaults($.extend({
- duration: '',
- changeMonth: true,
- changeYear: true,
- showOn: 'button',
- buttonImage: '<?php echo DIR_WS_ICONS . 'calendar.gif';?>',
- buttonImageOnly: true
- }
- <?php if (($lng=language::LangueSelected())&& $lng != 'en') echo ",\n"."$.datepicker.regional['".$lng."']"."\n"; ?>
- ));
- $('#bt_products_date_available').datepicker({altField: '#products_date_available'});
- });
+ OSCSS_JSCORE.products.utlis.updateGross();
+ });
- var tax_rates = new Array();
- <?php
- for ($i=0, $n=sizeof(products::$tax_class_array); $i<$n; $i++) {
- if (products::$tax_class_array[$i]['id'] > 0) echo 'tax_rates["' . products::$tax_class_array[$i]['id'] . '"] = ' . tep_get_tax_rate_value(products::$tax_class_array[$i]['id']) . ';' . "\n";
- }
- ?>
- function doRound(x, places) { return Math.round(x * Math.pow(10, places)) / Math.pow(10, places); }
+ //--></script>
- function getTaxRate() {
- var selected_value = document.forms["new_product"].products_tax_class_id.selectedIndex;
- var parameterVal = document.forms["new_product"].products_tax_class_id[selected_value].value;
-
- if ( (parameterVal > 0) && (tax_rates[parameterVal] > 0) ) { return tax_rates[parameterVal]; }
- else { return 0; }
- }
-
- function updateGross() {
- var taxRate = getTaxRate();
- var grossValue = document.forms["new_product"].products_price.value;
-
- if (taxRate > 0) { grossValue = grossValue * ((taxRate / 100) + 1); }
-
- document.forms["new_product"].products_price_gross.value = doRound(grossValue, 6);
- document.forms["new_product"].products_price_final.value = doRound(grossValue, 6);
- }
-
- function updateNet() {
- var taxRate = getTaxRate();
-
- var netValue = document.forms["new_product"].products_price_gross.value;
- document.forms["new_product"].products_price_final.value = doRound(netValue, 6);
-
- if (taxRate > 0) { netValue = netValue / ((taxRate / 100) + 1); }
-
- document.forms["new_product"].products_price.value = doRound(netValue, 6);
- }
-
-
-
-// $(function(){
-
- // on cache les bouton enregsitrer si aucune modification effectué
-// $('.button.ActionYes').hide();
-//
-// // view form if input chnage
-// $('#new_product *').change(function(){
-// $('.button.ActionYes').show();
-// });
-// });
-
- //--></script>
- <?php
-// tep_include_file (DIR_WS_TEMPLATE."jquery.validate.css",true);
-// tep_include_file (DIR_WS_JS . "jquery.validate.min.js",true);
- ?>
- <script type="text/javascript">
-// $(function(){
- // validate signup form on keyup and submit
-// $("#new_product").validate({
-// rules: {
-// <?php for ($i=0, $n=sizeof(products::$languages); $i<$n; $i++): ?>
-// "products_name[<?php echo products::$languages[$i]['id']; ?>]": {
-// required: true,
-// minlength: 3
-// },
-// <?php endfor; ?>
-//
-// <?php if(products::CheckClassProduct('CLASS_PRICE')): /** Si Class de prix defini, les prix sont pris en charge par un onglet */ ?>
-// products_price: {
-// required: true,
-// minlength: 1
-// },
-// <?php endif; ?>
-// },
-// messages: {
-// <?php for ($i=0, $n=sizeof(products::$languages); $i<$n; $i++): ?>
-// "products_name[<?php echo products::$languages[$i]['id']; ?>]": {
-// required: " <?php echo addslashes(__('js alert products name')) ?>",
-// minlength: " <?php echo addslashes(__('your products name must consist of at least 3 characters')) ?>"
-// },
-// <?php endfor; ?>
-//
-// <?php if(products::CheckClassProduct('CLASS_PRICE')): /** Si Class de prix defini, les prix sont pris en charge par un onglet */ ?>
-// products_price: {
-// required: " <?php echo addslashes(__('js alert price')) ?>",
-// minlength: " <?php echo addslashes(__('your price must consist of at least 1 characters')) ?>"
-// },
-// <?php endif; ?>
-// },
-// errorElement: "span",
-// errorPlacement: function(error, element) {
-// error.appendTo( element.parent());
-// },
-// onkeyup: true
-// });
-// });
-
- //--></script>
-
- <?php endif; ?>
-
-
-
- <style type="text/css">
- /* */
-
- #screenshot{
- position:absolute;
- border:1px solid #ccc;
- background:#333;
- padding:5px;
- display:none;
- color:#fff;
- }
-
- </style>
\ No newline at end of file
+ <?php endif; ?>
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt 2012-08-10 22:15:07 UTC (rev 4575)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/cms_content.txt 2012-08-10 23:56:07 UTC (rev 4576)
@@ -40,14 +40,18 @@
/* Edit */
- /* Heading */
+ /* */
$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 key is valid']="Cette clef est disponible " ;
+ $lang['@cms_content key is already used']="Cette clef est déjà utilisé " ;
/* other */
-$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['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 :" ;
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2012-08-10 22:15:07 UTC (rev 4575)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2012-08-10 23:56:07 UTC (rev 4576)
@@ -22,11 +22,11 @@
$lang['image package not install']="Paquets non installés" ;
- $lang['@package image source catalog']="Liste des sources" ;
+ $lang['image source catalog']="Liste des sources" ;
/*listing*/
- $lang['heading title source repository']="Catalogue d'extension" ;
+ $lang['@package heading title source repository']="Catalogue d'extension" ;
$lang['table heading nom']="Nom" ;
$lang['table heading description']="Description" ;
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/cms_content.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/cms_content.php 2012-08-10 22:15:07 UTC (rev 4575)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/cms_content.php 2012-08-10 23:56:07 UTC (rev 4576)
@@ -508,9 +508,34 @@
if(!isset($_GET['forceajax']))
tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array( 'cID','flag','action'),false)) );
break;
+ /**
+ @remarks Test key , by ajax
+ */
+ case 'isValidKey':
+ $key = tep_db_prepare_input($_REQUEST['stringkey']);
+ $messageStackFunction = (isset($_GET['forceajax']) ? 'add' : 'add_session' );
+ $r = $DB->query($sql="SELECT * FROM " . TABLE_CONTENT . " WHERE content_id <> '" . (int)$_GET['cID'] . "' AND content_name = '".$key."' ");
+ if( $r->__get('numRows') ==0 ){
+ self::$list['isValidKey'] = true;
+ $messageStack->$messageStackFunction(__('@cms_content key is valid'), 'success');
+
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(self::FILENAME, '&action=source_edit&key='.$key));
+
+ }
+ else{
+ self::$list['isValidKey'] = false;
+ $messageStack->$messageStackFunction(__('@cms_content key is already used'), 'error');
+
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(self::FILENAME));
+ }
+ break;
+
+
/**
@remarks specific multi action
*/
@@ -610,7 +635,10 @@
/**
*/
public function get_header(){
- self::$modules->get_header_js(self::$action);
+
+ tep_include_file(DIR_WS_JS . "modules/pages/".__CLASS__.".js.php",true);
+
+ self::$modules->get_header_js(self::$action);
}
@@ -637,6 +665,7 @@
case 'viewflag':
break;
+
/**
@remarks Normal View Page
*/
@@ -758,7 +787,20 @@
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
*/
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/package.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/package.php 2012-08-10 22:15:07 UTC (rev 4575)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/package.php 2012-08-10 23:56:07 UTC (rev 4576)
@@ -283,17 +283,13 @@
*/
case 'source_insert':
$opt = array();
-// print_r($_REQUEST);
-// exit;
+
$opt['key'] = tep_db_prepare_input($_REQUEST['key']);
$opt['title'] = tep_db_prepare_input($_REQUEST['title']);
$opt['repository'] = tep_db_prepare_input($_REQUEST['repository']);
$opt['user'] = tep_db_prepare_input($_REQUEST['user']);
$opt['token'] = tep_db_prepare_input($_REQUEST['token']);
-var_dump(self::$objChild->SourceAdd($key, $opt) );
-exit;
-
if( self::$objChild->SourceAdd($key, $opt) == true){
$messageStack->add_session(__('@package update source process success'), 'success');
Modified: branches/2.1.1/catalog/admin/includes/template/defaut/stylesheet-1.css
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/defaut/stylesheet-1.css 2012-08-10 22:15:07 UTC (rev 4575)
+++ branches/2.1.1/catalog/admin/includes/template/defaut/stylesheet-1.css 2012-08-10 23:56:07 UTC (rev 4576)
@@ -8,6 +8,14 @@
@encode UTF-8
*/
+#screenshot{
+ position:absolute;
+ border:1px solid #ccc;
+ background:#333;
+ padding:5px;
+ display:none;
+ color:#fff;
+}
/* logo link partenaires */
#bas .oscommerce { background: transparent url(img/1/oscss.png) 0px 2px no-repeat; text-decoration:none; }
Modified: branches/2.1.1/catalog/admin/includes/template/oscss/stylesheet-1.css
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/oscss/stylesheet-1.css 2012-08-10 22:15:07 UTC (rev 4575)
+++ branches/2.1.1/catalog/admin/includes/template/oscss/stylesheet-1.css 2012-08-10 23:56:07 UTC (rev 4576)
@@ -13,6 +13,14 @@
#bas .oscss { background: transparent url(img/1/oscss.png) 0px 2px no-repeat; text-decoration:none; }
#bas .oscim { background: transparent url(img/1/ico_oscim_20.png) 0px 2px no-repeat; text-decoration:none; }
+#screenshot{
+ position:absolute;
+ border:1px solid #ccc;
+ background:#333;
+ padding:5px;
+ display:none;
+ color:#fff;
+}
/* Structure */
div.menuSeparator { padding:2px 10px; display:block; background:#888; border-bottom:1px solid #ccc; font-size:12px; color:#FFF; line-height:14px; clear:both; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-10 22:15:17
|
Revision: 4575
http://oscss.svn.sourceforge.net/oscss/?rev=4575&view=rev
Author: oscim
Date: 2012-08-10 22:15:07 +0000 (Fri, 10 Aug 2012)
Log Message:
-----------
Suite amelioration integration js et control de formulaire dans les page d'editions
amelioration du code js , renomage plus coherant
suite ajutement des page d'adjout d'un nouveau depot
correction fr
correction css et ajout d'une class de retour d'erreur inline via js
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/application_bottom.php
branches/2.1.1/catalog/admin/includes/exts/package/packageRepository.php
branches/2.1.1/catalog/admin/includes/gabarit/package/display_view.source.edit.gab
branches/2.1.1/catalog/admin/includes/gabarit/package/display_view.source.listing.gab
branches/2.1.1/catalog/admin/includes/javascript/oscss.js
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
branches/2.1.1/catalog/admin/includes/modules/pages/package.php
branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less
Modified: branches/2.1.1/catalog/admin/includes/application_bottom.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/application_bottom.php 2012-08-10 13:04:09 UTC (rev 4574)
+++ branches/2.1.1/catalog/admin/includes/application_bottom.php 2012-08-10 22:15:07 UTC (rev 4575)
@@ -54,7 +54,6 @@
osC_ErrorHandler::stop();
}
-
?>
<?php
@@ -63,43 +62,25 @@
*/
?>
<script type="text/javascript">
- $(function() {
-
<?php
if ($messageStack->size > 0) :
// Get errors
$arr = $messageStack->get_errors() ;
- // adjust duration
- $duration=array(
- 'messageStackSuccess'=>1,
- 'messageStackError'=>5,
- 'messageStackWarning'=>3.5,
- 'messageStackInfo'=>2
- );
-
foreach($arr as $k=>$row): ?>
// Add message line
- OSCSS_JSNOTIF.utils.notif.AddNotif({
+ OSCSS_JSCORE.utils.notif.AddNotif({
indice:"<?php echo time() ?>",
style:"<?php echo $row['class'] ?>",
message:"<?php echo addslashes($row['text']) ?>",
- // position:"top",
- duration:1500 * <?php echo $duration[$row['class']]; ?>
});
<?php
endforeach; ?>
-
- /// Active Display message
- OSCSS_JSNOTIF.utils.notif.ViewNotif();
-
<?php
$messageStack->reset() ;
endif; ?>
-
- });
</script>
@@ -110,24 +91,28 @@
?>
<script type="text/javascript"><!--
+<?php if(!isset($_REQUEST['forceajax'])): ?>
/** Init page event js */
function post_load_page(){
+ /// Active Display message
+ OSCSS_JSCORE.utils.notif.ViewNotif();
+
// force reload link and adjust for open in dialog box
- OSCSS_JSNOTIF.utils.AdjustLink.OpenInDialog();
+ OSCSS_JSCORE.utils.AdjustLink.OpenInDialog();
// add flag in href link for fix process and display for ajax
- OSCSS_JSNOTIF.utils.AdjustLink.HrefFlag();
+ OSCSS_JSCORE.utils.AdjustLink.HrefFlag();
// force link process and refresh this current html balise
- OSCSS_JSNOTIF.utils.AdjustLink.ajaxinline();
+ OSCSS_JSCORE.utils.AdjustLink.ajaxinline();
// active tabs in edit forms and display page.
- OSCSS_JSNOTIF.utils.AdjustLink.BaseIntabs();
+ OSCSS_JSCORE.utils.AdjustLink.BaseIntabs();
// add checkbox for select all childs checkboxs in current rows
- OSCSS_JSNOTIF.utils.AdjustLink.select_all();
+ OSCSS_JSCORE.utils.AdjustLink.select_all();
// simple_tooltip("input","tooltip");
@@ -135,7 +120,7 @@
<?php echo oscss_cstr::CallBackExec(); ?>
}
-
+<?php endif; ?>
// --></script>
Modified: branches/2.1.1/catalog/admin/includes/exts/package/packageRepository.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/exts/package/packageRepository.php 2012-08-10 13:04:09 UTC (rev 4574)
+++ branches/2.1.1/catalog/admin/includes/exts/package/packageRepository.php 2012-08-10 22:15:07 UTC (rev 4575)
@@ -17,15 +17,91 @@
extends package {
public function __construct(){
+
}
+
/**
+ @brief Modele d'un depot
+ @param $array all detail for inser in modele
+ @param [$active_service boolean ]
+ */
+ private static function Modele($array, $active_service=false){
+ $re='<channel>
+<title>'.(string)@$array['title'].'</title>
+<key>'.(string)@$array['key'].'</key>'.
+ '<description>'.(string)@$array['description'].'</description>'.
+ '<repository>'.(string)@$array['repository'].'</repository>'.
+ '<ident>'.
+ ' <user>'.(int)@$array['user'].'</user>'.
+ ' <token>'.(string)@$array['token'].'</token>'.
+ '</ident>'.
+ '<service>';
+
+ if($active_service){
+ $re .='<listing>listing_package</listing>'.
+ '<view>detail_package</view>'.
+ '<download>download_package</download>';
+ }
+
+ $re .='</service>'.
+ '</channel>'."\n";
+
+ return $re;
+ }
+
+ /**
@brief Ajout d'un depot
*/
- public static function SourceAdd(){
- }
+ public static function SourceAdd($key, $option){
+ global $messageStack;
+ try{
+
+
+ // Create a new DOMDocument object
+ $doc = new DOMDocument('1.0');
+
+ $doc->load(DIR_FS_ROOT_DOCS.'admin/data/'.self::REPOSITORY_SOURCE);
+
+ // add spaces, new lines and make the XML more readable format
+ $doc->formatOutput = true;
+
+
+ $re = self::Modele($option, true);
+ $sxe=simplexml_load_string($re);
+
+
+// $domnode->preserveWhiteSpace = false;
+
+ // Import node into current document
+ $dom_sxe=$doc->importNode($sxe, true);
+ // Add new child at the end of the children
+ $doc->appendChild($dom_sxe);
+
+
+ // Dump the internal XML tree back into a string
+ $saveXml = $doc->saveXML();
+
+
+ $file_vers= @fopen(DIR_FS_ROOT_DOCS.'admin/data/'.self::REPOSITORY_SOURCE,'w');
+ fputs( $file_vers,$saveXml);
+ fclose($file_vers);
+
+
+ }
+ catch(Exception $e){
+
+ $messageStackFunction = (isset($_GET['forceajax']) ? 'add' : 'add_session' );
+ $messageStack->$messageStackFunction($e->getMessage(),'error' );
+ return false;
+ }
+
+ return true;
+ }
+
+
/**
@brief Suppression d'un depot
*/
@@ -36,7 +112,7 @@
@brief Load xml data,
@note this methode adjust static var parent class $FeedItem
@param $key string key source
- @return if key no empty retrun object result current source, else no result
+ @return if key no empty retrun object result current source, else false
*/
public static function SourceLoad($key=''){
global $messageStack,$osCSS_Cache;
@@ -55,16 +131,21 @@
foreach($FeedItem as $item){
$item->last_update=(isset($var_file[(string)$item->key]['last_update'] ) ? $var_file[(string)$item->key]['last_update'] : 'N/A');
-
/// adjust parent var
if(!empty($key) && $key == (string)$item->key )
return $item;
else
parent::$FeedItem[]=$item;
}
+
+ // arg key is present and no found in cache
+ if(! empty($key) )
+ return false;
}
catch(Exception $e){
- $messageStack->add_session($e->getMessage(),'error' );
+ $messageStackFunction = (isset($_GET['forceajax']) ? 'add' : 'add_session' );
+ $messageStack->$messageStackFunction($e->getMessage(),'error' );
+ return false;
}
}
@@ -120,7 +201,8 @@
}
catch(Exception $e){
- $messageStack->add_session($e->getMessage(),'error' );
+ $messageStackFunction = (isset($_GET['forceajax']) ? 'add' : 'add_session' );
+ $messageStack->$messageStackFunction($e->getMessage(),'error' );
return false;
}
@@ -151,7 +233,8 @@
}
}
catch(Exception $e){
- $messageStack->add_session($e->getMessage(),'error' );
+ $messageStackFunction = (isset($_GET['forceajax']) ? 'add' : 'add_session' );
+ $messageStack->$messageStackFunction($e->getMessage(),'error' );
}
}
@@ -160,29 +243,36 @@
@brief Test connection and content
This function initialise connection in repository url, and ceck retrun content result or error
This service in depot is normalise
- @param $repo string url source depot
- @param $action [value saction string] name action
+ @param $repo object
+ repository -> url source depot
+ @param $action [value action string] name action
@return result or false
*/
public static function InitConnexion($repo, $action = ''){
global $messageStack;
+ $messageStackFunction = (isset($_GET['forceajax']) ? 'add' : 'add_session' );
+
if(!$re= fileUtility::url_fopen( self::HrefSrc($repo, $action ) ) ){
- $messageStack->add_session('recuperation repository impossible :'.$repo->repository,'error' );
+ $messageStack->$messageStackFunction('recuperation repository impossible :'.$repo->repository,'error' );
return false;
}
else {
if(!$Repos = simplexml_load_string($re)){
- $messageStack->add_session(sprintf(__('package packageRepository contenu illisible pour %s') , $repo->title) ,'error' );
+ $messageStack->$messageStackFunction(sprintf(__('package packageRepository contenu illisible pour %s') , $repo->title) ,'error' );
return false;
}
if(isset($Repos->error)){
- $messageStack->add_session(sprintf(__('package packageRepository error in process for repository %s :>> %s') , $repo->repository , self::FomatError($Repos->error ) ),'error' );
+ $messageStack->$messageStackFunction(sprintf(__('package packageRepository error in process for repository %s :>> %s') , $repo->repository , self::FomatError($Repos->error ) ),'error' );
return false;
}
+ if(isset($Repos->warning)){
+ $messageStack->$messageStackFunction(sprintf(__('package packageRepository warning for repository %s :>> %s') , $repo->repository , self::FomatError($Repos->warning ) ),'warning' );
+ }
+
return $Repos;
}
@@ -205,7 +295,9 @@
$compteur=0;
$InternalID=1;
+ $messageStackFunction = (isset($_GET['forceajax']) ? 'add' : 'add_session' );
+
try{
//! declare cache
$osCSS_Cache->read(parent::REPOSITORY_CACHE,0, true);
@@ -281,10 +373,10 @@
}
//! message
if(count($var_file)==0)
- $messageStack->add_session(__('Erreur recuperation') ,'error' );
+ $messageStack->$messageStackFunction(__('Erreur recuperation') ,'error' );
// throw new Exception('Erreur recuperation');
else
- $messageStack->add_session(sprintf(__('package packageRepository repository %supdate ok'),$repo->title) ,'success' );
+ $messageStack->$messageStackFunction(sprintf(__('package packageRepository repository %supdate ok'),$repo->title) ,'success' );
}
else{
@@ -306,6 +398,7 @@
$item->internalID=$InternalID;
$comp++;
$InternalID++;
+
$dom_sxe = dom_import_simplexml($item);
$dom_sxe=$dom->importNode($dom_sxe, true);
$channel->appendChild($dom_sxe);
@@ -323,7 +416,7 @@
// $var_file[(string)$repo->key]['object']=$objres;
//! message
- $messageStack->add_session(sprintf(__('package packageRepository repository %supdate ok'),$repo->title) ,'success' );
+ $messageStack->$messageStackFunction(sprintf(__('package packageRepository repository %supdate ok'),$repo->title) ,'success' );
$compteur +=$comp;
}
@@ -351,7 +444,7 @@
}
catch(Exception $e){
- $messageStack->add_session($e->getMessage(),'error' );
+ $messageStack->$messageStackFunction($e->getMessage(),'error' );
}
return true;
}
Modified: branches/2.1.1/catalog/admin/includes/gabarit/package/display_view.source.edit.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/package/display_view.source.edit.gab 2012-08-10 13:04:09 UTC (rev 4574)
+++ branches/2.1.1/catalog/admin/includes/gabarit/package/display_view.source.edit.gab 2012-08-10 22:15:07 UTC (rev 4575)
@@ -10,63 +10,83 @@
$r =package::$list->service;
?>
-<h3><?php echo __('title heading configuration source repository edit') ?></h3>
+<h3><?php echo __('@package title heading configuration source repository '.((package::$action == 'source_add')? 'add' : 'edit')) ?></h3>
- <?php echo tep_draw_form('new_product', package::FILENAME, 'type_data=source&action=source_update_config', 'post'); ?>
+<?php echo tep_draw_form('masterforms', package::FILENAME, 'type_data=source&action='.((package::$action == 'source_add')? 'source_insert' : 'source_update_config'), 'post'); ?>
- <div class="box_uniq block_form">
- <?php echo tep_draw_hidden_field('key', '', (string)package::$list->key, ' ') ?>
+<div class=" block_form">
+ <div class="edit">
+ <?php if(package::$action == 'source_add'): ?>
+ <p class="block_input">
+ <label class="inline" for="key"><?php echo __('@package src key'); ?></label>
+ <?php echo tep_draw_input_field('key', '', (string)package::$list->key , ' class="w_70" ', true); ?>
+ </p>
+ <?php else: ?>
+ <span>
+ <?php echo tep_draw_hidden_field('key', '', (string)package::$list->key, ' ') ?>
+ </span>
+ <?php endif; ?>
+ <?php if(package::$action == 'source_add'): ?>
+ <p class="block_input">
+ <label class="inline" for="title"><?php echo __('@package src title'); ?></label>
+ <?php echo tep_draw_input_field('title', '', (string)package::$list->title , ' class="w_70" '); ?>
+ </p>
+ <?php endif; ?>
+ <p class="block_input">
+ <label class="inline" for="repository"><?php echo __('package src url'); ?></label>
+ <?php echo tep_draw_input_field('repository', '', (string)package::$list->repository, ' class="w_70" ', true) //. '<a class="ajaxinline" href="'.tep_href_link( package::FILENAME , 'type_data=source&key='. (string)package::$list->key.'&action=source_test').'">Test</a>'; ?>
+ </p>
+
+ <fieldset class="block_field">
+ <legend><?php echo __('package source legend ident') ?></legend>
<p class="block_input">
- <label class="inline" for="package_date_available"><?php echo __('package src url'); ?></label>
- <?php echo tep_draw_input_field('repository', '', (string)package::$list->repository, ' style="width:500px" ') //. '<a class="ajaxinline" href="'.tep_href_link( package::FILENAME , 'type_data=source&key='. (string)package::$list->key.'&action=source_test').'">Test</a>'; ?>
-
+ <label class="inline" for="user"><?php echo __('package text package user id'); ?></label>
+ <?php echo tep_draw_input_field('user', 'useradd', (string)package::$list->ident->user, ' class="w_70" ') ?>
</p>
+ <p class="block_input">
+ <label class="inline" for="token"><?php echo __('package text package token'); ?></label>
+ <?php echo tep_draw_input_field('token', '', (string)package::$list->ident->token, ' class="w_70" ') ?>
+ </p>
+ </fieldset>
- <fieldset class="block_field">
- <legend><?php echo __('package source legend ident') ?></legend>
- <p class="block_input">
- <label class="inline" for="package_date_available"><?php echo __('package text package user id'); ?></label>
- <?php echo tep_draw_input_field('user', 'useradd', (string)package::$list->ident->user, ' ') ?>
- </p>
- <p class="block_input">
- <label class="inline" for="package_date_available"><?php echo __('package text package token'); ?></label>
- <?php echo tep_draw_input_field('token', '', (string)package::$list->ident->token, 'style="width:500px" ') ?>
- </p>
- </fieldset>
+ <fieldset class="block_field">
+ <legend><?php echo __('@package source legend service declared') ?></legend>
+ <ul class="block_input">
+ <?php if(is_object($r) && method_exists($r, 'children')): ?>
+<!-- Section for list service current source -->
+ <?php foreach($r->children() as $k=>$row): ?>
+ <li>
+ <?php echo $k ?> <?php echo $row?>
+ </li>
+ <?php endforeach; ?>
+ <?php endif; ?>
+<!-- Section for add service in Source -->
+ <li>
+ <?php echo __('@package service add in current source') ?>
+ <ul>
+ <li><?php echo tep_draw_input_field('service_add[]', '', '',' class="w_70" '); ?></li>
+ <li><?php echo tep_draw_input_field('service_add[]', '', '',' class="w_70" '); ?></li>
+ </ul>
+ </li>
+ </ul>
+ </fieldset>
+ <div class="block_input button_nav" >
+ <?php
+ echo tep_image_submit('', ((package::$action == 'source_add')? __('@package button insert') : IMAGE_UPDATE) );
+ echo tep_js_back(tep_href_link(package::FILENAME, 'type_data=source'), IMAGE_CANCEL) ;
+ ?>
+ </div>
- <fieldset class="block_field">
-<legend><?php echo __('package source legend service declared') ?></legend>
- <ul class="block_input">
- <?php foreach($r->children() as $k=>$row): ?>
-<li>
- <?php echo $k ?> <?php echo $row?>
-</li>
- <?php endforeach; ?>
-</ul>
- </fieldset>
+ <br class="clear" />
+ </div>
+</div>
+</form>
-<!-- <fieldset class="block_field"> -->
- <div class="block_input button_nav" >
- <?php
- echo tep_image_submit('', IMAGE_UPDATE);
- echo tep_js_back(tep_href_link(package::FILENAME, 'type_data=source'), IMAGE_CANCEL) ;
- ?>
- </div>
-<!-- </fieldset> -->
-
-
-
- </div>
- </form>
-
-
-
-
Modified: branches/2.1.1/catalog/admin/includes/gabarit/package/display_view.source.listing.gab
===================================================================
--- branches/2.1.1/catalog/admin/includes/gabarit/package/display_view.source.listing.gab 2012-08-10 13:04:09 UTC (rev 4574)
+++ branches/2.1.1/catalog/admin/includes/gabarit/package/display_view.source.listing.gab 2012-08-10 22:15:07 UTC (rev 4575)
@@ -1,6 +1,6 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @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
@@ -10,14 +10,15 @@
@brief gabarit for package list
*/
?>
-<style type="text/css">
-#master-nav {float:left;}
-</style>
-<h3><?php echo __('heading title source repository') ?></h3>
+<h3><?php echo __('@package heading title source repository') ?></h3>
<div class="button_nav">
- <a id="master-nav" class="button" href="<?php echo tep_href_link(package::FILENAME,'type_data=package') ?>"><?php echo __('image package catalog') ?></a>
- <a class="button" href="<?php echo tep_href_link(package::FILENAME,'type_data=source&action=source_update') ?>"><?php echo __('image source update') ?></a>
+ <div class="fleft">
+ <a class="button" href="<?php echo tep_href_link(package::FILENAME,'type_data=package') ?>"><?php echo __('@package image package catalog') ?></a>
+ </div>
+
+ <a class="button" href="<?php echo tep_href_link(package::FILENAME,'type_data=source&action=source_add') ?>"><?php echo __('@package image source add') ?></a>
+ <a class="button" href="<?php echo tep_href_link(package::FILENAME,'type_data=source&action=source_update') ?>"><?php echo __('@package image source update') ?></a>
</div>
<table class="dataTable">
Modified: branches/2.1.1/catalog/admin/includes/javascript/oscss.js
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/oscss.js 2012-08-10 13:04:09 UTC (rev 4574)
+++ branches/2.1.1/catalog/admin/includes/javascript/oscss.js 2012-08-10 22:15:07 UTC (rev 4575)
@@ -4,37 +4,45 @@
*
* Use
* Add line in instance
- * OSCSS_JSNOTIF.utils.notif.AddNotif({indice : 1 ,style: 'toto' , message:"test 1"})
+ * OSCSS_JSCORE.utils.notif.AddNotif({indice : 1 ,style: 'toto' , message:"test 1"})
*
* force reload link and adjust for open in dialog box
- * OSCSS_JSNOTIF.utils.AdjustLink.OpenInDialog();*
+ * OSCSS_JSCORE.utils.AdjustLink.OpenInDialog();*
*
* Draw all message
*
- * OSCSS_JSNOTIF.utils.notif.ViewNotif();
+ * OSCSS_JSCORE.utils.notif.ViewNotif();
*/
-OSCSS_JSNOTIF = {};
+OSCSS_JSCORE = {};
(function(){ // début de scope local
-OSCSS_JSNOTIF.utils = OSCSS_JSNOTIF.utils || {};
+OSCSS_JSCORE.utils = OSCSS_JSCORE.utils || {};
// Gestion des notification
// déclaration de la classe de validation proprement dite
-OSCSS_JSNOTIF.utils.notif = {
+OSCSS_JSCORE.utils.notif = {
// déclaration de nos variables statiques
settings : {
style:"",
- message:"",
- position:"bottom",
- speed:500,
- duration:1500
+ message:"",
+ position:"bottom",
+ speed:500,
+ duration:1500
},
+ // adjust duration based on retrun messageStack class css
+ specialduration : {
+ messageStackSuccess : 1,
+ messageStackError : 5,
+ messageStackWarning : 3.5,
+ messageStackInfo : 2
+ },
- notification : {},
+ // pile notification
+ notification : {},
+ // pile number notif
+ size :0,
- size :0,
-
Clean:function(){
self.size = 0;
self.notification = {};
@@ -82,7 +90,7 @@
$("#messid" + self.notification[nom_indice].indice )
.fadeIn(self.notification[nom_indice].speed)
// on fait patienter jQuery
- .delay(self.notification[nom_indice].duration)
+ .delay( (self.notification[nom_indice].duration * self.specialduration[self.notification[nom_indice].style]) )
// et on masque la notification
.fadeOut(self.notification[nom_indice].speed);
}
@@ -111,7 +119,7 @@
// trick JavaScript pour émuler le self:: en PHP : on utilise une variable locale
-var self = OSCSS_JSNOTIF.utils.notif;
+var self = OSCSS_JSCORE.utils.notif;
@@ -119,7 +127,7 @@
// Gestion des notification
// déclaration de la classe de validation proprement dite
-OSCSS_JSNOTIF.utils.AdjustLink = {
+OSCSS_JSCORE.utils.AdjustLink = {
// déclaration de nos variables statiques
settings : {
},
Modified: branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
===================================================================
--- branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2012-08-10 13:04:09 UTC (rev 4574)
+++ branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2012-08-10 22:15:07 UTC (rev 4575)
@@ -15,23 +15,19 @@
$lang['title heading configuration package']="Configuration de l'extension " ;
-/** Menu */
- /* paquet */
+/** paquet */
$lang['image upload package']="Ajouter un paquet" ;
$lang['image package updatable']="Paquets à mettre à jour" ;
$lang['image package already install']="Paquets déjà installés" ;
$lang['image package not install']="Paquets non installés" ;
- $lang['image package catalog']="Liste des paquets" ;
- /* source */
- $lang['image source catalog']="Liste des sources" ;
- $lang['image source update']="Mise à jour des dépôts" ;
+ $lang['@package image source catalog']="Liste des sources" ;
-/** listing*/
+ /*listing*/
$lang['heading title source repository']="Catalogue d'extension" ;
- /* paquet */
+
$lang['table heading nom']="Nom" ;
$lang['table heading description']="Description" ;
$lang['table heading size']="Taille" ;
@@ -47,89 +43,107 @@
$lang['listing pkg image edit']="Voir la configuration" ;
$lang['listing pkg image remove']="Désinstaller cette extension" ;
$lang['listing pkg image install']="Télécharger et/ou installer" ;
- /* source */
- $lang['heading source title']="Titre" ;
- $lang['heading source key']="Clef" ;
- $lang['heading source last update']="Dernière mise a jour" ;
-/** Add */
-
- /* paquet */
+ /* Add */
$lang['title heading upload package']="Ajouter un paquet" ;
$lang['text heading upload package']="Télécharger un paquet, celui ci doit être au format correct des paquet pour oscss, rapprochez vous de la commuanuté pour obtenir des informations. Si le format du fichier n'est pas correct, il ne sera pas installable" ;
$lang['image upload manuel']="Télécharger un paquet" ;
- /* source */
+ /* UnInstall */
+ $lang['title heading delete extension']="Desinstallation d'une extension" ;
+ $lang['package remove your are sur']="Vous êtes sur de vouloir supprimer cette extension " ;
+ $lang['image confirm delete']="Confimer la desinstallation" ;
+ $lang['msg was removed']="Extension desinstallée" ;
+ $lang['image close and return listing']="Revenir au listing" ;
-/** UnInstall */
- $lang['title heading delete extension']="Desinstallation d'une extension" ;
- $lang['package remove your are sur']="Vous êtes sur de vouloir supprimer cette extension " ;
- $lang['image confirm delete']="Confimer la desinstallation" ;
- $lang['msg was removed']="Extension desinstallée" ;
+ /* view */
+ /* bouton */
+ $lang['image cip install']="Installer cette extension " ;
+ /* text */
+ $lang['package heading title detail']="Detail du paquet" ;
+ $lang['package heading title detail logs']="Detail des logs et nodes" ;
+ $lang['text info support']="Support " ;
+ $lang['text info contrib']="Detail du paquet " ;
- $lang['msg was removed']="Extension desinstallée" ;
+ $lang['contribs page oscss']="osCSSS.org page de support" ;
+ $lang['contribs cip pkg']="osCSS.org page" ;
- $lang['image close and return listing']="Revenir au listing" ;
+ /* install */
+ /* bouton */
+ $lang['config extension']="Configurer cette extension " ;
+ $lang['text post install notes']="Note de fin d'installation" ;
+ $lang['image error in process delete all file']="Supprimer les elements déjà installés" ;
+ $lang['image error reload install']="Relancer l'installation" ;
+ $lang['image abondon and return listing']="Tous abandonner et revenir au listing" ;
-/** view */
- /* source */
- $lang['title heading configuration source repository edit']="Modifié un depot" ;
- $lang['package source legend ident']="Identification" ;
- $lang['package source legend service declared']="services declaré" ;
- $lang['package text package user id']="Numéro d'utilisateur" ;
- $lang['package text package token']="Clef utilisateur" ;
- $lang['package src url']="Url du dêpot" ;
- /* paquet */
- /* bouton */
- $lang['image cip install']="Installer cette extension " ;
/* text */
- $lang['package heading title detail']="Detail du paquet" ;
- $lang['package heading title detail logs']="Detail des logs et nodes" ;
+ $lang['package heading title install']="installation du paquet" ;
+ $lang['package heading title install logs']="Detail des logs et nodes de l'installation" ;
+ /* errors / alert / message */
+ $lang['error in process install']="Erreur dans le processus d'installation cette extension " ;
+ $lang['packageInstaller download file exts good']="Extension téléchargé" ;
+ $lang['packageInstaller error recup zip url']="Erreur lors de la récuperation du paquet" ;
- $lang['text info support']="Support " ;
- $lang['text info contrib']="Detail du paquet " ;
+ /* view config */
+ /* bouton */
+ // $lang['config extension']="Configurer cette extension " ;
+ /* text */
+ $lang['package text frontend']="Frontend / public " ;
+ $lang['package text backend']="Backend / private " ;
- $lang['contribs page oscss']="osCSSS.org page de support" ;
- $lang['contribs cip pkg']="osCSS.org page" ;
-/** install */
- /* bouton */
- $lang['config extension']="Configurer cette extension " ;
- $lang['text post install notes']="Note de fin d'installation" ;
- $lang['image error in process delete all file']="Supprimer les elements déjà installés" ;
- $lang['image error reload install']="Relancer l'installation" ;
- $lang['image abondon and return listing']="Tous abandonner et revenir au listing" ;
- /* text */
- $lang['package heading title install']="installation du paquet" ;
- $lang['package heading title install logs']="Detail des logs et nodes de l'installation" ;
- /* errors / alert / message */
- $lang['error in process install']="Erreur dans le processus d'installation cette extension " ;
- $lang['packageInstaller download file exts good']="Extension téléchargé" ;
- $lang['packageInstaller error recup zip url']="Erreur lors de la récuperation du paquet" ;
+/** Source */
+ /* listing */
+ $lang['heading source title']="Titre" ;
+ $lang['heading source key']="Clef" ;
+ $lang['heading source last update']="Dernière mise a jour" ;
+ /* */
+ $lang['@package image source add']="Ajout d'un dépôt" ;
+ $lang['@package image source update']="Mise à jour des dépôts" ;
+ $lang['@package image package catalog']="Liste des paquets" ;
-/** view config */
- /* bouton */
-// $lang['config extension']="Configurer cette extension " ;
- /* text */
- $lang['package text frontend']="Frontend / public " ;
- $lang['package text backend']="Backend / private " ;
+ /* edit/add */
+ $lang['@package src key']="Clef unique pour cette entrée" ;
+ $lang['@package src title']="Titre";
+ $lang['@package title heading configuration source repository edit']="Modification d'un dépot" ;
+ $lang['@package title heading configuration source repository add']="Insertion d'un dépot" ;
+ $lang['package source legend ident']="Identification" ;
+ $lang['@package source legend service declared']="services declaré" ;
+ $lang['package text package user id']="Numéro d'utilisateur" ;
+ $lang['package text package token']="Clef utilisateur" ;
+ $lang['package src url']="Url du dêpot" ;
+ $lang['@package service add in current source']="Ajout de clef service" ;
+ /* messageStack */
+ $lang['@package update source process error']="Erreur lors de la mise à jour" ;
+ $lang['@package update source process success']="Succes de la mise à jour" ;
+ $lang['@package url is valids']="Url valide" ;
+ $lang['@package url is already used']="Cet url ne repond pas" ;
+ $lang['@package key is valid']="clef disponible" ;
+ $lang['@package key is already used']="Cette clef est déjà utilisé" ;
+ $lang['@package url is no repond']="Cette url ne repond pas ou pas correctement" ;
-/** update source */
- /* errors / alert / message */
- $lang['package packageRepository error in process for repository %s :>> %s']="Erreur lors de la recuperation du depot<strong>%s</strong>; message d'erreur retourné : %s" ;
- $lang['package packageRepository contenu illisible pour %s']="Erreur sur la lecture du depot <strong>%s</strong>" ;
+ /* button */
+ $lang['@package button insert']="Ajouter" ;
+ /* update */
+ /* errors / alert / message */
+ $lang['package packageRepository error in process for repository %s :>> %s']="Erreur lors de la recuperation du depot<strong>%s</strong>; message d'erreur retourné : %s" ;
+ $lang['package packageRepository contenu illisible pour %s']="Erreur sur la lecture du depot <strong>%s</strong>" ;
+ $lang['package packageRepository repository %supdate ok']="Récuperation du depot <strong>%s</strong> effectué" ;
- $lang['package packageRepository repository %supdate ok']="Récuperation du depot <strong>%s</strong> effectué" ;
+
+
+
+
/*
$lang['contribs cip pkg']="contribs cip pkg" ;
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/package.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/package.php 2012-08-10 13:04:09 UTC (rev 4574)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/package.php 2012-08-10 22:15:07 UTC (rev 4575)
@@ -163,13 +163,13 @@
/**
@remarks
*/
- case 'source_test';
- if(isset($_GET['mode'])) {
-// if(self::$objChild->SourceUpdate()==true)
-// InitConnexion($repo, $action = '')
- }
-// tep_redirect(tep_href_link(self::FILENAME), 'type_data=source');
- break;
+// case 'source_test';
+// if(isset($_GET['mode'])) {
+// // if(self::$objChild->SourceUpdate()==true)
+// // InitConnexion($repo, $action = '')
+// }
+// // tep_redirect(tep_href_link(self::FILENAME), 'type_data=source');
+// break;
/**
@remarks
@@ -185,25 +185,125 @@
// tep_redirect(tep_href_link(self::FILENAME), 'type_data=source');
break;
+ /** Source */
+
+
/**
+ @remarks Test key , by ajax
+ */
+ case 'isValidKey':
+
+ $key = tep_db_prepare_input($_REQUEST['stringkey']);
+ $messageStackFunction = (isset($_GET['forceajax']) ? 'add' : 'add_session' );
+
+ if( self::$objChild->SourceLoad($key) == false){
+ self::$list['isValidKey'] = true;
+ $messageStack->$messageStackFunction(__('@package key is valid'), 'success');
+
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(self::FILENAME, 'type_data=source&action=source_edit&key='.$key));
+
+ }
+ else{
+ self::$list['isValidKey'] = false;
+ $messageStack->$messageStackFunction(__('@package key is already used'), 'error');
+
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(self::FILENAME));
+ }
+ break;
+ /**
+ @remarks Test key , by ajax
+ */
+ case 'isValidUrl':
+
+ $stringurl = tep_db_prepare_input($_REQUEST['stringurl']);
+ $messageStackFunction = (!isset($_GET['forceajax']) ? 'add' : 'add_session' );
+
+ $obj = new stdClass();
+ $obj->repository = urldecode($stringurl);
+
+ if( self::$objChild->InitConnexion($obj, 'test') != false){
+ self::$list['isValidUrl'] = true;
+// $messageStack->$messageStackFunction(__('@package url is valid'), 'success');
+
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(self::FILENAME, 'type_data=source&action=source_edit'));
+
+ }
+ else{
+ self::$list['isValidUrl'] = false;
+ $messageStack->$messageStackFunction(__('@package url is no repond'), 'error');
+
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(self::FILENAME));
+ }
+ break;
+
+
+ /**
@remarks
+ TODO deplace in load_db_value
*/
+ case 'source_add':
+ self::$list = new stdClass();
+ self::$list->repository='';
+ self::$list->ident->user='';
+ self::$list->ident->token='';
+ self::$list->service='';
+ self::$list->key='';
+ break;
+
+
+ /**
+ @remarks update config for one source
+ */
case 'source_update_config':
$key = tep_db_prepare_input($_POST['key']);
$opt['user'] = tep_db_prepare_input($_POST['user']);
$opt['token'] = tep_db_prepare_input($_POST['token']);
-// self::$objChild->SourceUpdateConfig($key, $opt);
-// exit;
- if(self::$objChild->SourceUpdateConfig($key, $opt)==true)
+ if( self::$objChild->SourceUpdateConfig($key, $opt) == true){
+ $messageStack->add_session(__('@package update source process success'), 'success');
+
tep_redirect(tep_href_link(self::FILENAME, 'type_data=source&action=source_edit&key='.$key));
+ }
+ else{
+ $messageStack->add_session(__('@package update source process error'), 'error');
+ tep_redirect(tep_href_link(self::FILENAME));
+ }
+ break;
+ /**
+ @remarks
+ */
+ case 'source_insert':
+ $opt = array();
+// print_r($_REQUEST);
+// exit;
+ $opt['key'] = tep_db_prepare_input($_REQUEST['key']);
+ $opt['title'] = tep_db_prepare_input($_REQUEST['title']);
+ $opt['repository'] = tep_db_prepare_input($_REQUEST['repository']);
+ $opt['user'] = tep_db_prepare_input($_REQUEST['user']);
+ $opt['token'] = tep_db_prepare_input($_REQUEST['token']);
+var_dump(self::$objChild->SourceAdd($key, $opt) );
+exit;
+
+ if( self::$objChild->SourceAdd($key, $opt) == true){
+ $messageStack->add_session(__('@package update source process success'), 'success');
+
+ tep_redirect(tep_href_link(self::FILENAME, 'type_data=source&action=source_edit&key='.$key));
+ }
+ else{
+ $messageStack->add_session(__('@package update source process error'), 'error');
+
tep_redirect(tep_href_link(self::FILENAME));
+ }
break;
@@ -217,6 +317,8 @@
tep_redirect(tep_href_link(self::FILENAME));
break;
+
+ /** Package */
/**
@remarks
*/
@@ -320,8 +422,11 @@
/**
@fn get_header()
+ @return no return
*/
public function get_header(){
+
+ tep_include_file(DIR_WS_JS . "modules/pages/".__CLASS__.".js.php",true);
}
@@ -445,8 +550,28 @@
/**
@remarks Ajax View result
*/
+ case 'isValidKey':
+ $stringkey = tep_db_prepare_input($_REQUEST['stringkey']) ;
+ if( ! (bool)self::$list['isValidKey'])
+ $print = tep_draw_input_field('key', '', (string)$stringkey , ' class="w_70" ');
+ else
+ $print = $stringkey. tep_draw_hidden_field('key', '', (string)$stringkey, ' ');
+ return $print;
+ break;
+ case 'isValidUrl':
+ $stringurl = tep_db_prepare_input($_REQUEST['stringurl']) ;
+
+ if( ! (bool)self::$list['isValidUrl'])
+ $print = tep_draw_input_field('repository', '', (string)$stringurl , ' class="w_70" ');
+ else
+ $print = $stringurl. tep_draw_hidden_field('repository', '', (string)$stringurl, ' ');
+
+ return $print;
+ break;
+
+
/**
@remarks Normal display
*/
Modified: branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less 2012-08-10 13:04:09 UTC (rev 4574)
+++ branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less 2012-08-10 22:15:07 UTC (rev 4575)
@@ -128,6 +128,12 @@
.messageStackSuccess { background:@color_success; }
.messageStackNotice { background:@color_notice;}
+.inline.error {
+ color:red;
+ border-size:3px;
+ border-color:red;
+}
+
/* toogle item complet js action */
h4.Ctrtirroir,
h5.Ctrtirroir{ margin: 10px 0; padding: 0 0 0 (@padding_base * 2); font-size: (@font_size * 1.1); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-10 13:04:15
|
Revision: 4574
http://oscss.svn.sourceforge.net/oscss/?rev=4574&view=rev
Author: oscim
Date: 2012-08-10 13:04:09 +0000 (Fri, 10 Aug 2012)
Log Message:
-----------
coquille margin widget
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less
Modified: branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less 2012-08-10 07:48:25 UTC (rev 4573)
+++ branches/2.1.1/catalog/admin/includes/template/oscss/css/less/styles.less 2012-08-10 13:04:09 UTC (rev 4574)
@@ -450,7 +450,7 @@
*/
.widget{
float: left;
- margin: @margin ( @margin *0.5);
+ margin: ( @margin * 2) ( @margin *0.5) ( @margin * 2) ( @margin *0.5);
width: (100% - (@margin * 1) );
.rounded(5px);
.bw-gradient( @color_bg_gradient_base, @color_bg_gradient_eob, @color_bg_gradient_eon);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-10 07:48:32
|
Revision: 4573
http://oscss.svn.sourceforge.net/oscss/?rev=4573&view=rev
Author: oscim
Date: 2012-08-10 07:48:25 +0000 (Fri, 10 Aug 2012)
Log Message:
-----------
FIX erreur js
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/modules/pages/index.php
Modified: branches/2.1.1/catalog/admin/includes/modules/pages/index.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/modules/pages/index.php 2012-08-10 07:35:49 UTC (rev 4572)
+++ branches/2.1.1/catalog/admin/includes/modules/pages/index.php 2012-08-10 07:48:25 UTC (rev 4573)
@@ -1,6 +1,6 @@
<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @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
@@ -100,21 +100,25 @@
<script type="text/javascript"><!--
/* Appel des pages, et execution de commande*/
function get_ajax(id,vars,lib){
- var ter = document.getElementById(id);
- ter.innerHTML = '<p style="text-align:center"><img src="<?php echo DIR_WS_IMAGES ?>loading.gif"/></p>';
+
+ var ter = $('#' + id);
+
+ ter.html( '<p style="text-align:center"><img src="<?php echo DIR_WS_IMAGES ?>loading.gif"/></p>');
+
$.ajax({
- type: "GET",
- url: lib,
- data: "<?php echo tep_session_name().'='.tep_session_id() ?>&" + vars,
- success: function(msg){
- ter.innerHTML = msg;
- }
+ type: "GET",
+ url: lib,
+ data: "<?php echo tep_session_name().'='.tep_session_id() ?>&" + vars,
+ success: function(msg){
+ ter.html( msg );
+ }
});
return false;
}
+
$(document).ready(function() {
<?php foreach(self::$listgraph as $graph): ?>
- get_ajax('<?php echo $graph['name'] ?>_ImgGraph','forceajax=true&var=<?php echo $graph['querystring'] ?>&width='+(($("div#<?php echo $graph['name'] ?>").width())-50)+'&mini=true&print=false&class=GraphLoader&funct=ajax_in_Sats','ajax.php');
+ get_ajax('<?php echo $graph['name'] ?>_ImgGraph','forceajax=true&var=<?php echo $graph['querystring'] ?>&width='+(($("div#<?php echo $graph['name'] ?>").width())-50)+'&mini=true&print=false&class=GraphLoader&funct=ajax_in_Sats','ajax.php');
<?php endforeach; ?>
});
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-10 07:35:57
|
Revision: 4572
http://oscss.svn.sourceforge.net/oscss/?rev=4572&view=rev
Author: oscim
Date: 2012-08-10 07:35:49 +0000 (Fri, 10 Aug 2012)
Log Message:
-----------
correction chemin des icones
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/template/defaut/css/less/datatable.less
Modified: branches/2.1.1/catalog/admin/includes/template/defaut/css/less/datatable.less
===================================================================
--- branches/2.1.1/catalog/admin/includes/template/defaut/css/less/datatable.less 2012-08-09 19:57:11 UTC (rev 4571)
+++ branches/2.1.1/catalog/admin/includes/template/defaut/css/less/datatable.less 2012-08-10 07:35:49 UTC (rev 4572)
@@ -126,13 +126,13 @@
.edit-input-value .Flag-0.txt,
.edit-input-value .Val-0.txt { display:none}
- .edit-input-value .Flag-0.img{background:transparent url("../../../images/icons/icon_status_red.gif") left top no-repeat}
- .edit-input-value .Val-0.img { width: 10px; background:transparent url("../../../images/icons/icon_view_red.gif") left top no-repeat}
+ .edit-input-value .Flag-0.img{background:transparent url("../../../../../images/icons/icon_status_red.gif") left top no-repeat}
+ .edit-input-value .Val-0.img { width: 10px; background:transparent url("../../../../../images/icons/icon_view_red.gif") left top no-repeat}
.edit-input-value .Flag-1.txt,
.edit-input-value .Val-1.txt { display:none}
- .edit-input-value .Flag-1.img{background:transparent url("../../../images/icons/icon_status_green.gif") left top no-repeat}
- .edit-input-value .Val-1.img {width: 10px; background:transparent url("../../../images/icons/icon_view_green.gif") left top no-repeat}
+ .edit-input-value .Flag-1.img{background:transparent url("../../../../../images/icons/icon_status_green.gif") left top no-repeat}
+ .edit-input-value .Val-1.img {width: 10px; background:transparent url("../../../../../images/icons/icon_view_green.gif") left top no-repeat}
}
.row_action {
min-width:100px;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-08-09 19:57:18
|
Revision: 4571
http://oscss.svn.sourceforge.net/oscss/?rev=4571&view=rev
Author: oscim
Date: 2012-08-09 19:57:11 +0000 (Thu, 09 Aug 2012)
Log Message:
-----------
netooyage et report du code js dans le fichier oscss.js
Modified Paths:
--------------
branches/2.1.1/catalog/admin/includes/application_bottom.php
branches/2.1.1/catalog/admin/includes/header.php
branches/2.1.1/catalog/admin/includes/javascript/oscss.js
Modified: branches/2.1.1/catalog/admin/includes/application_bottom.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/application_bottom.php 2012-08-09 19:19:58 UTC (rev 4570)
+++ branches/2.1.1/catalog/admin/includes/application_bottom.php 2012-08-09 19:57:11 UTC (rev 4571)
@@ -114,111 +114,26 @@
/** Init page event js */
function post_load_page(){
+ // force reload link and adjust for open in dialog box
+ OSCSS_JSNOTIF.utils.AdjustLink.OpenInDialog();
+ // add flag in href link for fix process and display for ajax
+ OSCSS_JSNOTIF.utils.AdjustLink.HrefFlag();
- $('form.fancy,form.fancyView').ajaxForm({
- success: function(responseText){
- $.fancybox({'content':responseText});
- }
- });
+ // force link process and refresh this current html balise
+ OSCSS_JSNOTIF.utils.AdjustLink.ajaxinline();
- //! Fancy exe
- $('a.fancytext').fancybox({'overlayOpacity':0.6});
- $('a.buttonimg.fancy,a.button.fancy,a.buttonimg.fancyView,a.button.fancyView').fancybox({
- 'overlayOpacity':0.5,
- autoDimensions:true,
- showCloseButton:false,
- changeSpeed:0,
- titleShow:false,
- 'hideOnOverlayClick': false
- });
+ // active tabs in edit forms and display page.
+ OSCSS_JSNOTIF.utils.AdjustLink.BaseIntabs();
-// $('a.fancytext,a.buttonimg.fancy,a.button.fancy,a.buttonimg.fancyView,a.button.fancyView').bind('click', function() {
-// var $this = $(this);
-// var outputHolder = $("<div id='.uimodal-output'></div>");
-//
-//
-// $("body").append(outputHolder);
-// outputHolder.load($this.attr("href"), null, function() {
-// // whatever params you want
-// outputHolder.dialog({
-// open: function() {
-// $("#btjsclose").click(function(){
-// outputHolder.dialog('close');
-// return false;
-// });
-// }
-// });
-// });
-//
-// return false;
-// });
+ // add checkbox for select all childs checkboxs in current rows
+ OSCSS_JSNOTIF.utils.AdjustLink.select_all();
-
-
- //! Updat GET
- $('a.buttonimg.fancy,a.button.fancy,form.fancy').each(function(){
- var reg = /(forceajax)/gi;
- if( ! reg.test( this.href) )
- this.href +='&forceajax=true';
- });
- $('a.buttonimg.fancyView,a.button.fancyView,form.fancyView').each(function(){
- var reg = /(forceview)/gi;
- if( ! reg.test( this.href) )
- this.href +='&forceview=true';
- });
-
-
-
-
-
- // Tabs Exe
- var $tabs = $('#tabs, .tabs').tabs({cookie: {expires:30}}).find('.ui-tabs-nav').sortable({axis:'x'});
-
-// if(window.location.hash) {
- // Fragment exists
-// $tabs.tabs('select', window.location.hash);
-// }
-
- $('.tabs_lang').tabs().find('.ui-tabs-nav').sortable({axis:'x'});
-
-
- /** Flag ajax process Used in row status */
- $('a.ajaxinline').each(function(){
- var current = $(this);
- var reg = /(forceajax)/gi;
- if( ! reg.test( this.href) )
- var ref =this.href +='&forceajax=true';
- else
- var ref =this.href;
-
- current.click(function() {
- $.get(ref, function(data) {
- current.replaceWith(data);
- });
- return false;
- });
- });
-
-
// simple_tooltip("input","tooltip");
-// Multi in datatable, for select all rows
- $("#select_all").click(function(){
- var checked_status = $("#select_all").is(':checked');
- $("input[type='checkbox'].multi").each(function(){
- if(checked_status == true)
- this.checked = true;
- else
- this.checked = false;
- });
- });
-
-
// Call Back Exec
<?php echo oscss_cstr::CallBackExec(); ?>
-
}
// --></script>
Modified: branches/2.1.1/catalog/admin/includes/header.php
===================================================================
--- branches/2.1.1/catalog/admin/includes/header.php 2012-08-09 19:19:58 UTC (rev 4570)
+++ branches/2.1.1/catalog/admin/includes/header.php 2012-08-09 19:57:11 UTC (rev 4571)
@@ -226,8 +226,8 @@
// }
});
- //init
- post_load_page();
+ //init and reload after process in datatable
+ post_load_page();
<?php endif; ?>
Modified: branches/2.1.1/catalog/admin/includes/javascript/oscss.js
===================================================================
--- branches/2.1.1/catalog/admin/includes/javascript/oscss.js 2012-08-09 19:19:58 UTC (rev 4570)
+++ branches/2.1.1/catalog/admin/includes/javascript/oscss.js 2012-08-09 19:57:11 UTC (rev 4571)
@@ -6,6 +6,9 @@
* Add line in instance
* OSCSS_JSNOTIF.utils.notif.AddNotif({indice : 1 ,style: 'toto' , message:"test 1"})
*
+ * force reload link and adjust for open in dialog box
+ * OSCSS_JSNOTIF.utils.AdjustLink.OpenInDialog();*
+ *
* Draw all message
*
* OSCSS_JSNOTIF.utils.notif.ViewNotif();
@@ -16,6 +19,7 @@
(function(){ // début de scope local
OSCSS_JSNOTIF.utils = OSCSS_JSNOTIF.utils || {};
+// Gestion des notification
// déclaration de la classe de validation proprement dite
OSCSS_JSNOTIF.utils.notif = {
// déclaration de nos variables statiques
@@ -105,8 +109,136 @@
};
// fin de classe
+
// trick JavaScript pour émuler le self:: en PHP : on utilise une variable locale
var self = OSCSS_JSNOTIF.utils.notif;
+
+
+
+
+
+// Gestion des notification
+// déclaration de la classe de validation proprement dite
+OSCSS_JSNOTIF.utils.AdjustLink = {
+ // déclaration de nos variables statiques
+ settings : {
+ },
+
+ // ADD tag forceajax | forceview
+ HrefFlag:function(){
+
+ //! Updat GET
+ $('a.buttonimg.fancy,a.button.fancy,form.fancy').each(function(){
+ var reg = /(forceajax)/gi;
+ if( ! reg.test( this.href) )
+ this.href +='&forceajax=true';
+ });
+ $('a.buttonimg.fancyView,a.button.fancyView,form.fancyView').each(function(){
+ var reg = /(forceview)/gi;
+ if( ! reg.test( this.href) )
+ this.href +='&forceview=true';
+ });
+
+ },
+
+ OpenInDialog:function(){
+
+ $('form.fancy,form.fancyView').ajaxForm({
+ success: function(responseText){
+ $.fancybox({'content':responseText});
+ }
+ });
+
+ //! Fancy exe
+ $('a.fancytext').fancybox({'overlayOpacity':0.6});
+ $('a.buttonimg.fancy,a.button.fancy,a.buttonimg.fancyView,a.button.fancyView').fancybox({
+ 'overlayOpacity':0.5,
+ autoDimensions:true,
+ showCloseButton:false,
+ changeSpeed:0,
+ titleShow:false,
+ 'hideOnOverlayClick': false
+ });
+
+ // $('a.fancytext,a.buttonimg.fancy,a.button.fancy,a.buttonimg.fancyView,a.button.fancyView').bind('click', function() {
+ // var $this = $(this);
+ // var outputHolder = $("<div id='.uimodal-output'></div>");
+ //
+ //
+ // $("body").append(outputHolder);
+ // outputHolder.load($this.attr("href"), null, function() {
+ // // whatever params you want
+ // outputHolder.dialog({
+ // open: function() {
+ // $("#btjsclose").click(function(){
+ // outputHolder.dialog('close');
+ // return false;
+ // });
+ // }
+ // });
+ // });
+ //
+ // return false;
+ // });
+ },
+
+
+ // force link process and refresh this current html balise
+ ajaxinline:function(){
+ /** Flag ajax process Used in row status */
+ $('a.ajaxinline').each(function(){
+ var current = $(this);
+ var reg = /(forceajax)/gi;
+ if( ! reg.test( this.href) )
+ var ref =this.href +='&forceajax=true';
+ else
+ var ref =this.href;
+
+ current.click(function() {
+ $.get(ref, function(data) {
+ current.replaceWith(data);
+ });
+ return false;
+ });
+ });
+ },
+
+
+ // active tabs in edit forms and display page.
+ BaseIntabs:function(){
+ // Tabs Exe
+ var $tabs = $('#tabs, .tabs').tabs({cookie: {expires:30}}).find('.ui-tabs-nav').sortable({axis:'x'});
+
+ // if(window.location.hash) {
+ // Fragment exists
+ // $tabs.tabs('select', window.location.hash);
+ // }
+
+ $('.tabs_lang').tabs().find('.ui-tabs-nav').sortable({axis:'x'});
+
+ },
+
+
+ // add checkbox for select all childs checkboxs in current rows
+ select_all:function(){
+ // Multi in datatable, for select all rows
+ $("#select_all").click(function(){
+ var checked_status = $("#select_all").is(':checked');
+ $("input[type='checkbox'].multi").each(function(){
+ if(checked_status == true)
+ this.checked = true;
+ else
+ this.checked = false;
+ });
+ });
+ },
+
+
+};
+
+
+
+
})(); // fin de scope local
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|