Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
datazen committed Feb 11, 2014
2 parents f0c240f + 3603124 commit ee3e936
Show file tree
Hide file tree
Showing 666 changed files with 29,170 additions and 7,145 deletions.
407 changes: 203 additions & 204 deletions catalog/admin/external/tiny_mce/themes/backup.php

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@author Loaded Commerce
@copyright Copyright 2003-2014 Loaded Commerce, LLC
@copyright Portions Copyright 2003 osCommerce
@copyright Template built on Developr theme by DisplayInline http://themeforest.net/user/displayinline under Extended license
@license https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt
@version $Id: backup.php v1.0 2013-08-08 datazen $
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@

<?php
foreach ( $lC_Language->getAll() as $l ) {
$lid = $l['id'];
if (ENABLE_EDITOR == '1') {
echo "CKEDITOR.replace('branding_home_page_text[$lid]', { customConfig: './configfulleditor.js', height: 200, width: '99%', filebrowserUploadUrl: '../ext/jquery/ckeditor/ck_upload.php' });";
if (ENABLE_EDITOR == 1 && EDITOR_CONFIGURATION_HOMEPAGE != 'Off') {
echo "CKEDITOR.replace('branding_home_page_text[" . $l['id'] . "]', { toolbar: '" . EDITOR_CONFIGURATION_HOMEPAGE . "', height: 200, width: '99.9%', filebrowserUploadUrl: '../ext/jquery/ckeditor/ck_upload.php', contentsCss: '../templates/" . DEFAULT_TEMPLATE . "/css/styles.css', stylesSet: [] });";
} else {
echo '$("#branding_home_page_text[$lid]").css("height", "200px").css("width", "99.8%");';
echo '$("#branding_home_page_text[' . $l['id'] . ']").css("height", "200px").css("width", "99.9%");';
}
}
?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<div id="tab-<?php echo $l['id'];?>" class="with-padding">
<span class="required full-width autoexpanding mid-margin-bottom">
<label for="ckEditor_branding_home_page_text[<?php echo $l['id'];?>]"></label>
<?php echo lc_draw_textarea_field('branding_home_page_text[' . $l['id'] . ']', (isset($bInfo) && isset($bInfo[$l['id']]['homepage_text']) ? $bInfo[$l['id']]['homepage_text'] : null), 48, 2, 'id="ckEditor_branding_home_page_text[' . $l['id'] . ']" class="required input-unstyled full-width autoexpanding"'); ?>
<?php echo lc_draw_textarea_field('branding_home_page_text[' . $l['id'] . ']', (isset($bInfo) && isset($bInfo[$l['id']]['homepage_text']) ? $bInfo[$l['id']]['homepage_text'] : null), 48, 2, 'id="ckEditor_branding_home_page_text[' . $l['id'] . ']" class="required input full-width autoexpanding"'); ?>
</span>
</div>
<?php
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@license https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt
@version $Id: categories.js.php v1.0 2013-08-08 datazen $
*/
global $lC_Template, $lC_Language, $lC_ObjectInfo;
global $lC_Template, $lC_Language, $cInfo;
?>
<script>
function _refreshDataTable() {
Expand Down Expand Up @@ -78,14 +78,14 @@ function (data) {
?>
createUploader();
<?php
if (ENABLE_EDITOR == '1') {
if (USE_DEFAULT_TEMPLATE_STYLESHEET == "1") {
if (ENABLE_EDITOR == 1 && EDITOR_CONFIGURATION_CATEGORY != 'Off') {
if (USE_DEFAULT_TEMPLATE_STYLESHEET == 1) {
foreach ( $lC_Language->getAll() as $l ) {
echo "CKEDITOR.replace('ckEditorCategoriesDescription_" . $l['id'] . "', { height: 200, width: '99%', filebrowserUploadUrl: '../ext/jquery/ckeditor/ck_upload.php', extraPlugins: 'stylesheetparser', contentsCss: '../templates/" . $lC_Template->getCode($lC_Template->getID) . "/css/styles.css', stylesSet: [] });";
echo "CKEDITOR.replace('ckEditorCategoriesDescription_" . $l['id'] . "', { toolbar: '" . EDITOR_CONFIGURATION_CATEGORY . "', height: 200, width: '99%', filebrowserUploadUrl: '../ext/jquery/ckeditor/ck_upload.php', contentsCss: '../templates/" . DEFAULT_TEMPLATE . "/css/styles.css', stylesSet: [] });";
}
} else {
foreach ( $lC_Language->getAll() as $l ) {
echo "CKEDITOR.replace('ckEditorCategoriesDescription_" . $l['id'] . "', { height: 200, width: '99%', filebrowserUploadUrl: '../ext/jquery/ckeditor/ck_upload.php' });";
echo "CKEDITOR.replace('ckEditorCategoriesDescription_" . $l['id'] . "', { toolbar: '" . EDITOR_CONFIGURATION_CATEGORY . "', height: 200, width: '99%', filebrowserUploadUrl: '../ext/jquery/ckeditor/ck_upload.php' });";
}
}
} else {
Expand Down Expand Up @@ -318,13 +318,15 @@ function validatePermalink(pl) {
return false;
}

<?php
foreach ( $lC_Language->getAll() as $l ) {
<?php
if (!$cInfo) {
foreach ( $lC_Language->getAll() as $l ) {
?>
$("#categories_name_<?php echo $l['id']; ?>").blur(function(){
$("#categories_permalink_<?php echo $l['id']; ?>").val($("#categories_name_<?php echo $l['id']; ?>").val().toLowerCase().replace(/ /g, '-').replace(/[^a-z0-9-]/g, ''));
});
<?php
<?php
}
}
}
?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ public static function getZones($id) {
public static function save($id = null, $data, $send_email = true) {
global $lC_Database, $lC_Language, $lC_DateTime;

$lC_Language->loadIniFile('customers.php');

$error = false;
$result = array();

Expand Down Expand Up @@ -492,7 +494,8 @@ public static function save($id = null, $data, $send_email = true) {
$email_text .= sprintf($lC_Language->get('email_greet_general'), $full_name) . "\n\n";
}
$email_text .= sprintf($lC_Language->get('email_text'), STORE_NAME, STORE_OWNER_EMAIL_ADDRESS, trim($data['password']));
lc_email($full_name, $data['email_address'], $lC_Language->get('email_subject'), $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
$email_subject = sprintf($lC_Language->get('email_subject'), STORE_NAME);
lc_email($full_name, $data['email_address'], $email_subject, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
@license https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt
@version $Id: image_groups.php v1.0 2013-08-08 datazen $
*/
require($lC_Vqmod->modCheck('includes/applications/images/classes/images.php'));

class lC_Image_groups_Admin {
/*
* Returns the image groups datatable data for listings
Expand Down
39 changes: 38 additions & 1 deletion catalog/admin/includes/applications/image_groups/classes/rpc.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,43 @@ public static function batchDelete() {
}

echo json_encode($result);
}
}
/*
* Checks for images
*
* @access public
* @return json
*/
public static function checkImages() {
$result = lC_Images_Admin::check();
$result['rpcStatus'] = RPC_STATUS_SUCCESS;

echo json_encode($result);
}
/*
* Returns the data used on the resize dialog form
*
* @access public
* @return json
*/
public static function getResizeInfo() {
$result = lC_Images_Admin::getInfo();
$result['rpcStatus'] = RPC_STATUS_SUCCESS;

echo json_encode($result);
}
/*
* Resize images
*
* @access public
* @return json
*/
public static function resizeImages() {
$result = lC_Images_Admin::resizeBatch();
$result['rpcStatus'] = RPC_STATUS_SUCCESS;

echo json_encode($result);
}

}
?>
175 changes: 175 additions & 0 deletions catalog/admin/includes/applications/image_groups/modal/run.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
<?php
/**
@package catalog::admin::applications
@author Loaded Commerce
@copyright Copyright 2003-2014 Loaded Commerce, LLC
@copyright Portions Copyright 2003 osCommerce
@copyright Template built on Developr theme by DisplayInline http://themeforest.net/user/displayinline under Extended license
@license https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt
@version $Id: run.php v1.0 2013-08-08 datazen $
*/
?>
<style>
#runGroup { padding-bottom:20px; }
</style>
<script>
function doAction(id) {
var accessLevel = '<?php echo $_SESSION['admin']['access'][$lC_Template->getModule()]; ?>';
if (parseInt(accessLevel) < 2) {
$.modal.alert('<?php echo $lC_Language->get('ms_error_no_access');?>');
return false;
}
if (id == 'check') {
$.modal({
content: '<div id="checkContent">'+
' <style>'+
' .dataColGroup { text-align: left; }'+
' .dataColTotal { text-align: center; }'+
' #imagesCheckDataTable TD { padding: 5px 0 0 0; }'+
' #imagesCheckDataTable thead { border-bottom: 1px solid grey; }'+
' </style>'+
' <div class="checkPageContainer">'+
' <table border="0" width="100%" cellspacing="0" cellpadding="0" class="display" id="imagesCheckDataTable">'+
' <thead>'+
' <tr>'+
' <th align="left" style="font-weight:bold;"><?php echo $lC_Language->get('table_heading_groups'); ?></th>'+
' <th align="center" style="font-weight:bold;"><?php echo $lC_Language->get('table_heading_totals'); ?></th>'+
' </tr>'+
' </thead>'+
' <tbody></tbody>'+
' <tfoot></tfoot>'+
' </table>'+
' </div>'+
'</div>',
title: '<?php echo $lC_Language->get('modal_heading_check_images'); ?>',
width: 500,
actions: {
'Close' : {
color: 'red',
click: function(win) { win.closeModal(); }
}
},
buttons: {
'<?php echo $lC_Language->get('button_close'); ?>': {
classes: 'glossy',
click: function(win) { win.closeModal(); }
}
},
buttonsLowPadding: true
});
var dataTableDataURL = '<?php echo lc_href_link_admin('rpc.php', $lC_Template->getModule() . '=' . $_GET[$lC_Template->getModule()] . '&action=checkImages'); ?>';
oTable = $('#imagesCheckDataTable').dataTable({
"bProcessing": true,
"sAjaxSource": dataTableDataURL,
"bPaginate": false,
"bLengthChange": false,
"bFilter": false,
"bSort": false,
"bInfo": false,
"bAutoWidth": false,
"bDestroy": true,
"aoColumns": [{ "sWidth": "400px", "sClass": "dataColGroup" },
{ "sWidth": "400px", "sClass": "dataColTotal" }]
});
if ($.template.mediaQuery.isSmallerThan('tablet-portrait')) {
$('.modal').attr('style', 'top:20% !important; left: 19%; margin-left: -50px;');
}
} else {
var jsonLink = '<?php echo lc_href_link_admin('rpc.php', $lC_Template->getModule() . '&action=getResizeInfo'); ?>'
$.getJSON(jsonLink,
function (data) {
if (data.rpcStatus == -10) { // no session
var url = "<?php echo lc_href_link_admin(FILENAME_DEFAULT, 'login'); ?>";
$(location).attr('href',url);
}
$.modal({
content: '<div id="resizeContent">'+
' <div class="resizePageContainer">'+
' <div id="statusResults" class="dataTables_processing" style="display:none;"><?php echo $lC_Language->get('icon_processing'); ?></div>'+
' <form name="resizeInfo" id="resizeInfo" action="" method="post">'+
' <div id="resizeSelection"></div>'+
' </form>'+
' </div>'+
'</div>',
title: '<?php echo $lC_Language->get('modal_heading_resize_images'); ?>',
width: 500,
actions: {
'Close' : {
color: 'red',
click: function(win) { win.closeModal(); }
}
},
buttons: {
'<?php echo $lC_Language->get('button_close'); ?>': {
classes: 'glossy',
click: function(win) { win.closeModal(); }
},
'<?php echo $lC_Language->get('button_execute'); ?>': {
classes: 'blue-gradient glossy',
click: function(win) {
var nvp = $("#resizeInfo").serialize();
var jsonLink = '<?php echo lc_href_link_admin('rpc.php', $lC_Template->getModule() . '&action=resizeImages&BATCH'); ?>'
$.getJSON(jsonLink.replace('BATCH', nvp),
function (rdata) {
if (rdata.rpcStatus == -10) { // no session
var url = "<?php echo lc_href_link_admin(FILENAME_DEFAULT, 'login'); ?>";
$(location).attr('href',url);
}
win.closeModal();
// we want to display the result listing html
$.modal({
content: '<div id="resizeResultsContent">'+
' <style>'+
' .dataColResultsGroup { text-align: left; }'+
' .dataColResultsTotal { text-align: center; }'+
' #resizeResultsDataTable TD { padding: 5px 0 0 0; }'+
' #resizeResultsDataTable thead { border-bottom: 1px solid grey; }'+
' </style>'+
' <div class="resizeResultsPageContainer">'+
' <table border="0" width="100%" cellspacing="0" cellpadding="0" class="display" id="resizeResultsDataTable">'+
' <thead>'+
' <tr>'+
' <th align="left" style="font-weight:bold;"><?php echo $lC_Language->get('table_heading_groups'); ?></th>'+
' <th align="center" style="font-weight:bold;"><?php echo $lC_Language->get('table_heading_total_resized'); ?></th>'+
' </tr>'+
' </thead>'+
' <tbody id="resizeResultsTbody"></tbody>'+
' <tfoot></tfoot>'+
' </table>'+
' </div>'+
'</div>',
title: '<?php echo $lC_Language->get('modal_heading_resize_images'); ?>',
width: 500,
actions: {
'Close' : {
color: 'red',
click: function(win) { win.closeModal(); }
}
},
buttons: {
'<?php echo $lC_Language->get('button_close'); ?>': {
classes: 'glossy',
click: function(win) { win.closeModal(); }
}
},
buttonsLowPadding: true
});
$("#resizeResultsTbody").html(rdata.html);
}
);

win.closeModal();
}
}
},
buttonsLowPadding: true
});
$("#resizeSelection").html(data.html);
if ($.template.mediaQuery.isSmallerThan('tablet-portrait')) {
$('.modal').attr('style', 'top:20% !important; left: 19%; margin-left: -50px;');
}
}
);
}
}
</script>
13 changes: 10 additions & 3 deletions catalog/admin/includes/applications/image_groups/pages/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,18 @@
<div id="buttons-container" style="position: relative;" class="clear-both">
<div style="float:right;">
<p class="button-height" align="right">
<a class="button<?php echo (((int)$_SESSION['admin']['access']['product_settings'] < 2) ? ' disabled' : NULL); ?>" href="<?php echo (((int)$_SESSION['admin']['access']['product_settings'] < 2) ? '#' : 'javascript://" onclick="newGroup(); return false;'); ?>">
<a class="button" href="javascript://" onclick=" doAction('check','check'); return false;">
<span class="button-icon blue-gradient">
<span class="icon-tick"></span>
</span>Check</a>&nbsp;
<a class="button" href="javascript://" onclick=" doAction('resize','resize'); return false;">
<span class="button-icon red-gradient">
<span class="icon-cycle"></span>
</span>Resize</a>&nbsp;
<a class="button" href="javascript://" onclick="newGroup(); return false;">
<span class="button-icon green-gradient">
<span class="icon-plus"></span>
</span><?php echo $lC_Language->get('button_new_group'); ?>
</a>&nbsp;
</span>New Group</a>&nbsp;
</p>
</div>
</div>
Expand Down
3 changes: 3 additions & 0 deletions catalog/admin/includes/applications/login/classes/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ private static function _timeToCheck() {
$check = (defined('INSTALLATION_ID') && INSTALLATION_ID != '') ? INSTALLATION_ID : NULL;
if ($check == NULL) return TRUE;

if (defined('ADDONS_SYSTEM_LOADED_7_PRO_STATUS') && !file_exists(DIR_FS_CATALOG . 'addons/Loaded_7_Pro/controller.php')) return TRUE;
if (defined('ADDONS_SYSTEM_LOADED_7_B2B_STATUS') && !file_exists(DIR_FS_CATALOG . 'addons/Loaded_7_B2B/controller.php')) return TRUE;

$Qcheck = $lC_Database->query('select * from :table_configuration where configuration_key = :configuration_key limit 1');
$Qcheck->bindTable(':table_configuration', TABLE_CONFIGURATION);
$Qcheck->bindValue(':configuration_key', 'INSTALLATION_ID');
Expand Down
14 changes: 8 additions & 6 deletions catalog/admin/includes/applications/products/actions/save.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ public function __construct() {
if (isset($_POST['sub_products_id']) && $_POST['sub_products_id'] != NULL) $data['sub_products_id'] = $_POST['sub_products_id'];
if (isset($_POST['sub_products_cost']) && $_POST['sub_products_cost'] != NULL) $data['sub_products_cost'] = $_POST['sub_products_cost'];
if (isset($_POST['sub_products_price']) && $_POST['sub_products_price'] != NULL) $data['sub_products_price'] = $_POST['sub_products_price'];
}
}

// qpb
if (isset($_POST['products_qty_break_point']) && $_POST['products_qty_break_point'] != NULL) $data['products_qty_break_point'] = $_POST['products_qty_break_point'];
if (isset($_POST['products_qty_break_price']) && $_POST['products_qty_break_price'] != NULL) $data['products_qty_break_price'] = $_POST['products_qty_break_price'];

// multi SKU combo
if ($has_variants === true) {
Expand Down Expand Up @@ -140,15 +144,13 @@ public function __construct() {
}

if ( $error === false ) {
// the line below is used as a hook match point - do not not modify or remove
$id = lC_Products_Admin::save((isset($_GET[$this->_module]) && is_numeric($_GET[$this->_module]) ? $_GET[$this->_module] : null), $data);

if ( is_numeric($id) ) {

if(empty($_POST['save_close'])){

lc_redirect_admin(lc_href_link_admin(FILENAME_DEFAULT, $this->_module . '='.$id.'&action=save&cID=' . $_GET['cID']));

}else{

} else {
lc_redirect_admin(lc_href_link_admin(FILENAME_DEFAULT, $this->_module . '&cID=' . $_GET['cID']));
}
} else {
Expand Down
Loading

0 comments on commit ee3e936

Please sign in to comment.