This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author mrdoob / http://mrdoob.com/ | |
* @author supereggbert / http://www.paulbrunt.co.uk/ | |
* @author julianwa / https://github.com/julianwa | |
*/ | |
THREE.RenderableObject = function () { | |
this.id = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author Eberhard Graether / http://egraether.com/ | |
* @author Mark Lundin / http://mark-lundin.com | |
* @author Simone Manini / http://daron1337.github.io | |
* @author Luca Antiga / http://lantiga.github.io | |
*/ | |
THREE.TrackballControls = function ( object, domElement ) { | |
var _this = this; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
var tableRows = $('table tbody tr'); | |
for (var i = 0; i <= tableRows.length; i++) { | |
$(tableRows[i]).attr('id', 'tableRowId_' + i.toString()); | |
$($(tableRows[i]).find('td')[ 1 ]).attr('id', 'table_item_id_' + i.toString()); | |
$($(tableRows[i]).find('td')[ 3 ]).attr('id', i.toString()) | |
.attr('class', 'table_item_tracking_number') | |
.attr('onclick', ''); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//I know, it's horrible | |
if ($_POST['action']=='ajaxOrderUpdate'){ | |
$orderId = $_POST['order_id']; | |
$changeTo = $_POST['change_to']; | |
Db::getInstance()->update('order_carrier', array( | |
'tracking_number' => $changeTo, | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Stolen from http://stackoverflow.com/questions/24020254/async-true-for-css-link-tag | |
var resource = document.createElement('link'); | |
resource.setAttribute("rel", "stylesheet"); | |
resource.setAttribute("href","path/to/cssfile.css"); | |
resource.setAttribute("type","text/css"); | |
var head = document.getElementsByTagName('head')[0]; | |
head.appendChild(resource); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function processGenerateDeliverySlipPDF() | |
{ | |
if (Tools::isSubmit('id_order')) | |
$this->generateDeliverySlipPDFByIdOrder((int)Tools::getValue('id_order')); | |
elseif (Tools::isSubmit('id_order_invoice')) | |
$this->generateDeliverySlipPDFByIdOrderInvoice((int)Tools::getValue('id_order_invoice')); | |
elseif (Tools::isSubmit('id_delivery')) | |
{ | |
$order = Order::getByDelivery((int)Tools::getValue('id_delivery')); | |
$this->generateDeliverySlipPDFByIdOrder((int)$order->id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Old piece of code | |
if ($_FILES['uploaded_icon']['tmp_name'] && $_FILES['uploaded_icon']['size'] > 0 && $_FILES['uploaded_icon']['size'] < 10000000) { | |
//destroy the old file if exists | |
$has_icon = "SELECT icon FROM articles WHERE id_article=".$_POST['id_art']; | |
$db_response = $db->Execute($has_icon); | |
if ($db_response->fields[icon] !== NULL) { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
private function checkAndAddAttributeImage($id_attribute, $attribute_image) | |
{ | |
//update scenario | |
if ($id_attribute !== false) { | |
if ($attribute_image['error'] === 0) | |
{ | |
if ($attribute_image['type'] == 'image/jpeg' || $attribute_image['type'] == 'image/png') | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
foreach ($groups as &$group) { | |
foreach ($group['attributes'] as $index => &$value) { | |
$sql = new DbQuery(); | |
$sql->select('image_available, image_name, image_extension, a.id_attribute'); | |
$sql->from('attribute_lang', 'l'); | |
$sql->leftJoin('attribute', 'a', 'l.id_attribute = a.id_attribute'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Apply tooltipster only if an element contains image and if so, make the tooltip display this image. | |
$(document).ready(function() { | |
var attributesArray = $('.group-attribute-li').toArray(); | |
$.each(attributesArray, function(index, attribute) { | |
var attributeImage = $(attribute).find('.tooltip-image'); | |
if (attributeImage.length) { | |
$(attribute).tooltipster({ | |
content: $('<img style="max-width: 100px; height: auto;" class="tooltip-image" src="'+ attributeImage.attr('src') +'" />') |
OlderNewer