Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of git://github.com/osCommerce/oscommerce

Conflicts:
	osCommerce/OM/Core/Site/Admin/Application/Administrators/pages/main.php
	osCommerce/OM/Core/Site/Admin/Application/Configuration/pages/main.php
	osCommerce/OM/Core/Site/Admin/Application/CoreUpdate/pages/main.php
	osCommerce/OM/Core/Site/Admin/Application/Countries/pages/main.php
	osCommerce/OM/Core/Site/Admin/Application/CreditCards/pages/main.php
	osCommerce/OM/Core/Site/Admin/Application/Currencies/pages/main.php
	osCommerce/OM/Core/Site/Admin/Application/ErrorLog/pages/main.php
	osCommerce/OM/Core/Site/Admin/Application/Languages/pages/main.php
	osCommerce/OM/Core/Site/Admin/Application/PaymentModules/pages/main.php
	osCommerce/OM/Core/Site/Admin/Application/ServerInfo/Model/getAll.php
	osCommerce/OM/Core/Site/Admin/Application/ServerInfo/pages/main.php
	osCommerce/OM/Core/Site/Admin/Application/TaxClasses/pages/main.php
	osCommerce/OM/Core/Site/Admin/Application/ZoneGroups/pages/main.php
	osCommerce/OM/Core/Site/Admin/languages/en_US.php

Signed-off-by: Gergely <t-gely@freemail.hu>
  • Loading branch information...
commit bd6fe5c4a84cb3f33bd43964bde201b8e1fa5a78 2 parents d33118c + 40ba947
@tgely authored
Showing with 205 additions and 151 deletions.
  1. +0 −7 osCommerce/OM/Config/settings.ini
  2. +1 −0  osCommerce/OM/Core/ErrorHandler.php
  3. +5 −1 osCommerce/OM/Core/HttpRequest/HttpRequest.php
  4. +34 −12 osCommerce/OM/Core/OSCOM.php
  5. +23 −8 osCommerce/OM/Core/Session/Database.php
  6. +28 −0 osCommerce/OM/Core/Session/Database/SQL/MySQL/Standard/Check.php
  7. +21 −8 osCommerce/OM/Core/Session/File.php
  8. +29 −31 osCommerce/OM/Core/SessionAbstract.php
  9. +1 −1  osCommerce/OM/Core/Site/Admin/Application/Administrators/pages/main.php
  10. +1 −1  osCommerce/OM/Core/Site/Admin/Application/Configuration/pages/entries.php
  11. +1 −1  osCommerce/OM/Core/Site/Admin/Application/Configuration/pages/main.php
  12. +1 −1  osCommerce/OM/Core/Site/Admin/Application/CoreUpdate/pages/main.php
  13. +1 −1  osCommerce/OM/Core/Site/Admin/Application/CoreUpdate/pages/package_contents.php
  14. +1 −1  osCommerce/OM/Core/Site/Admin/Application/Countries/pages/main.php
  15. +1 −1  osCommerce/OM/Core/Site/Admin/Application/Countries/pages/zones.php
  16. +1 −1  osCommerce/OM/Core/Site/Admin/Application/CreditCards/pages/main.php
  17. +1 −1  osCommerce/OM/Core/Site/Admin/Application/Currencies/pages/main.php
  18. +1 −1  osCommerce/OM/Core/Site/Admin/Application/ErrorLog/pages/main.php
  19. +1 −1  osCommerce/OM/Core/Site/Admin/Application/Languages/pages/definitions.php
  20. +1 −1  osCommerce/OM/Core/Site/Admin/Application/Languages/pages/groups.php
  21. +1 −1  osCommerce/OM/Core/Site/Admin/Application/Languages/pages/main.php
  22. +1 −1  osCommerce/OM/Core/Site/Admin/Application/PaymentModules/pages/install.php
  23. +1 −1  osCommerce/OM/Core/Site/Admin/Application/PaymentModules/pages/main.php
  24. +2 −5 osCommerce/OM/Core/Site/Admin/Application/ServerInfo/Model/getAll.php
  25. +1 −1  osCommerce/OM/Core/Site/Admin/Application/ServerInfo/pages/main.php
  26. +1 −1  osCommerce/OM/Core/Site/Admin/Application/TaxClasses/pages/entries.php
  27. +1 −1  osCommerce/OM/Core/Site/Admin/Application/TaxClasses/pages/main.php
  28. +1 −1  osCommerce/OM/Core/Site/Admin/Application/ZoneGroups/pages/entries.php
  29. +1 −1  osCommerce/OM/Core/Site/Admin/Application/ZoneGroups/pages/main.php
  30. +3 −3 osCommerce/OM/Core/Site/Admin/languages/en_US.php
  31. +1 −0  osCommerce/OM/Core/Site/Admin/templates/oscom.php
  32. +9 −2 osCommerce/OM/Core/Site/Admin/templates/oscom/header.php
  33. +10 −24 osCommerce/OM/Core/Site/Setup/Application/Install/pages/step_3.php
  34. +1 −1  osCommerce/OM/Core/Site/Shop/ShoppingCart.php
  35. +6 −0 public/external/jquery/jquery.placeholder.min.js
  36. +4 −18 public/sites/Admin/javascript/general.js
  37. BIN  public/sites/Admin/templates/oscom/images/adminmenubg.png
  38. +5 −10 public/sites/Admin/templates/oscom/stylesheets/general.css
  39. BIN  public/sites/Shop/images/worldflags/fx.png
  40. +3 −1 public/sites/Shop/javascript/products/info.js
View
7 osCommerce/OM/Config/settings.ini
@@ -3,13 +3,6 @@ bootstrap_file = "index.php"
default_site = "Setup"
time_zone = "UTC"
-[RPC]
-enable_ssl = "false"
-http_server = ""
-dir_ws_http_server = ""
-http_cookie_domain = ""
-http_cookie_path = ""
-
[Setup]
enable_ssl = "false"
http_server = ""
View
1  osCommerce/OM/Core/ErrorHandler.php
@@ -17,6 +17,7 @@ class ErrorHandler {
public static function initialize() {
ini_set('display_errors', false);
+ ini_set('html_errors', false);
if ( is_writable(OSCOM::BASE_DIRECTORY . 'Work/Logs') ) {
ini_set('log_errors', true);
View
6 osCommerce/OM/Core/HttpRequest/HttpRequest.php
@@ -16,7 +16,11 @@ public static function execute($parameters) {
$h = new \HttpRequest($parameters['server']['scheme'] . '://' . $parameters['server']['host'] . $parameters['server']['path'] . (isset($parameters['server']['query']) ? '?' . $parameters['server']['query'] : ''), static::$_methods[$parameters['method']], array('redirect' => 5));
if ( $parameters['method'] == 'post' ) {
- $h->setRawPostData($parameters['parameters']);
+ $post_params = array();
+
+ parse_str($parameters['parameters'], $post_params);
+
+ $h->setPostFields($post_params);
}
$h->send();
View
46 osCommerce/OM/Core/OSCOM.php
@@ -55,20 +55,20 @@ public static function setSite($site = null) {
$site = static::getDefaultSite();
}
} else {
- $site = static::getDefaultSite();
-
if ( !empty($_GET) ) {
$requested_site = HTML::sanitize(basename(key(array_slice($_GET, 0, 1, true))));
if ( static::siteExists($requested_site) ) {
$site = $requested_site;
+ } else {
+ $site = static::getDefaultSite();
}
+ } else {
+ $site = static::getDefaultSite();
}
}
- if ( !empty($site) ) {
- static::$_site = $site;
- }
+ static::$_site = $site;
}
public static function getSite() {
@@ -76,7 +76,26 @@ public static function getSite() {
}
public static function getDefaultSite() {
- return static::getConfig('default_site', 'OSCOM');
+ $site = static::getConfig('default_site', 'OSCOM');
+ $server = HTML::sanitize($_SERVER['SERVER_NAME']);
+
+ $sites = array();
+
+ foreach ( static::$_config as $group => $key ) {
+ if ( isset($key['http_server']) && isset($key['https_server']) ) {
+ if ( ('http://' . $server == $key['http_server']) || ('https://' . $server == $key['https_server']) ) {
+ $sites[] = $group;
+ }
+ }
+ }
+
+ if ( count($sites) > 0 ) {
+ if ( !in_array($site, $sites) ) {
+ $site = $sites[0];
+ }
+ }
+
+ return $site;
}
public static function siteApplicationExists($application) {
@@ -213,16 +232,19 @@ public static function getLink($site = null, $application = null, $parameters =
$search_engine_safe = true;
}
+// Wrapper for RPC links; RPC cannot perform cross domain requests
+ $real_site = ($site == 'RPC') ? $application : $site;
+
if ( $connection == 'AUTO' ) {
- if ( (static::getRequestType() == 'SSL') && (static::getConfig('enable_ssl', $site) == 'true') ) {
- $link = static::getConfig('https_server', $site) . static::getConfig('dir_ws_https_server', $site);
+ if ( (static::getRequestType() == 'SSL') && (static::getConfig('enable_ssl', $real_site) == 'true') ) {
+ $link = static::getConfig('https_server', $real_site) . static::getConfig('dir_ws_https_server', $real_site);
} else {
- $link = static::getConfig('http_server', $site) . static::getConfig('dir_ws_http_server', $site);
+ $link = static::getConfig('http_server', $real_site) . static::getConfig('dir_ws_http_server', $real_site);
}
- } elseif ( ($connection == 'SSL') && (static::getConfig('enable_ssl', $site) == 'true') ) {
- $link = static::getConfig('https_server', $site) . static::getConfig('dir_ws_https_server', $site);
+ } elseif ( ($connection == 'SSL') && (static::getConfig('enable_ssl', $real_site) == 'true') ) {
+ $link = static::getConfig('https_server', $real_site) . static::getConfig('dir_ws_https_server', $real_site);
} else {
- $link = static::getConfig('http_server', $site) . static::getConfig('dir_ws_http_server', $site);
+ $link = static::getConfig('http_server', $real_site) . static::getConfig('dir_ws_http_server', $real_site);
}
$link .= static::getConfig('bootstrap_file', 'OSCOM') . '?';
View
31 osCommerce/OM/Core/Session/Database.php
@@ -12,6 +12,8 @@
/**
* The Session\Database class stores the session data in the database
+ *
+ * @since v3.0.0
*/
class Database extends \osCommerce\OM\Core\SessionAbstract {
@@ -20,7 +22,7 @@ class Database extends \osCommerce\OM\Core\SessionAbstract {
* Initialize database based session storage handler
*
* @param string $name The name of the session
- * @access public
+ * @since v3.0.0
*/
public function __construct($name) {
@@ -35,9 +37,22 @@ public function __construct($name) {
}
/**
+ * Checks if a session exists
+ *
+ * @param string $id The ID of the session
+ * @since v3.0.2
+ */
+
+ public function exists($id) {
+ $data = array('id' => $id);
+
+ return OSCOM::callDB('Session\Database\Check', $data, 'Core');
+ }
+
+/**
* Opens the database based session storage handler
*
- * @access public
+ * @since v3.0.0
*/
public function handlerOpen() {
@@ -47,7 +62,7 @@ public function handlerOpen() {
/**
* Closes the database based session storage handler
*
- * @access public
+ * @since v3.0.0
*/
public function handlerClose() {
@@ -58,7 +73,7 @@ public function handlerClose() {
* Read session data from the database based session storage handler
*
* @param string $id The ID of the session
- * @access public
+ * @since v3.0.0
*/
public function handlerRead($id) {
@@ -82,7 +97,7 @@ public function handlerRead($id) {
*
* @param string $id The ID of the session
* @param string $value The session data to store
- * @access public
+ * @since v3.0.0
*/
public function handlerWrite($id, $value) {
@@ -97,7 +112,7 @@ public function handlerWrite($id, $value) {
* Destroys the session data from the database based session storage handler
*
* @param string $id The ID of the session
- * @access public
+ * @since v3.0.0
*/
public function handlerDestroy($id) {
@@ -108,7 +123,7 @@ public function handlerDestroy($id) {
* Garbage collector for the database based session storage handler
*
* @param string $max_life_time The maxmimum time a session should exist
- * @access public
+ * @since v3.0.0
*/
public function handlerClean($max_life_time) {
@@ -123,7 +138,7 @@ public function handlerClean($max_life_time) {
* Deletes the session data from the database based session storage handler
*
* @param string $id The ID of the session
- * @access public
+ * @since v3.0.0
*/
public function delete($id = null) {
View
28 osCommerce/OM/Core/Session/Database/SQL/MySQL/Standard/Check.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * osCommerce Online Merchant
+ *
+ * @copyright Copyright (c) 2011 osCommerce; http://www.oscommerce.com
+ * @license BSD License; http://www.oscommerce.com/bsdlicense.txt
+ */
+
+ namespace osCommerce\OM\Core\Session\Database\SQL\MySQL\Standard;
+
+ use osCommerce\OM\Core\Registry;
+
+/**
+ * @since v3.0.2
+ */
+
+ class Check {
+ public static function execute($data) {
+ $OSCOM_PDO = Registry::get('PDO');
+
+ $Qsession = $OSCOM_PDO->prepare('select 1 from :table_sessions where id = :id');
+ $Qsession->bindValue(':id', $data['id']);
+ $Qsession->execute();
+
+ return $Qsession->fetch() !== false;
+ }
+ }
+?>
View
29 osCommerce/OM/Core/Session/File.php
@@ -12,6 +12,8 @@
/**
* The Session\File class stores the session data in files
+ *
+ * @since v3.0.0
*/
class File extends \osCommerce\OM\Core\SessionAbstract {
@@ -20,7 +22,7 @@ class File extends \osCommerce\OM\Core\SessionAbstract {
* Holds the file system path where sessions are saved.
*
* @var string
- * @access protected
+ * @since v3.0.0
*/
protected $_save_path;
@@ -29,7 +31,7 @@ class File extends \osCommerce\OM\Core\SessionAbstract {
* Initialize file based session storage handler
*
* @param string $name The name of the session
- * @access public
+ * @since v3.0.0
*/
public function __construct($name) {
@@ -38,9 +40,20 @@ public function __construct($name) {
}
/**
+ * Checks if a session exists
+ *
+ * @param string $id The ID of the session
+ * @since v3.0.2
+ */
+
+ public function exists($id) {
+ return file_exists($this->_save_path . '/' . $id);
+ }
+
+/**
* Deletes an existing session
*
- * @access public
+ * @since v3.0.0
*/
public function destroy() {
@@ -53,7 +66,7 @@ public function destroy() {
* Deletes an existing session from the storage handler
*
* @param string $id The ID of the session
- * @access public
+ * @since v3.0.0
*/
public function delete($id = null) {
@@ -61,16 +74,16 @@ public function delete($id = null) {
$id = $this->_id;
}
- if ( file_exists($this->_save_path . '/' . $id) ) {
- @unlink($this->_save_path . '/' . $id);
+ if ( $this->exists($id) ) {
+ unlink($this->_save_path . '/' . $id);
}
}
/**
* Return the session file based storage location
*
- * @access public
* @return string
+ * @since v3.0.0
*/
public function getSavePath() {
@@ -81,7 +94,7 @@ public function getSavePath() {
* Sets the storage location for the file based storage handler
*
* @param string $path The file path to store the session data in
- * @access public
+ * @since v3.0.0
*/
public function setSavePath($path) {
View
60 osCommerce/OM/Core/SessionAbstract.php
@@ -12,6 +12,8 @@
/**
* The Session class manages the session data and custom storage handlers
+ *
+ * @since v3.0.0
*/
abstract class SessionAbstract {
@@ -20,7 +22,7 @@
* Holds the session cookie parameters (lifetime, path, domain, secure, httponly)
*
* @var array
- * @access protected
+ * @since v3.0.0
*/
protected $_cookie_parameters = array();
@@ -29,7 +31,7 @@
* Defines if the session has been started or not
*
* @var boolean
- * @access protected
+ * @since v3.0.0
*/
protected $_is_started = false;
@@ -38,7 +40,7 @@
* Holds the name of the session
*
* @var string
- * @access protected
+ * @since v3.0.0
*/
protected $_name = 'sid';
@@ -47,7 +49,7 @@
* Holds the session id
*
* @var string
- * @access protected
+ * @since v3.0.0
*/
protected $_id = null;
@@ -56,7 +58,7 @@
* Holds the life time in seconds of the session
*
* @var string
- * @access protected
+ * @since v3.0.0
*/
protected $_life_time;
@@ -64,8 +66,8 @@
/**
* Verify an existing session ID and create or resume the session if the existing session ID is valid
*
- * @access public
* @return boolean
+ * @since v3.0.0
*/
public function start() {
@@ -77,29 +79,25 @@ public function start() {
session_set_cookie_params(0, ((OSCOM::getRequestType() == 'NONSSL') ? OSCOM::getConfig('http_cookie_path') : OSCOM::getConfig('https_cookie_path')), ((OSCOM::getRequestType() == 'NONSSL') ? OSCOM::getConfig('http_cookie_domain') : OSCOM::getConfig('https_cookie_domain')));
- $sane_session_id = true;
+ if ( isset($_GET[$this->_name]) && (empty($_GET[$this->_name]) || !ctype_alnum($_GET[$this->_name]) || !$this->exists($_GET[$this->_name])) ) {
+ unset($_GET[$this->_name]);
+ }
- if ( isset($_GET[$this->_name]) && (empty($_GET[$this->_name]) || !ctype_alnum($_GET[$this->_name])) ) {
- $sane_session_id = false;
- } elseif ( isset($_POST[$this->_name]) && (empty($_POST[$this->_name]) || !ctype_alnum($_POST[$this->_name])) ) {
- $sane_session_id = false;
- } elseif ( isset($_COOKIE[$this->_name]) && (empty($_COOKIE[$this->_name]) || !ctype_alnum($_COOKIE[$this->_name])) ) {
- $sane_session_id = false;
+ if ( isset($_POST[$this->_name]) && (empty($_POST[$this->_name]) || !ctype_alnum($_POST[$this->_name]) || !$this->exists($_POST[$this->_name])) ) {
+ unset($_POST[$this->_name]);
+ }
+ if ( isset($_COOKIE[$this->_name]) && (empty($_COOKIE[$this->_name]) || !ctype_alnum($_COOKIE[$this->_name]) || !$this->exists($_COOKIE[$this->_name])) ) {
setcookie($this->_name, '', time()-42000, $this->getCookieParameters('path'), $this->getCookieParameters('domain'));
}
- if ( $sane_session_id === false ) {
- OSCOM::redirect(OSCOM::getLink(null, OSCOM::getDefaultSiteApplication(), null, 'NONSSL', false));
- } else {
- if ( session_start() ) {
- register_shutdown_function(array($this, 'close'));
+ if ( session_start() ) {
+ register_shutdown_function(array($this, 'close'));
- $this->_is_started = true;
- $this->_id = session_id();
+ $this->_is_started = true;
+ $this->_id = session_id();
- return true;
- }
+ return true;
}
return false;
@@ -108,8 +106,8 @@ public function start() {
/**
* Checks if the session has been started or not
*
- * @access public
* @return boolean
+ * @since v3.0.0
*/
public function hasStarted() {
@@ -119,7 +117,7 @@ public function hasStarted() {
/**
* Closes the session and writes the session data to the storage handler
*
- * @access public
+ * @since v3.0.0
*/
public function close() {
@@ -133,7 +131,7 @@ public function close() {
/**
* Deletes an existing session
*
- * @access public
+ * @since v3.0.0
*/
public function destroy() {
@@ -149,7 +147,7 @@ public function destroy() {
/**
* Delete an existing session and move the session data to a new session with a new session ID
*
- * @access public
+ * @since v3.0.0
*/
public function recreate() {
@@ -161,8 +159,8 @@ public function recreate() {
/**
* Return the session ID
*
- * @access public
* @return string
+ * @since v3.0.0
*/
public function getID() {
@@ -172,8 +170,8 @@ public function getID() {
/**
* Return the name of the session
*
- * @access public
* @return string
+ * @since v3.0.0
*/
public function getName() {
@@ -184,7 +182,7 @@ public function getName() {
* Sets the name of the session
*
* @param string $name The name of the session
- * @access public
+ * @since v3.0.0
*/
public function setName($name) {
@@ -201,7 +199,7 @@ public function setName($name) {
* Sets the life time of the session (in seconds)
*
* @param int $time The life time of the session (in seconds)
- * @access public
+ * @since v3.0.0
*/
public function setLifeTime($time) {
@@ -212,7 +210,7 @@ public function setLifeTime($time) {
* Returns the cookie parameters for the session (lifetime, path, domain, secure, httponly)
*
* @param string $key If specified, return only the value of this cookie parameter setting
- * @access public
+ * @since v3.0.0
*/
public function getCookieParameters($key = null) {
View
2  osCommerce/OM/Core/Site/Admin/Application/Administrators/pages/main.php
@@ -19,7 +19,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="<?php echo OSCOM::getDef('text_search') ?>" /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
<span style="float: right;"><?php echo HTML::button(array('href' => OSCOM::getLink(null, null, 'Save'), 'icon' => 'plus', 'title' => OSCOM::getDef('button_insert'))); ?></span>
</form>
View
2  osCommerce/OM/Core/Site/Admin/Application/Configuration/pages/entries.php
@@ -19,7 +19,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="Search.." /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => 'Reset')); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
<span style="float: right;"><?php echo HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'triangle-1-w', 'title' => OSCOM::getDef('button_back'))); ?></span>
</form>
View
2  osCommerce/OM/Core/Site/Admin/Application/Configuration/pages/main.php
@@ -19,7 +19,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="<?php echo OSCOM::getDef('text_search') ?>" /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
</form>
<div style="padding: 20px 5px 5px 5px; height: 16px;">
View
2  osCommerce/OM/Core/Site/Admin/Application/CoreUpdate/pages/main.php
@@ -19,7 +19,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="<?php echo OSCOM::getDef('text_search') ?>" /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
</form>
<div style="padding: 20px 5px 5px 5px; height: 16px;">
View
2  osCommerce/OM/Core/Site/Admin/Application/CoreUpdate/pages/package_contents.php
@@ -20,7 +20,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="Search.." /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => 'Reset')); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
<span style="float: right;"><?php echo HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'triangle-1-w', 'title' => OSCOM::getDef('button_back'))) . (CoreUpdate::getPackageInfo('version_from') == OSCOM::getVersion() ? ' ' . HTML::button(array('href' => OSCOM::getLink(null, null, 'Apply&Process&v=' . $_GET['v']), 'icon' => 'disk', 'title' => OSCOM::getDef('button_apply_update'))) : ''); ?></span>
</form>
View
2  osCommerce/OM/Core/Site/Admin/Application/Countries/pages/main.php
@@ -19,7 +19,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="<?php echo OSCOM::getDef('text_search') ?>" /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
<span style="float: right;"><?php echo HTML::button(array('href' => OSCOM::getLink(null, null, 'Save'), 'icon' => 'plus', 'title' => OSCOM::getDef('button_insert'))); ?></span>
</form>
View
2  osCommerce/OM/Core/Site/Admin/Application/Countries/pages/zones.php
@@ -19,7 +19,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="Search.." /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => 'Reset')); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
<span style="float: right;"><?php echo HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'triangle-1-w', 'title' => OSCOM::getDef('button_back'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(null, null, 'ZoneSave&id=' . $_GET['id']), 'icon' => 'plus', 'title' => OSCOM::getDef('button_insert'))); ?></span>
</form>
View
2  osCommerce/OM/Core/Site/Admin/Application/CreditCards/pages/main.php
@@ -19,7 +19,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="<?php echo OSCOM::getDef('text_search') ?>" /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
<span style="float: right;"><?php echo HTML::button(array('href' => OSCOM::getLink(null, null, 'Save'), 'icon' => 'plus', 'title' => OSCOM::getDef('button_insert'))); ?></span>
</form>
View
2  osCommerce/OM/Core/Site/Admin/Application/Currencies/pages/main.php
@@ -19,7 +19,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="<?php echo OSCOM::getDef('text_search') ?>" /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
<span style="float: right;"><?php echo HTML::button(array('href' => OSCOM::getLink(null, null, 'UpdateRates'), 'icon' => 'refresh', 'title' => OSCOM::getDef('button_update_currency_exchange_rates'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(null, null, 'Save'), 'icon' => 'plus', 'title' => OSCOM::getDef('button_insert'))); ?></span>
</form>
View
2  osCommerce/OM/Core/Site/Admin/Application/ErrorLog/pages/main.php
@@ -19,7 +19,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="<?php echo OSCOM::getDef('text_search') ?>" /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
<span style="float: right;"><?php echo HTML::button(array('href' => OSCOM::getLink(null, null, 'Delete'), 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))); ?></span>
</form>
View
2  osCommerce/OM/Core/Site/Admin/Application/Languages/pages/definitions.php
@@ -19,7 +19,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="Search.." /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => 'Reset')); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
<span style="float: right;"><?php echo HTML::button(array('href' => OSCOM::getLink(null, null, 'id=' . $_GET['id']), 'priority' => 'secondary', 'icon' => 'triangle-1-w', 'title' => OSCOM::getDef('button_back'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(null, null, 'InsertDefinition&id=' . $_GET['id'] . '&group=' . $_GET['group']), 'icon' => 'plus', 'title' => OSCOM::getDef('button_insert'))); ?></span>
</form>
View
2  osCommerce/OM/Core/Site/Admin/Application/Languages/pages/groups.php
@@ -19,7 +19,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="Search.." /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => 'Reset')); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
<span style="float: right;"><?php echo HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'triangle-1-w', 'title' => OSCOM::getDef('button_back'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(null, null, 'InsertDefinition&id=' . $_GET['id']), 'icon' => 'plus', 'title' => OSCOM::getDef('button_insert'))); ?></span>
</form>
View
2  osCommerce/OM/Core/Site/Admin/Application/Languages/pages/main.php
@@ -19,7 +19,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="<?php echo OSCOM::getDef('text_search') ?>" /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
<span style="float: right;"><?php echo HTML::button(array('href' => OSCOM::getLink(null, null, 'Import'), 'icon' => 'triangle-1-se', 'title' => OSCOM::getDef('button_import'))); ?></span>
</form>
View
2  osCommerce/OM/Core/Site/Admin/Application/PaymentModules/pages/install.php
@@ -19,7 +19,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="Search.." /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => 'Reset')); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
<span style="float: right;"><?php echo HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'triangle-1-w', 'title' => OSCOM::getDef('button_back'))); ?></span>
</form>
View
2  osCommerce/OM/Core/Site/Admin/Application/PaymentModules/pages/main.php
@@ -19,7 +19,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="<?php echo OSCOM::getDef('text_search') ?>" /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
<span style="float: right;"><?php echo HTML::button(array('href' => OSCOM::getLink(null, null, 'Install'), 'icon' => 'plus', 'title' => OSCOM::getDef('button_install'))); ?></span>
</form>
View
7 osCommerce/OM/Core/Site/Admin/Application/ServerInfo/Model/getAll.php
@@ -22,11 +22,8 @@ public static function execute() {
$uptime = '---';
- $php_ini = ini_get('disable_functions');
- $find = strstr($php_ini, 'exec');
-
- if ( !$find ) {
- $uptime = @exec('uptime');
+ if ( !in_array('exec', explode(',', str_replace(' ', '', ini_get('disable_functions')))) ) {
+ $uptime = @exec('uptime');
}
$data = array(array('key' => 'date',
View
2  osCommerce/OM/Core/Site/Admin/Application/ServerInfo/pages/main.php
@@ -19,7 +19,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="<?php echo OSCOM::getDef('text_search') ?>" /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
<span style="float: right;"><?php echo HTML::button(array('href' => OSCOM::getLink(null, null, 'PHPInfo'), 'icon' => 'info', 'title' => OSCOM::getDef('button_php_info'), 'newwindow' => true)); ?></span>
</form>
View
2  osCommerce/OM/Core/Site/Admin/Application/TaxClasses/pages/entries.php
@@ -19,7 +19,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="Search.." /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => 'Reset')); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
<span style="float: right;"><?php echo HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'triangle-1-w', 'title' => OSCOM::getDef('button_back'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(null, null, 'EntrySave&id=' . $_GET['id']), 'icon' => 'plus', 'title' => OSCOM::getDef('button_insert'))); ?></span>
</form>
View
2  osCommerce/OM/Core/Site/Admin/Application/TaxClasses/pages/main.php
@@ -19,7 +19,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="<?php echo OSCOM::getDef('text_search') ?>" /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
<span style="float: right;"><?php echo HTML::button(array('href' => OSCOM::getLink(null, null, 'Save'), 'icon' => 'plus', 'title' => OSCOM::getDef('button_insert'))); ?></span>
</form>
View
2  osCommerce/OM/Core/Site/Admin/Application/ZoneGroups/pages/entries.php
@@ -19,7 +19,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="Search.." /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => 'Reset')); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
<span style="float: right;"><?php echo HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'triangle-1-w', 'title' => OSCOM::getDef('button_back'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(null, null, 'EntrySave&id=' . $_GET['id']), 'icon' => 'plus', 'title' => OSCOM::getDef('button_insert'))); ?></span>
</form>
View
2  osCommerce/OM/Core/Site/Admin/Application/ZoneGroups/pages/main.php
@@ -19,7 +19,7 @@
?>
<form id="liveSearchForm">
- <input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="<?php echo OSCOM::getDef('text_search') ?>" /><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
+ <?php echo HTML::inputField('search', null, 'id="liveSearchField" class="searchField" placeholder="' . OSCOM::getDef('placeholder_search') . '"') . HTML::button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => OSCOM::getDef('button_reset'))); ?>
<span style="float: right;"><?php echo HTML::button(array('href' => OSCOM::getLink(null, null, 'Save'), 'icon' => 'plus', 'title' => OSCOM::getDef('button_insert'))); ?></span>
</form>
View
6 osCommerce/OM/Core/Site/Admin/languages/en_US.php
@@ -48,9 +48,7 @@
button_orders_invoice = Invoice
button_orders_packaging_slip = Packaging Slip
button_reject = Reject
-
button_reset = Reset
-
button_restore = Restore
button_retry = Retry
button_save = Save
@@ -60,7 +58,9 @@
button_update = Update
button_update_currency_exchange_rates = Update Currency Exchange Rates
button_upload = Upload
-text_search = Search..
+
+placeholder_search = Search..
+
icon_banner_preview = Preview
icon_checkbox_ticked =
icon_checkbox_crossed =
View
1  osCommerce/OM/Core/Site/Admin/templates/oscom.php
@@ -33,6 +33,7 @@
<script type="text/javascript" src="public/external/jquery/jquery.tinysort.min.js"></script>
<script type="text/javascript" src="public/external/jquery/jquery.ocupload-1.1.2.packed.js"></script>
<script type="text/javascript" src="public/external/jquery/jquery.hoverIntent.minified.js"></script>
+<script type="text/javascript" src="public/external/jquery/jquery.placeholder.min.js"></script>
<script type="text/javascript" src="public/external/jquery/jquery.droppy.js"></script>
<script type="text/javascript" src="public/external/jquery/tipsy/jquery.tipsy.js"></script>
View
11 osCommerce/OM/Core/Site/Admin/templates/oscom/header.php
@@ -53,6 +53,8 @@
</ul>
<?php
+ $total_shortcuts = 0;
+
if ( isset($_SESSION[OSCOM::getSite()]['id']) ) {
echo '<ul class="apps" style="float: right;">';
@@ -69,6 +71,8 @@
foreach ( Access::getShortcuts() as $shortcut ) {
echo '<a href="' . OSCOM::getLink(null, $shortcut['module']) . '" id="shortcut-' . $shortcut['module'] . '">' . $OSCOM_Template->getIcon(16, $shortcut['icon'], $shortcut['title']) . '<div class="notBubble"></div></a>';
+
+ $total_shortcuts++;
}
echo ' </li>';
@@ -95,6 +99,7 @@
?>
<script type="text/javascript">
+ var totalShortcuts = <?php echo $total_shortcuts; ?>;
var wkn = new Object;
if ( $.cookie('wkn') ) {
@@ -136,9 +141,11 @@ function updateShortcutNotifications(resetApplication) {
}
$(document).ready(function() {
- updateShortcutNotifications(typeof resetShortcutNotification != 'undefined' ? '<?php echo OSCOM::getSiteApplication(); ?>' : null);
+ if ( totalShortcuts > 0 ) {
+ updateShortcutNotifications(typeof resetShortcutNotification != 'undefined' ? '<?php echo OSCOM::getSiteApplication(); ?>' : null);
- setInterval('updateShortcutNotifications()', 10000);
+ setInterval('updateShortcutNotifications()', 10000);
+ }
});
if (window.external.msIsSiteMode()) {
View
34 osCommerce/OM/Core/Site/Setup/Application/Install/pages/step_3.php
@@ -50,6 +50,12 @@
$http_dir_ws .= '/';
}
+ $http_cookie_domain = '';
+
+ if ( (substr_count($http_url['host'], '.') > 1) && !filter_var($http_url['host'], FILTER_VALIDATE_IP) ) {
+ $http_cookie_domain = $http_url['host'];
+ }
+
$dir_fs_document_root = realpath(OSCOM::BASE_DIRECTORY . '../../') . '/';
$DL_Cache = new DirectoryListing(OSCOM::BASE_DIRECTORY . 'Work/Cache');
@@ -73,8 +79,8 @@
enable_ssl = "false"
http_server = "$http_server"
https_server = "$http_server"
-http_cookie_domain = ""
-https_cookie_domain = ""
+http_cookie_domain = "$http_cookie_domain"
+https_cookie_domain = "$http_cookie_domain"
http_cookie_path = "$http_dir_ws"
https_cookie_path = "$http_dir_ws"
dir_ws_http_server = "$http_dir_ws"
@@ -93,8 +99,8 @@
enable_ssl = "false"
http_server = "$http_server"
https_server = "$http_server"
-http_cookie_domain = ""
-https_cookie_domain = ""
+http_cookie_domain = "$http_cookie_domain"
+https_cookie_domain = "$http_cookie_domain"
http_cookie_path = "$http_dir_ws"
https_cookie_path = "$http_dir_ws"
dir_ws_http_server = "$http_dir_ws"
@@ -112,26 +118,6 @@
db_table_prefix = "{$_POST['DB_TABLE_PREFIX']}"
db_server_persistent_connections = "false"
store_sessions = "Database"
-
-[RPC]
-enable_ssl = "false"
-http_server = "$http_server"
-https_server = "$http_server"
-http_cookie_domain = ""
-https_cookie_domain = ""
-http_cookie_path = "$http_dir_ws"
-https_cookie_path = "$http_dir_ws"
-dir_ws_http_server = "$http_dir_ws"
-dir_ws_https_server = "$http_dir_ws"
-db_server = "{$_POST['DB_SERVER']}"
-db_server_username = "{$_POST['DB_SERVER_USERNAME']}"
-db_server_password = "{$_POST['DB_SERVER_PASSWORD']}"
-db_server_port = "{$_POST['DB_SERVER_PORT']}"
-db_database = "{$_POST['DB_DATABASE']}"
-db_driver = "$db_class"
-db_table_prefix = "{$_POST['DB_TABLE_PREFIX']}"
-db_server_persistent_connections = "false"
-store_sessions = "Database"
EOT;
if ( is_writable(OSCOM::BASE_DIRECTORY . 'Config/settings.ini') ) {
View
2  osCommerce/OM/Core/Site/Shop/ShoppingCart.php
@@ -589,7 +589,7 @@ public function isInStock($item_id) {
$Qstock->bindInt(':products_id', $this->_contents[$item_id]['id']);
$Qstock->execute();
- if ( ($Qstock->valueInt('products_quantity') - $this->_contents[$item_id]['quantity']) > 0 ) {
+ if ( ($Qstock->valueInt('products_quantity') - $this->_contents[$item_id]['quantity']) >= 0 ) {
return true;
} elseif ( $this->_products_in_stock === true ) {
$this->_products_in_stock = false;
View
6 public/external/jquery/jquery.placeholder.min.js
@@ -0,0 +1,6 @@
+/*!
+ * HTML5 Placeholder jQuery Plugin v1.8.2
+ * @link http://github.com/mathiasbynens/Placeholder-jQuery-Plugin
+ * @author Mathias Bynens <http://mathiasbynens.be/>
+ */
+(function(f){var e='placeholder' in document.createElement('input'),a='placeholder' in document.createElement('textarea');if(e&&a){f.fn.placeholder=function(){return this};f.fn.placeholder.input=f.fn.placeholder.textarea=true}else{f.fn.placeholder=function(){return this.filter((e?'textarea':':input')+'[placeholder]').bind('focus.placeholder',b).bind('blur.placeholder',d).trigger('blur.placeholder').end()};f.fn.placeholder.input=e;f.fn.placeholder.textarea=a}function c(h){var g={},i=/^jQuery\d+$/;f.each(h.attributes,function(k,j){if(j.specified&&!i.test(j.name)){g[j.name]=j.value}});return g}function b(){var g=f(this);if(g.val()===g.attr('placeholder')&&g.hasClass('placeholder')){if(g.data('placeholder-password')){g.hide().next().attr('id',g.removeAttr('id').data('placeholder-id')).show().focus()}else{g.val('').removeClass('placeholder')}}}function d(h){var l,k=f(this),g=k,j=this.id;if(k.val()===''){if(k.is(':password')){if(!k.data('placeholder-textinput')){try{l=k.clone().attr({type:'text'})}catch(i){l=f('<input>').attr(f.extend(c(this),{type:'text'}))}l.removeAttr('name').data('placeholder-password',true).data('placeholder-id',j).bind('focus.placeholder',b);k.data('placeholder-textinput',l).data('placeholder-id',j).before(l)}k=k.removeAttr('id').hide().prev().attr('id',j).show()}k.addClass('placeholder').val(k.attr('placeholder'))}else{k.removeClass('placeholder')}}f(function(){f('form').bind('submit.placeholder',function(){var g=f('.placeholder',this).each(b);setTimeout(function(){g.each(d)},10)})});f(window).bind('unload.placeholder',function(){f('.placeholder').val('')})}(jQuery));
View
22 public/sites/Admin/javascript/general.js
@@ -172,24 +172,6 @@ function flagCheckboxes(element) {
}
}
-$(document).ready(function() {
- $('.fieldTitleAsDefault').focus(function(srcc) {
- if ( $(this).val() == $(this)[0].title ) {
- $(this).removeClass('fieldDefaultText');
- $(this).val('');
- }
- });
-
- $('.fieldTitleAsDefault').blur(function() {
- if ( $(this).val() == '') {
- $(this).addClass('fieldDefaultText');
- $(this).val($(this)[0].title);
- }
- });
-
- $('.fieldTitleAsDefault').blur();
-});
-
function htmlSpecialChars(string) {
return $('<span>').text(string).html();
};
@@ -235,3 +217,7 @@ function displayTaxRateValue(value, padding) {
return value + '%';
}
+
+$(function() {
+ $('input, textarea').placeholder();
+});
View
BIN  public/sites/Admin/templates/oscom/images/adminmenubg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
15 public/sites/Admin/templates/oscom/stylesheets/general.css
@@ -44,8 +44,8 @@ a:hover {
#adminMenu {
clear: both;
- background: #6c6c6c url('../images/adminmenubg.png') repeat-x;
- border-top: 1px solid #6c6c6c;
+ background: #000 url('../images/adminmenubg.png') repeat-x;
+ border-top: 1px solid #000;
font-size: 11px;
height: 27px;
padding-left: 2px;
@@ -79,7 +79,7 @@ a:hover {
}
#adminMenu ul.apps li.hover a {
- background-color: #5E5A5A;
+ background-color: #343434;
}
#adminMenu ul.apps li.shortcuts, #adminMenu ul.apps li.shortcuts a {
@@ -119,7 +119,7 @@ a:hover {
}
#adminMenu ul.apps ul li a {
- background-color: #5E5A5A;
+ background-color: #343434;
}
#adminMenu ul.apps ul a.has-subnav {
@@ -127,7 +127,7 @@ a:hover {
}
#adminMenu ul.apps ul a.hover {
- background-color: #30A8C3;
+ background-color: #76b900;
}
#adminMenu ul.apps ul a {
@@ -339,11 +339,6 @@ form.dataForm fieldset legend { padding: 3px 10px; border-bottom: 1px solid blac
-webkit-border-bottom-left-radius: 8px;
}
-.fieldDefaultText {
- color: #a1a1a1;
- font-style: italic;
-}
-
/* attributes */
.attributes-odd { background-color: #f4f7fd; }
.attributes-even { background-color: #fff; }
View
BIN  public/sites/Shop/images/worldflags/fx.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
4 public/sites/Shop/javascript/products/info.js
@@ -68,6 +68,8 @@ function refreshVariants() {
}
document.getElementById('productInfoPrice').innerHTML = price;
- document.getElementById('productInfoAvailability').innerHTML = availability;
+ if(document.getElementById('productInfoAvailability') != undefined) {
+ document.getElementById('productInfoAvailability').innerHTML = availability;
+ }
document.getElementById('productInfoModel').innerHTML = model;
}
Please sign in to comment.
Something went wrong with that request. Please try again.