Changeset 4596
- Timestamp:
- 08/27/12 18:31:38 (9 months ago)
- Location:
- branches/2.1.1/catalog
- Files:
-
- 16 modified
-
admin/includes/application_bottom.php (modified) (3 diffs)
-
admin/includes/classes/osCSS_messageStack.php (modified) (4 diffs)
-
admin/includes/gabarit/customers/display_view.edit.gab (modified) (2 diffs)
-
admin/includes/gabarit/featureds/rightto.edit.gab (modified) (1 diff)
-
admin/includes/gabarit/products/display_view.edit.gab (modified) (3 diffs)
-
admin/includes/javascript/modules/pages/customers.js.php (modified) (1 diff)
-
admin/includes/javascript/modules/pages/products.js.php (modified) (1 diff)
-
admin/includes/javascript/oscss.js (modified) (2 diffs)
-
admin/includes/languages/fr_FR/modules/pages/products.txt (modified) (2 diffs)
-
admin/includes/modules/account/account_extra.php (modified) (2 diffs)
-
admin/includes/modules/pages/categories.php (modified) (1 diff)
-
admin/includes/modules/pages/customers.php (modified) (3 diffs)
-
admin/includes/modules/pages/products.php (modified) (3 diffs)
-
admin/includes/modules/products/header_tags.php (modified) (1 diff)
-
admin/includes/template/defaut/css/less/datatable.less (modified) (4 diffs)
-
common/classes/ExtraUtility.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.1.1/catalog/admin/includes/application_bottom.php
r4580 r4596 14 14 15 15 $navigation->add_current_page(); 16 ?> 17 18 19 <?php 20 /** 21 Replace messageStack display generated php by javascript notification 22 */ 23 ?> 24 <script type="text/javascript"> 25 <?php 26 if ($messageStack->size > 0) : 27 28 // Get errors 29 $arr = $messageStack->get_errors() ; 30 31 foreach($arr as $k=>$row): ?> 32 33 // Add message line 34 OSCSS_JSCORE.utils.notif.AddNotif({ 35 indice:"<?php echo time() ?>", 36 style:"<?php echo $row['class'] ?>", 37 message:"<?php echo addslashes($row['text']) ?>", 38 }); 39 <?php 40 endforeach; ?> 41 <?php 42 43 endif; ?> 44 </script> 45 46 47 <?php 48 if(!isset($_GET['forceajax']) ) 49 $messageStack->reset() ; 50 16 51 //! close session (store variables) 17 52 tep_session_close(); 53 18 54 19 55 //! cache unique des fichiers de langue … … 57 93 ?> 58 94 59 <?php60 /**61 Replace messageStack display generated php by javascript notification62 */63 ?>64 <script type="text/javascript">65 <?php66 if ($messageStack->size > 0) :67 68 // Get errors69 $arr = $messageStack->get_errors() ;70 71 foreach($arr as $k=>$row): ?>72 73 // Add message line74 OSCSS_JSCORE.utils.notif.AddNotif({75 indice:"<?php echo time() ?>",76 style:"<?php echo $row['class'] ?>",77 message:"<?php echo addslashes($row['text']) ?>",78 });79 <?php80 endforeach; ?>81 <?php82 $messageStack->reset() ;83 endif; ?>84 </script>85 86 95 87 96 <?php … … 94 103 <?php if(!isset($_REQUEST['forceajax'])): ?> 95 104 96 /** Init page event js */97 function post_load_page(){105 /** Init page event js */ 106 function post_load_page(){ 98 107 99 /// Active Display message100 OSCSS_JSCORE.utils.notif.ViewNotif();108 /// Active Display message 109 OSCSS_JSCORE.utils.notif.ViewNotif(); 101 110 102 // active preview box and toolip103 OSCSS_JSCORE.utils.preview.Init();111 // active preview box and toolip 112 OSCSS_JSCORE.utils.preview.Init(); 104 113 105 // force reload link and adjust for open in dialog box106 OSCSS_JSCORE.utils.AdjustLink.OpenInDialog();114 // force reload link and adjust for open in dialog box 115 OSCSS_JSCORE.utils.AdjustLink.OpenInDialog(); 107 116 108 // add flag in href link for fix process and display for ajax109 OSCSS_JSCORE.utils.AdjustLink.HrefFlag();117 // add flag in href link for fix process and display for ajax 118 OSCSS_JSCORE.utils.AdjustLink.HrefFlag(); 110 119 111 // force link process and refresh this current html balise112 OSCSS_JSCORE.utils.AdjustLink.ajaxinline();120 // force link process and refresh this current html balise 121 OSCSS_JSCORE.utils.AdjustLink.ajaxinline(); 113 122 114 // active tabs in edit forms and display page.115 OSCSS_JSCORE.utils.AdjustLink.BaseIntabs();123 // active tabs in edit forms and display page. 124 OSCSS_JSCORE.utils.AdjustLink.BaseIntabs(); 116 125 117 // add checkbox for select all childs checkboxs in current rows118 OSCSS_JSCORE.utils.AdjustLink.select_all();126 // add checkbox for select all childs checkboxs in current rows 127 OSCSS_JSCORE.utils.AdjustLink.select_all(); 119 128 120 // simple_tooltip("input","tooltip");121 129 122 // Call Back Exec123 <?php echo oscss_cstr::CallBackExec(); ?>130 // Adsjut forms 131 OSCSS_JSCORE.utils.AdjustForms.AdjustLabel(); 124 132 125 } 133 // simple_tooltip("input","tooltip"); 134 135 // Call Back Exec 136 <?php echo oscss_cstr::CallBackExec(); ?> 137 138 } 126 139 <?php endif; ?> 127 140 // --></script> -
branches/2.1.1/catalog/admin/includes/classes/osCSS_messageStack.php
r4576 r4596 29 29 if (tep_session_is_registered('messageToStack')) { 30 30 for ($i = 0, $n = sizeof($messageToStack); $i < $n; $i++) { 31 $this-> add($messageToStack[$i]['text'], $messageToStack[$i]['type']);31 $this->_add($messageToStack[$i]['text'], $messageToStack[$i]['type']); 32 32 } 33 tep_session_unregister('messageToStack');33 // tep_session_unregister('messageToStack'); 34 34 } 35 35 } … … 75 75 } 76 76 77 p rivatefunction _add_session($message, $type = 'error') {77 public function _add_session($message, $type = 'error') { 78 78 global $messageToStack; 79 79 … … 83 83 } 84 84 85 $ messageToStack[] = array('text' => $message, 'type' => $type);85 $_SESSION['messageToStack'][] = array('text' => $message, 'type' => $type); 86 86 } 87 87 … … 89 89 $this->errors = array(); 90 90 $this->size = 0; 91 if (tep_session_is_registered('messageToStack')) 92 tep_session_unregister('messageToStack'); 91 93 } 92 94 -
branches/2.1.1/catalog/admin/includes/gabarit/customers/display_view.edit.gab
r4582 r4596 13 13 <h3><?php echo __('heading title'); ?></h3> 14 14 15 <?php echo tep_draw_form('customers', customers::FILENAME, 'action='.((in_array(customers::$action,array('edit','update')))?'update':'insert'), 'post', ' onsubmit="return check_form();"'); ?>15 <?php echo tep_draw_form('customers', customers::FILENAME, 'action='.((in_array(customers::$action,array('edit','update')))?'update':'insert'), 'post', ''); ?> 16 16 <!-- box_uniq --> 17 17 <div class="box_uniq block_form"> … … 20 20 21 21 <div id="tabs"> 22 <ul >22 <ul id="tabsmaster"> 23 23 <li><a href="#tabs-1"><?php echo __('tab customers data'); ?></a></li> 24 24 <?php -
branches/2.1.1/catalog/admin/includes/gabarit/featureds/rightto.edit.gab
r4499 r4596 16 16 if(is_object($res)) 17 17 $list[] = $res; 18 elseif($res !=false) 19 $list = $res; 18 20 else 19 $list = $res;21 $list = array(); 20 22 21 23 ?> -
branches/2.1.1/catalog/admin/includes/gabarit/products/display_view.edit.gab
r4587 r4596 50 50 51 51 <fieldset class="block_field"> 52 <ul> 53 <?php if(products::CheckClassProduct('CLASS_DATE_AVAIBLE')): ?> 54 <li class="block_input"> 55 <label class="inline" for="products_date_available"><?php echo __('text products date available'); ?></label> 56 <?php echo tep_draw_input_field('products_date_available', '', tep_not_null(products::$Info->products_date_available) ? tep_date_short(products::$Info->products_date_available) : '', ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_products_date_available') . ' ' . __('text products date format'); ?> 57 </li> 58 <?php endif; ?> 59 <?php if(products::CheckClassProduct('CLASS_MODELE')): ?> 60 <li class="block_input"> 61 <label class="inline" for="products_model"><?php echo __('text products model'); ?></label> 62 <?php echo tep_draw_input_field('products_model','', products::$Info->products_model); ?> 63 </li> 64 <?php endif; ?> 65 <?php if(products::CheckClassProduct('CLASS_SORTORDER')): ?> 66 <li class="block_input"> 67 <label class="inline" for="products_ordered"><?php echo __('text products ordered'); ?></label> 68 <?php echo tep_draw_input_field('products_ordered','', products::$Info->products_ordered); ?> 69 </li> 70 <?php endif; ?> 71 72 <?php foreach (products::$modules->__call('display_inline',array('flag'=>'general','pid'=> products::$Info->products_id)) as $value){ $title[]=$value['title']; $text[]=$value['text']; } ?> 73 <?php if(isset($title) && is_array($title)): ?> 74 <?php $i=0; foreach ($text as $item): ?> 75 <li><?php echo $item; ?></li> 76 <?php endforeach ; ?> 77 <?php $title=$text=array(); endif; ?> 78 79 <?php if(products::CheckClassProduct('CLASS_WEIGHT')): ?> 80 <li class="block_input"> 81 <label class="inline" for="products_weight"><?php echo __('text products weight'); ?></label> 82 <?php echo tep_draw_input_field('products_weight','', products::$Info->products_weight).' '.UNIT_WEIGHT_NAME; ?> 83 </li> 84 <?php endif; ?> 85 </ul> 52 <ul> 53 <?php if(products::CheckClassProduct('CLASS_DATE_AVAIBLE')): ?> 54 <li class="block_input"> 55 <label class="inline" for="products_date_available" title="<?php echo __('@products text date available help') ?>"><?php echo __('@products text date available'); ?></label> 56 <?php echo tep_draw_input_field('products_date_available', '', tep_not_null(products::$Info->products_date_available) ? tep_date_short(products::$Info->products_date_available) : '', ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_products_date_available') . ' ' . __('@products display date format'); ?> 57 </li> 58 <?php endif; ?> 59 <?php if(products::CheckClassProduct('CLASS_MODELE')): ?> 60 <li class="block_input"> 61 <label class="inline" for="products_model" title="<?php echo __('@products text model help'); ?>"><?php echo __('@products text model'); ?></label> 62 <?php echo tep_draw_input_field('products_model','', products::$Info->products_model); ?> 63 </li> 64 <?php endif; ?> 65 <?php if(products::CheckClassProduct('CLASS_SORTORDER')): ?> 66 <li class="block_input"> 67 <label class="inline" for="products_ordered"><?php echo __('text products ordered'); ?></label> 68 <?php echo tep_draw_input_field('products_ordered','', products::$Info->products_ordered); ?> 69 </li> 70 <?php endif; ?> 71 72 <?php foreach (products::$modules->__call('display_inline',array('flag'=>'general','pid'=> products::$Info->products_id)) as $value){ $title[]=$value['title']; $text[]=$value['text']; } ?> 73 <?php if(isset($title) && is_array($title)): ?> 74 <?php $i=0; foreach ($text as $item): ?> 75 <li><?php echo $item; ?></li> 76 <?php endforeach ; ?> 77 <?php $title=$text=array(); endif; ?> 78 79 80 </ul> 86 81 </fieldset> 87 82 88 83 <?php if(products::CheckClassProduct('CLASS_PRICE')): /** Si Class de prix defini, les prix sont pris en charge par un onglet */ ?> 89 <fieldset class="block_field">90 <legend><?php echo __('text legend price'); ?></legend>91 <ul>92 <li style="clear:both"></li>93 <li class="block_input">94 <label class="inline" for="products_tax_class_id"><?php echo __('text products tax class'); ?></label>95 <?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 />96 </li>97 <li class="block_input">98 99 <div class="fleft w_50">100 <label class="inline" for="products_price"><?php echo __('text products price net'); ?></label>101 <?php echo tep_draw_input_field('products_price','', products::$Info->products_price, ' class="price" style=" " size="16" ').'<span class="required">*</span>'; ?>102 </div>103 <div class="fleft w_50">104 <label class="inline" for="products_price_gross"><?php echo __('text products price gross'); ?></label>105 <?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" '); ?>106 </div>107 </li>108 109 <?php110 /**111 @brief Call variation price for products112 */113 ?>114 <?php foreach (products::$modules->__call('display_inline',array('flag'=>'price','pid'=> products::$Info->products_id)) as $value){ $title[]=$value['title']; $text[]=$value['text']; } ?>115 116 <?php if( (isset($title) && is_array($title)) || isset(products::$Info->products_sppc) ): ?>117 118 <li class="block_input">119 84 <fieldset class="block_field"> 120 <legend class="Ctrtirroir"><?php echo __('Option de prix supplementaire') ?></legend> 121 <div class="tirroir tabs"> 122 123 <ul class="w_100"> 124 125 <?php if(isset($title) && is_array($title)): ?> 126 <?php if (isset(products::$Info->products_sppc)): ?> 127 <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> 128 <?php endif; ?> 129 130 <?php $i=1; foreach ($title as $item): ?> 131 <li><a href="#products_price-<?php echo $i++; ?>"><?php echo $item; ?></a></li> 132 <?php endforeach ; ?> 133 <?php endif; ?> 134 135 136 137 </ul> 138 139 140 <ul class="w_100"> 141 142 <?php if(isset($title) && is_array($title)): ?> 143 <?php $i=1; foreach ($text as $item): ?> 144 <li id="products_price-<?php echo $i++; ?>"><?php echo $item; ?></li> 145 <?php endforeach ; ?> 146 <?php endif; ?> 147 148 <?php if (isset(products::$Info->products_sppc)): ?> 149 <li id="products_price-0" class="w_100"> 150 <ul class="clear w_100"> 151 <?php foreach (products::$Info->products_sppc as $sppcGpId => $sppcInfos): ?> 152 <li class="block_input price"> 153 <label class="inline" for="<?php echo 'sppcprice_' . $sppcGpId; ?>"> 154 <?php echo $sppcInfos['sppcname']; ?> 155 </label> 156 157 <span class="number"> 158 <?php echo tep_draw_input_field('sppcprice[' . $sppcGpId . ']','', (($sppcInfos['sppcprice'] >0) ? $sppcInfos['sppcprice'] : products::$Info->products_price ), ' class="price" style=" " size="16" '); ?> 159 </span> 160 <span class="status"> 161 <?php echo tep_draw_checkbox_field('sppcoption[' . $sppcGpId . ']', '', 'sppcoption[' . $sppcGpId . ']',$sppcInfos['sppcprice']!=''?1:0) .' '. __('@product active price group') ; ?> 162 </span> 163 </li> 164 <?php endforeach;?> 165 </ul> 166 </li> 167 <?php endif; ?> 168 </ul> 169 170 </div> 85 <legend><?php echo __('text legend price'); ?></legend> 86 <ul> 87 <li style="clear:both"></li> 88 <li class="block_input"> 89 <label class="inline" for="products_tax_class_id"><?php echo __('text products tax class'); ?></label> 90 <?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 /> 91 </li> 92 <li class="block_input"> 93 94 <div class="fleft w_50"> 95 <label class="inline" for="products_price"><?php echo __('text products price net'); ?></label> 96 <?php echo tep_draw_input_field('products_price','', products::$Info->products_price, ' class="price" style=" " size="16" ').'<span class="required">*</span>'; ?> 97 </div> 98 <div class="fleft w_50"> 99 <label class="inline" for="products_price_gross"><?php echo __('text products price gross'); ?></label> 100 <?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" '); ?> 101 </div> 102 </li> 103 104 <?php 105 /** 106 @brief Call variation price for products 107 */ 108 ?> 109 <?php foreach (products::$modules->__call('display_inline',array('flag'=>'price','pid'=> products::$Info->products_id)) as $value){ $title[]=$value['title']; $text[]=$value['text']; } ?> 110 111 <?php if( (isset($title) && is_array($title)) || isset(products::$Info->products_sppc) ): ?> 112 113 <li class="block_input"> 114 <fieldset class="block_field"> 115 <legend class="Ctrtirroir"><?php echo __('@products legend option de prix supplementaire') ?></legend> 116 <div class="tirroir tabs"> 117 118 <ul class="w_100"> 119 120 <?php if(isset($title) && is_array($title)): ?> 121 <?php if (isset(products::$Info->products_sppc)): ?> 122 <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> 123 <?php endif; ?> 124 125 <?php $i=1; foreach ($title as $item): ?> 126 <li><a href="#products_price-<?php echo $i++; ?>"><?php echo $item; ?></a></li> 127 <?php endforeach ; ?> 128 <?php endif; ?> 129 130 131 132 </ul> 133 134 135 <ul class="w_100"> 136 137 <?php if(isset($title) && is_array($title)): ?> 138 <?php $i=1; foreach ($text as $item): ?> 139 <li id="products_price-<?php echo $i++; ?>"><?php echo $item; ?></li> 140 <?php endforeach ; ?> 141 <?php endif; ?> 142 143 <?php if (isset(products::$Info->products_sppc)): ?> 144 <li id="products_price-0" class="w_100"> 145 <ul class="clear w_100"> 146 <?php foreach (products::$Info->products_sppc as $sppcGpId => $sppcInfos): ?> 147 <li class="block_input price"> 148 <label class="inline" for="<?php echo 'sppcprice_' . $sppcGpId; ?>"> 149 <?php echo $sppcInfos['sppcname']; ?> 150 </label> 151 152 <span class="number"> 153 <?php echo tep_draw_input_field('sppcprice[' . $sppcGpId . ']','', (($sppcInfos['sppcprice'] >0) ? $sppcInfos['sppcprice'] : products::$Info->products_price ), ' class="price" style=" " size="16" '); ?> 154 </span> 155 <span class="status"> 156 <?php echo tep_draw_checkbox_field('sppcoption[' . $sppcGpId . ']', '', 'sppcoption[' . $sppcGpId . ']',$sppcInfos['sppcprice']!=''?1:0) .' '. __('@product active price group') ; ?> 157 </span> 158 </li> 159 <?php endforeach;?> 160 </ul> 161 </li> 162 <?php endif; ?> 163 </ul> 164 165 </div> 166 </fieldset> 167 </li> 168 <?php endif; ?> 169 170 171 <!-- <li class="block_input"> 172 <label class="inline" for="products_price_gross"><?php //echo __('text products final price'); ?></label> 173 <?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" '); ?> 174 </li>--> 175 176 </ul> 171 177 </fieldset> 172 </li>173 <?php endif; ?>174 175 176 <li class="block_input">177 <label class="inline" for="products_price_gross"><?php echo __('text products final price'); ?></label>178 <?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" '); ?>179 </li>180 181 </ul>182 </fieldset>183 178 <?php endif; ?> 184 179 … … 194 189 <?php echo tep_draw_pull_down_menu('track_stock', products::$track_stock , products::$Info->track_stock); ?> 195 190 <br style="clear:both;" /> 191 <div id="products_quantity_block"> 196 192 <?php if(products::$product_investigation['has_tracked_options'] or products::$product_investigation['stock_entries_count'] > 0) :?> 197 193 <a class="button fancyView iframe" href="<?php echo tep_href_link(FILENAME_STOCK, 'product_id=' . products::$Info->products_id.'&origin='.tep_href_link(products::FILENAME))?>"><?php echo __('txt stock') ?></a> 198 <?php else if(products::$Info->track_stock==1): ?>194 <?php else: ?> 199 195 <label class="inline" for="products_quantity"><?php echo __('text products quantity'); ?></label> 200 <?php echo tep_draw_input_field('products_quantity','', products::$Info->products_quantity ) ; ?><br />196 <?php echo tep_draw_input_field('products_quantity','', products::$Info->products_quantity, ((products::$Info->track_stock==0)? 'disabled="disabled"' :'') ) ; ?><br /> 201 197 <?php endif; ?> 198 </div> 202 199 </div> 203 200 </fieldset> 204 201 205 202 <?php endif; ?> 203 204 <fieldset class="block_field"> 205 <legend><?php echo __('@products text legend shipping'); ?></legend> 206 <ul> 207 <?php if(products::CheckClassProduct('CLASS_WEIGHT')): ?> 208 <li class="block_input"> 209 <label class="inline" for="products_weight" title="<?php echo __('@products text weight help'); ?><"><?php echo __('@products text weight'); ?></label> 210 <?php echo tep_draw_input_field('products_weight','', products::$Info->products_weight).' '.UNIT_WEIGHT_NAME; ?> 211 </li> 212 <?php endif; ?> 213 </ul> 214 </fieldset> 215 206 216 207 217 </div> … … 243 253 <dl> 244 254 <dd class="block_input"> 245 <label><?php echo __(' text productsstatus'); ?></label>246 <?php echo tep_draw_radio_field('products_status', 'products_status_1', '1', products::$in_status,'','class="radio"') . __(' text product available') . tep_draw_radio_field('products_status', 'products_status_0', '0', products::$out_status,'','class="radio"') . __('text product not available'); ?>255 <label><?php echo __('@products text status'); ?></label> 256 <?php echo tep_draw_radio_field('products_status', 'products_status_1', '1', products::$in_status,'','class="radio"') . __('@products text status on') . tep_draw_radio_field('products_status', 'products_status_0', '0', products::$out_status,'','class="radio"') . __('@products text status off'); ?> 247 257 </dd> 248 258 -
branches/2.1.1/catalog/admin/includes/javascript/modules/pages/customers.js.php
r4569 r4596 9 9 @encode UTF-8 10 10 */ 11 11 12 ?> 12 <script type="text/javascript"> 13 <?php if (in_array(customers::$action,array('edit','update','new','insert'))) { ?> 13 <script type="text/javascript"><!-- 14 15 (function(){ // début de scope local 16 OSCSS_JSCORE.customers = OSCSS_JSCORE.customers || {}; 17 // déclaration de la classe de validation proprement dite 18 OSCSS_JSCORE.customers.utlis = { 19 // déclaration de nos variables statiques 14 20 15 21 16 function check_form() {17 var error = 0; 18 var error_message = "<?php echo addslashes(JS_ERROR); ?>";22 // déclaration de nos méthodes 23 // Check 24 CheckForm:function( ) { 19 25 20 var customers_firstname = document.customers.customers_firstname.value; 21 var customers_lastname = document.customers.customers_lastname.value; 22 <?php if (_cst_bool('ACCOUNT_DOB')) echo 'var customers_dob = document.customers.customers_dob.value;' . "\n"; ?> 23 var customers_email_address = document.customers.customers_email_address.value; 24 var customers_telephone = document.customers.customers_telephone.value; 26 // onload 27 $(function() { 25 28 26 <?php if (_cst_bool('ACCOUNT_GENDER')) { ?> 27 if (document.customers.customers_gender[0].checked || document.customers.customers_gender[1].checked) { 28 } else { 29 error_message = error_message + "<?php echo addslashes(__('js gender')); ?>"; 30 error = 1; 31 } 32 <?php } ?> 33 34 if (customers_firstname == "" || customers_firstname.length < <?php echo ENTRY_FIRST_NAME_MIN_LENGTH; ?>) { 35 error_message = error_message + "<?php echo sprintf(addslashes(__('js first name')), ENTRY_FIRST_NAME_MIN_LENGTH) ; ?>"; 36 error = 1; 37 } 38 39 if (customers_lastname == "" || customers_lastname.length < <?php echo ENTRY_LAST_NAME_MIN_LENGTH; ?>) { 40 error_message = error_message + "<?php echo sprintf(addslashes(__('js last name')), ENTRY_LAST_NAME_MIN_LENGTH); ?>"; 41 error = 1; 42 } 43 44 <?php if (_cst_bool('ACCOUNT_DOB')) { ?> 45 if (customers_dob == "" || customers_dob.length < <?php echo ENTRY_DOB_MIN_LENGTH; ?>) { 46 error_message = error_message + "<?php echo sprintf(addslashes(__('js dob')), ENTRY_DOB_MIN_LENGTH); ?>"; 47 error = 1; 48 } 49 <?php } ?> 50 51 if (customers_email_address == "" || customers_email_address.length < <?php echo ENTRY_EMAIL_ADDRESS_MIN_LENGTH; ?>) { 52 error_message = error_message + "<?php echo sprintf(addslashes(__('js email address')), ENTRY_EMAIL_ADDRESS_MIN_LENGTH); ?>"; 53 error = 1; 54 } 29 $('form#customers').submit(function() { 30 31 var loop = new Array; 32 var error_message = "<?php echo addslashes(JS_ERROR); ?>"; 33 var error = 0; 55 34 56 35 57 if (customers_telephone == "" || customers_telephone.length < <?php echo ENTRY_TELEPHONE_MIN_LENGTH; ?>) { 58 error_message = error_message + "<?php echo sprintf(addslashes(__('js tel lenght')), ENTRY_EMAIL_ADDRESS_MIN_LENGTH); ?>"; 59 error = 1; 60 } 36 var customers_firstname = $('input#customers_firstname').val(); 37 if (customers_firstname == "" || customers_firstname.length < <?php echo ENTRY_FIRST_NAME_MIN_LENGTH; ?>) { 38 error_message = error_message + "<?php echo sprintf(addslashes(__('js first name')), ENTRY_FIRST_NAME_MIN_LENGTH); ?>"; 39 self.DisplayAlert( $('input#customers_firstname') ); 40 error++; 41 } 61 42 62 if (error == 1) { 63 alert(error_message); 64 return false; 65 } else { 66 return true; 67 } 68 } 43 var customers_lastname = $('input#customers_lastname').val(); 44 if (customers_lastname == "" || customers_lastname.length < <?php echo ENTRY_LAST_NAME_MIN_LENGTH; ?>) { 45 error_message = error_message + "<?php echo sprintf(addslashes(__('js last name')), ENTRY_LAST_NAME_MIN_LENGTH); ?>"; 46 self.DisplayAlert( $('input#customers_lastname') ); 47 error++; 48 } 49 50 // Check Tel Customers 51 var customers_telephone = $('input#customers_telephone').val(); 52 if (customers_telephone == "" || customers_telephone.length < <?php echo ENTRY_TELEPHONE_MIN_LENGTH; ?>) { 53 error_message = error_message + "<?php echo sprintf(addslashes(__('js tel lenght')), ENTRY_EMAIL_ADDRESS_MIN_LENGTH); ?>"; 54 self.DisplayAlert( $('input#customers_telephone') ); 55 error++; 56 } 57 58 var customers_email_address = $('input#customers_email_address').val(); 59 if (customers_email_address == "" || customers_email_address.length < <?php echo ENTRY_EMAIL_ADDRESS_MIN_LENGTH; ?>) { 60 error_message = error_message + "<?php echo sprintf(addslashes(__('js email address')), ENTRY_EMAIL_ADDRESS_MIN_LENGTH); ?>"; 61 self.DisplayAlert( $('input#customers_email_address') ); 62 error++; 63 } 64 65 <?php if (_cst_bool('ACCOUNT_DOB')): ?> 66 var customers_dob = $('input#customers_dob').val(); 67 if (customers_dob == "" || customers_dob.length < <?php echo ENTRY_DOB_MIN_LENGTH; ?>) { 68 error_message = error_message + "<?php echo sprintf(addslashes(__('js dob')), ENTRY_DOB_MIN_LENGTH); ?>"; 69 self.DisplayAlert( $('input#customers_dob') ); 70 error++; 71 } 72 <?php endif; ?> 69 73 70 74 71 <?php } ?> 72 </script> 75 76 // // Add message line 77 // OSCSS_JSCORE.utils.notif.AddNotif({ 78 // indice:event.timeStamp, 79 // style:'warring', 80 // message: error_message, 81 // }); 82 // var $parent = $(this).parent('div');//.hide() ; 83 84 // if(error > 0 ) 85 // self.DisplayAlert( $(this).parent('#tabsmaster li') ); 86 // }); 87 88 if(error > 0 ) 89 return false; 90 else 91 return true; 92 }); 93 94 }); 95 96 97 }, 98 99 100 101 /** 102 Internal methode 103 */ 104 DisplayAlert:function( $current ){ 105 $current.css('border-color', 'red'); 106 $current.parent().effect("highlight", {}, 3000); 107 }, 108 }; 109 110 // trick JavaScript pour émuler le self:: en PHP : on utilise une variable locale 111 var self = OSCSS_JSCORE.customers.utlis; 112 })(); // fin de scope locale 113 114 //--></script> 115 116 117 <?php oscss_cstr::CallBack('OSCSS_JSCORE.customers.utlis.CheckForm();'); // Active check key ?> 118 119 120 -
branches/2.1.1/catalog/admin/includes/javascript/modules/pages/products.js.php
r4590 r4596 50 50 }); 51 51 52 53 /** 54 Display / Hide Input quantity if mode No stock 55 */ 56 $("select#track_stock").change(function(){ 57 var val = $("select#track_stock option:selected" ).val(); 58 59 if(val == 0){ 60 $("#products_quantity_block").fadeTo("slow", 0.5); 61 $("#products_quantity_block input").attr('disabled', 'disabled'); 62 } 63 else{ 64 $("#products_quantity_block").fadeTo("slow", 1); 65 $("#products_quantity_block input").removeAttr( 'disabled' ); 66 } 67 }); 52 68 }, 53 69 -
branches/2.1.1/catalog/admin/includes/javascript/oscss.js
r4580 r4596 132 132 settings : { 133 133 }, 134 135 // force link process and refresh this current html balise 136 AdjustForm:function(){ 137 /** Hide image and report title label in input fields */ 138 $('label').each(function(){ 139 var $img = $('img:first', this); 140 // cache image code html (obsolete) 141 $img.hide(); 142 143 $(this).next().attr('title', $(this).attr('title') ); 144 }); 145 }, 134 146 135 147 // ADD tag forceajax | forceview … … 246 258 // fin de classe 247 259 248 260 261 262 263 // Gestion des notification 264 // déclaration de la classe de validation proprement dite 265 OSCSS_JSCORE.utils.AdjustForms = { 266 // déclaration de nos variables statiques 267 settings : { 268 }, 269 270 // force link process and refresh this current html balise 271 AdjustLabel:function(){ 272 /** Hide image and report title label in input fields */ 273 $('label').each(function(){ 274 var $img = $('img:first', this); 275 // cache image code html (obsolete) 276 $img.hide(); 277 278 var title = ''; 279 280 // alert($(this).attr('title')); 281 282 if( $(this).attr('title') !='undefined') 283 title = $(this).attr('title'); 284 else if( $img.attr('title') !='undefined') 285 title = $img.attr('title'); 286 287 $(this).next().attr('title', title ); 288 }); 289 }, 290 291 }; 292 // fin de classe 249 293 250 294 -
branches/2.1.1/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
r4582 r4596 126 126 $lang['text products quantity info']="Quantité :" ; 127 127 $lang['text date added']="Date d'ajout :" ; 128 $lang['text date available']="Date de disponibilité :" ; 128 $lang['@products text date available']="Date de disponibilité :" ; 129 $lang['@products text date available help']="Vous pouvez preciser une date de disponibilité, dans ce cas, ce produit n'apparaitra qu'une fois cette date révolue" ; 130 $lang['@products display date format']="<small>(jj/mm/aaaa)</small>" ; 129 131 $lang['text products type']="Type de produit :" ; 130 132 $lang['text products ordered']="Ordre tri:" ; 131 133 $lang['text sort order']="Ordre de tri :" ; 132 $lang['text products status']="Statut :" ; 133 $lang['text products date available']="Date de disponibilité :" ; 134 $lang['text products date format']="<small>(jj/mm/aaaa)</small>" ; 135 $lang['text product available']="Actif " ; 136 $lang['text product not available']="Désactivé" ; 134 135 $lang['@products legend option de prix supplementaire']="Options de prix supplementaires" ; 136 137 $lang['@products text status']="Statut :" ; 138 $lang['@products text status on']="Actif " ; 139 $lang['@products text status off']="Désactivé" ; 140 141 $lang['@products text model']="ModÚle :" ; 142 $lang['@products text model help']="Ce modÚle est destiné à être affiché dans la page produit et eventullement dans les listings. Il ne s'agit pas d'une référence unique produits, mais du modéle definis par le fabricant" ; 143 137 144 $lang['text products name']="Nom :" ; 138 145 $lang['text products description']="Description :" ; 139 146 $lang['text products quantity']="Quantité :" ; 140 $lang['text products model']="ModÚle :" ; 147 141 148 $lang['text products image']="Image :" ; 142 $lang['text products weight']="Poids :" ; 149 143 150 $lang['text products weight help']="le poids du produit est nécessaire pour calculer les frais de livraison" ; 144 151 $lang['text product more information']="Pour plus d'information, merci de visiter cette <a href=\"http://%s\">page web</a> de produits." ; … … 153 160 $lang['@products text label stock']="Mode de gestion" ; 154 161 162 $lang['@products text legend shipping']="Poids et livraison" ; 163 $lang['@products text weight']="Poids :" ; 164 $lang['@products text weight help']="le poids du produit est utilisé dans la gestion des livraisons" ; 165 155 166 $lang['text legend price']="Prix" ; 156 167 $lang['text legend image']="Image" ; -
branches/2.1.1/catalog/admin/includes/modules/account/account_extra.php
r4047 r4596 49 49 try{ 50 50 // BOF Customers extra fields 51 $extra_fields_query = tep_db_query("select ce.fields_id, ce.fields_input_type, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type, ce.fields_size from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_LABELS . " cei WHERE ce.fields_status=1 and ce.fields_ required_status=1 and cei.fields_id=ce.fields_id and cei.languages_id ='". $languages_id ."' AND fields_special_mod='' ");51 $extra_fields_query = tep_db_query("select ce.fields_id, ce.fields_input_type, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type, ce.fields_size from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_LABELS . " cei WHERE ce.fields_status=1 and ce.fields_status=1 and cei.fields_id=ce.fields_id and cei.languages_id ='". $languages_id ."' AND fields_special_mod='' "); 52 52 while($extra_fields = tep_db_fetch_array($extra_fields_query)){ 53 53 … … 56 56 */ 57 57 if(strlen($_POST['fields_' . $extra_fields['fields_id']])<$extra_fields['fields_size']) 58 throw new Exception(sprintf('entry extra fields (%s) error length %s',$extra_fields['fields_name'],$extra_fields['fields_size']) ); 58 if($extra_fields['fields_required_status'] > 0) 59 throw new Exception(sprintf('entry extra fields (%s) error length %s',$extra_fields['fields_name'],$extra_fields['fields_size']) ); 60 else 61 $messageStack->add(sprintf('entry extra fields (%s) error length %s',$extra_fields['fields_name'],$extra_fields['fields_size']), 'warning'); 59 62 } 60 63 61 64 }catch(Exception $e){ 62 $messageStack->add_session($e->getMessage(), 'error'); 63 // self::$error=true; 65 $messageStack->add($e->getMessage(), 'error'); 64 66 } 65 67 break; -
branches/2.1.1/catalog/admin/includes/modules/pages/categories.php
r4593 r4596 225 225 226 226 osCSS_Cache::clear('categorie'); 227 228 $messageStack->add_session(__('@categorie create'), 'success'); 227 229 228 230 if(isset($_POST['up_and_close']) ) -
branches/2.1.1/catalog/admin/includes/modules/pages/customers.php
r4582 r4596 470 470 } 471 471 472 if(!isset($_GET['forceajax'])){ 473 $messageStack->add_session(__('@customers update status customers'), 'success'); 472 $messageStack->add(__('@customers update status customers'), 'success'); 473 474 if(!isset($_GET['forceajax'])) 474 475 tep_redirect(tep_href_link(self::FILENAME, 'cID=' . $_GET['cID'])); 475 } 476 else 477 $messageStack->add(__('@customers update status customers'), 'success'); 476 478 477 break; 479 478 … … 486 485 } 487 486 488 if(!isset($_GET['forceajax'])){ 489 $messageStack->add_session(__('@customers update confirm status customers'), 'success'); 487 $messageStack->add(__('@customers update confirm status customers'), 'success'); 488 489 if(!isset($_GET['forceajax'])) 490 490 tep_redirect(tep_href_link(self::FILENAME, 'cID=' . $_GET['cID'])); 491 } 492 else 493 $messageStack->add(__('@customers update confirm status customers'), 'success'); 491 494 492 break; 495 493 … … 597 595 598 596 599 $myarray['from']=STORE_OWNER; 600 $myarray['email_use_html']=_cst_bool('EMAIL_USE_HTML'); 601 $myarray['message']=$message_final; 602 603 if( ! notification::notifInMess('admin_new_customers',__('subject copy creat new compte for customers') ,$message_final, 'customers_id='.$_id) ){ 604 $messageStack->add_session(sprintf(__('error in process notification for %s'), STORE_OWNER .' '. STORE_OWNER_EMAIL_ADDRESS ), 'error'); 605 } 606 607 $messageStack->add_session(__('customers save success'), 'success'); 608 597 $myarray['from']=STORE_OWNER; 598 $myarray['email_use_html']=_cst_bool('EMAIL_USE_HTML'); 599 $myarray['message']=$message_final; 600 601 if( ! notification::notifInMess('admin_new_customers',__('subject copy creat new compte for customers') ,$message_final, 'customers_id='.$_id) ){ 602 $messageStack->add_session(sprintf(__('error in process notification for %s'), STORE_OWNER .' '. STORE_OWNER_EMAIL_ADDRESS ), 'error'); 603 } 604 605 $messageStack->add(__('customers save success'), 'success'); 606 // print_r($_SESSION); 607 // exit; 609 608 if(isset($_POST['up_and_close']) ) tep_redirect(tep_href_link(self::FILENAME)); 610 609 else tep_redirect(tep_href_link(self::FILENAME, 'cID=' .$_id.'&action=edit')); -
branches/2.1.1/catalog/admin/includes/modules/pages/products.php
r4590 r4596 708 708 } 709 709 710 if(!isset($_GET['forceajax'])){ 711 $messageStack->add_session(__('@product update status product'), 'success'); 710 $messageStack->add(__('@product update status product'), 'success'); 711 712 if(!isset($_GET['forceajax'])) 712 713 tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('action','cPath','pID','setflag','flag'), false) )); 713 }714 else715 $messageStack->add(__('@product update status product'), 'success');716 717 714 break; 718 715 … … 795 792 $params['language_id']= $languages_id; 796 793 797 794 // unset($_GET['forceajax']); // = true; 798 795 if( ! sqlproduct::update( $params ) ) 799 $messageStack->add _session(__('@product error in update process'), 'error');796 $messageStack->add(__('@product error in update process'), 'error'); 800 797 else 801 $messageStack->add_session(__('@product success in update process'), 'success'); 802 798 $messageStack->add(__('@product success in update process'), 'success'); 803 799 804 800 /** … … 809 805 810 806 811 if(isset($_POST['up_and_close']) ) tep_redirect(tep_href_link(self::FILENAME, 'pID=' . $products_id)); 812 else tep_redirect(tep_href_link(self::FILENAME, 'pID=' . $products_id.'&action=edit' )); 807 if(isset($_POST['up_and_close']) ) 808 tep_redirect(tep_href_link(self::FILENAME, 'pID=' . $products_id)); 809 else 810 tep_redirect(tep_href_link(self::FILENAME, 'pID=' . $products_id.'&action=edit' )); 813 811 814 812 break; -
branches/2.1.1/catalog/admin/includes/modules/products/header_tags.php
r4580 r4596 165 165 */ 166 166 public function delete_product($products_id){ 167 $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 . "' "); 168 $products = tep_db_fetch_array($products_query); 169 // $products['tag_id']; 170 171 tep_db_query("DELETE FROM ".TABLE_FULL_TAG_DESCRIPTION." WHERE tag_id ='".(int)$products['tag_id']."' " ); 172 173 return tep_db_query("DELETE FROM ".TABLE_FULL_TAG." ft WHERE ft.page_type='product' and ft.page_id ='".(int)$products_id."' " ); 167 $products_query = tep_db_query($sql = "SELECT tag_id FROM " . TABLE_FULL_TAG . " ft WHERE ft.page_type='product' and ft.page_id = '" . (int)$products_id . "' "); 168 169 170 if($products_query->__get('numRows')) { 171 $products = tep_db_fetch_array($products_query); 172 173 174 tep_db_query("DELETE FROM ".TABLE_FULL_TAG_DESCRIPTION." WHERE tag_id ='".(int)$products['tag_id']."' " ); 175 176 $res = tep_db_query("DELETE FROM ".TABLE_FULL_TAG." WHERE tag_id ='".(int)$products['tag_id']."' " ); 177 178 return $res; 179 } 180 181 return true; 174 182 } 175 183 -
branches/2.1.1/catalog/admin/includes/template/defaut/css/less/datatable.less
r4592 r4596 383 383 } 384 384 385 386 387 .TableTools_PrintInfo { 388 position: absolute; 385 /* Buttons are cunning border-box sizing - we can't just use that for A and DIV due to IE6/7 */ 386 button.DTTT_button { 387 height: 30px; 388 padding: 3px 8px; 389 } 390 391 .DTTT_button embed { 392 outline: none; 393 } 394 395 button.DTTT_button:hover, 396 div.DTTT_button:hover, 397 a.DTTT_button:hover { 398 border: 1px solid #666; 399 text-decoration: none !important; 400 401 -webkit-box-shadow: 1px 1px 3px #999; 402 -moz-box-shadow: 1px 1px 3px #999; 403 -ms-box-shadow: 1px 1px 3px #999; 404 -o-box-shadow: 1px 1px 3px #999; 405 box-shadow: 1px 1px 3px #999; 406 407 background: #f3f3f3; /* Old browsers */ 408 background: -webkit-linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* Chrome10+,Safari5.1+ */ 409 background: -moz-linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* FF3.6+ */ 410 background: -ms-linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* IE10+ */ 411 background: -o-linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* Opera 11.10+ */ 412 background: linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* W3C */ 413 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f3f3f3', endColorstr='#f4f4f4',GradientType=0 ); /* IE6-9 */ 414 } 415 416 button.DTTT_disabled, 417 div.DTTT_disabled, 418 a.DTTT_disabled { 419 color: #999; 420 border: 1px solid #d0d0d0; 421 422 background: #ffffff; /* Old browsers */ 423 background: -webkit-linear-gradient(top, #ffffff 0%,#f9f9f9 89%,#fafafa 100%); /* Chrome10+,Safari5.1+ */ 424 background: -moz-linear-gradient(top, #ffffff 0%,#f9f9f9 89%,#fafafa 100%); /* FF3.6+ */ 425 background: -ms-linear-gradient(top, #ffffff 0%,#f9f9f9 89%,#fafafa 100%); /* IE10+ */ 426 background: -o-linear-gradient(top, #ffffff 0%,#f9f9f9 89%,#fafafa 100%); /* Opera 11.10+ */ 427 background: linear-gradient(top, #ffffff 0%,#f9f9f9 89%,#fafafa 100%); /* W3C */ 428 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#fafafa',GradientType=0 ); /* IE6-9 */ 429 } 430 431 432 433 .DTTT_print_info { 434 position: fixed; 389 435 top: 50%; 390 436 left: 50%; … … 394 440 margin-top: -75px; 395 441 text-align: center; 396 background-color: #3f3f3f; 397 color: white; 442 color: #333; 398 443 padding: 10px 30px; 444 445 background: #ffffff; /* Old browsers */ 446 background: -webkit-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* Chrome10+,Safari5.1+ */ 447 background: -moz-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* FF3.6+ */ 448 background: -ms-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* IE10+ */ 449 background: -o-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* Opera 11.10+ */ 450 background: linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* W3C */ 451 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f9f9f9',GradientType=0 ); /* IE6-9 */ 399 452 400 453 opacity: 0.9; … … 409 462 } 410 463 411 . TableTools_PrintInfo h6 {464 .DTTT_print_info h6 { 412 465 font-weight: normal; 413 466 font-size: 28px; … … 416 469 } 417 470 418 . TableTools_PrintInfo p {471 .DTTT_print_info p { 419 472 font-size: 14px; 420 473 line-height: 20px; -
branches/2.1.1/catalog/common/classes/ExtraUtility.php
r4389 r4596 182 182 default: 183 183 184 $input .= tep_draw_input_field('fields_' . $rows->id. (($rows->active_value_language)? '['.$rows->languages_id.']': '') ,'fields_' . $rows->id ,$rows->input_value ). $flag_r;184 $input .= tep_draw_input_field('fields_' . $rows->id. (($rows->active_value_language)? '['.$rows->languages_id.']': '') ,'fields_' . $rows->id ,$rows->input_value,'', $rows->required_status). $flag_r; 185 185 } 186 186