* [MOD] Updated JQuery UI to latest version.
* [FIX] Fixed global search issues.
@@ -29,7 +29,9 @@ require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Bas
|
||||
|
||||
$cssFiles = array(
|
||||
array('href' => 'css/reset.css', 'min' => true),
|
||||
array('href' => 'css/smoothness/jquery-ui.css', 'min' => true),
|
||||
array('href' => 'css/jquery-ui.min.css', 'min' => false),
|
||||
array('href' => 'css/jquery-ui.structure.min.css', 'min' => false),
|
||||
array('href' => 'css/jquery-ui.theme.min.css', 'min' => false),
|
||||
array('href' => 'css/jquery.powertip.css', 'min' => true),
|
||||
array('href' => 'css/jquery.powertip-yellow.min.css', 'min' => true),
|
||||
array('href' => 'css/chosen.css', 'min' => true),
|
||||
|
||||
BIN
css/images/ui-bg_flat_0_aaaaaa_40x100.png
Normal file
|
After Width: | Height: | Size: 212 B |
BIN
css/images/ui-bg_flat_75_ffffff_40x100.png
Normal file
|
After Width: | Height: | Size: 208 B |
|
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 335 B |
BIN
css/images/ui-bg_glass_65_ffffff_1x400.png
Normal file
|
After Width: | Height: | Size: 207 B |
|
Before Width: | Height: | Size: 159 B After Width: | Height: | Size: 159 B |
|
Before Width: | Height: | Size: 262 B After Width: | Height: | Size: 262 B |
|
Before Width: | Height: | Size: 262 B After Width: | Height: | Size: 262 B |
|
Before Width: | Height: | Size: 332 B After Width: | Height: | Size: 332 B |
BIN
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png
Normal file
|
After Width: | Height: | Size: 280 B |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
7
css/jquery-ui.min.css
vendored
Normal file
5
css/jquery-ui.structure.min.css
vendored
Normal file
5
css/jquery-ui.theme.min.css
vendored
Normal file
@@ -11,7 +11,7 @@ div.tagsinput span.tag{width: 62px;}
|
||||
div.tagsinput input{width: 120px;}
|
||||
|
||||
div.tagsinput span.tag {
|
||||
background: url("smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png") repeat-x scroll 50% 50% #E6E6E6;
|
||||
background: url("images/ui-bg_glass_75_e6e6e6_1x400.png") repeat-x scroll 50% 50% #E6E6E6;
|
||||
border: 1px solid #D3D3D3;
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 212 B |
|
Before Width: | Height: | Size: 208 B |
|
Before Width: | Height: | Size: 207 B |
|
Before Width: | Height: | Size: 280 B |
7
css/smoothness/jquery-ui.css
vendored
@@ -1424,14 +1424,14 @@ footer img {
|
||||
/* Fix for fancybox z-index*/
|
||||
|
||||
.ui-buttonset .ui-state-active {
|
||||
background: url("smoothness/images/ui-bg_glass_75_ON_1x400.png") repeat-x scroll 50% 50% #ecfde4;
|
||||
background: url("images/ui-bg_glass_75_ON_1x400.png") repeat-x scroll 50% 50% #ecfde4;
|
||||
border: 1px solid #AAAAAA;
|
||||
color: #212121;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.valField .ui-state-active, #tblTools .ui-state-active, #frmInstall .ui-state-active {
|
||||
background: url("smoothness/images/ui-bg_glass_75_ON_1x400.png") repeat-x scroll 50% 50% #ecfde4;
|
||||
background: url("images/ui-bg_glass_75_ON_1x400.png") repeat-x scroll 50% 50% #ecfde4;
|
||||
}
|
||||
|
||||
/*#passLevel { margin-left: 10px; padding: 3px 15px;}*/
|
||||
|
||||
@@ -46,13 +46,37 @@ class AccountSearch
|
||||
*/
|
||||
public static $queryNumRows;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $_globalSearch = false;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $_txtSearch = '';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $_customerId = 0;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $_categoryId = 0;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $_sortOrder = 0;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $_sortKey = 0;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $_limitStart = 0;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $_limitCount = 12;
|
||||
|
||||
/**
|
||||
@@ -64,15 +88,15 @@ class AccountSearch
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
* @return int
|
||||
*/
|
||||
public function isGlobalSearch()
|
||||
public function getGlobalSearch()
|
||||
{
|
||||
return $this->_globalSearch;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param boolean $globalSearch
|
||||
* @param int $globalSearch
|
||||
*/
|
||||
public function setGlobalSearch($globalSearch)
|
||||
{
|
||||
@@ -199,7 +223,6 @@ class AccountSearch
|
||||
public function getAccounts()
|
||||
{
|
||||
$isAdmin = (Session::getUserIsAdminApp() || Session::getUserIsAdminAcc());
|
||||
$globalSearch = ($this->isGlobalSearch() && Config::getValue('globalsearch', 0));
|
||||
|
||||
$arrFilterCommon = array();
|
||||
$arrFilterSelect = array();
|
||||
@@ -280,7 +303,7 @@ class AccountSearch
|
||||
$arrQueryWhere[] = '(' . implode(' AND ', $arrFilterSelect) . ')';
|
||||
}
|
||||
|
||||
if (!$isAdmin && !$globalSearch) {
|
||||
if (!$isAdmin && !$this->getGlobalSearch()) {
|
||||
$arrFilterUser[] = 'account_userGroupId = :userGroupId';
|
||||
$arrFilterUser[] = 'account_userId = :userId';
|
||||
$arrFilterUser[] = 'accgroup_groupId = :accgroup_groupId';
|
||||
|
||||
@@ -49,13 +49,13 @@ class Request
|
||||
switch($_SERVER['REQUEST_METHOD']){
|
||||
case 'GET':
|
||||
if (!isset($_GET[$param])) {
|
||||
return $default;
|
||||
return ($force) ? !$force : $default;
|
||||
}
|
||||
$value = &$_GET[$param];
|
||||
break;
|
||||
case 'POST':
|
||||
if (!isset($_POST[$param])) {
|
||||
return $default;
|
||||
return ($force) ? !$force : $default;
|
||||
}
|
||||
$value = &$_POST[$param];
|
||||
break;
|
||||
|
||||
@@ -344,22 +344,21 @@ class Util
|
||||
*/
|
||||
public static function boolval($in, $strict = false)
|
||||
{
|
||||
$out = null;
|
||||
$in = (is_string($in) ? strtolower($in) : $in);
|
||||
|
||||
// if not strict, we only have to check if something is false
|
||||
if (in_array($in, array('false', 'no', 'n', '0', 'off', false, 0), true) || !$in) {
|
||||
$out = false;
|
||||
return false;
|
||||
} else if ($strict) {
|
||||
// if strict, check the equivalent true values
|
||||
if (in_array($in, array('true', 'yes', 'y', '1', 'on', true, 1), true)) {
|
||||
$out = true;
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
// not strict? let the regular php bool check figure it out (will
|
||||
// largely default to true)
|
||||
$out = ($in ? true : false);
|
||||
return ($in ? true : false);
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -424,16 +424,16 @@
|
||||
placeholder_text_multiple: "<?php echo _('Seleccionar usuarios'); ?>"
|
||||
});
|
||||
$('input:text:visible:first').focus();
|
||||
$('.checkbox').button();
|
||||
$('.ui-button').click(function () {
|
||||
// El cambio de clase se produce durante el evento de click
|
||||
// Si tiene la clase significa que el estado anterior era ON y ahora es OFF
|
||||
if ($(this).hasClass('ui-state-active')) {
|
||||
$(this).children().html('<?php echo _('NO'); ?>');
|
||||
} else {
|
||||
$(this).children().html('<?php echo _('SI'); ?>');
|
||||
|
||||
$('.checkbox').button().click(
|
||||
function(){
|
||||
if ($(this).attr('checked') == undefined){
|
||||
$(this).button('option', 'label', '<?php echo _('NO'); ?>');
|
||||
} else {
|
||||
$(this).button('option', 'label', '<?php echo _('SI'); ?>');
|
||||
}
|
||||
}
|
||||
});
|
||||
);
|
||||
|
||||
$('#passGen').click(function () {
|
||||
password(11, true, true);
|
||||
|
||||
@@ -409,16 +409,17 @@
|
||||
|
||||
<script>
|
||||
$("#sel-sitelang,#sel-account_link,#sel-mailsecurity").chosen({disable_search : true});
|
||||
$('#frmConfig').find('.checkbox').button();
|
||||
$('#frmConfig').find('.ui-button').click(function(){
|
||||
// El cambio de clase se produce durante el evento de click
|
||||
// Si tiene la clase significa que el estado anterior era ON y ahora es OFF
|
||||
if ( $(this).hasClass('ui-state-active') ){
|
||||
$(this).children().html('OFF');
|
||||
} else{
|
||||
$(this).children().html('ON');
|
||||
|
||||
$('#frmConfig').find('.checkbox').button().click(
|
||||
function(){
|
||||
if ($(this).attr('checked') == undefined){
|
||||
$(this).button('option', 'label', 'OFF');
|
||||
} else {
|
||||
$(this).button('option', 'label', 'ON');
|
||||
}
|
||||
}
|
||||
});
|
||||
);
|
||||
|
||||
$('#allowed_exts').tagsInput({
|
||||
'width':'350px',
|
||||
'defaultText':'<?php echo _('Añadir extensión'); ?>',
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($searchGlobal): ?>
|
||||
<span class="globalOn round"><?php _('Global ON'); ?></span>
|
||||
<span class="globalOn round"><?php echo _('Global ON'); ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div id="pageNavRight">
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
<td id="toolsLeft">
|
||||
<img src="imgs/clear.png" title="<?php echo _('Limpiar'); ?>" class="inputImg" id="btnClear" />
|
||||
<input type="text" name="search" id="txtSearch" value="<?php echo $searchTxt; ?>" placeholder="<?php echo _('Texto a buscar'); ?>"/>
|
||||
<?php if ( $globalSearch && ! $isAdmin ): ?>
|
||||
<label for="gsearch" title="<?php echo _('Búsqueda global');?>"><?php echo ($searchGlobal) ? 'ON' : 'OFF'; ?></label>
|
||||
<input type="checkbox" name="gsearch" id="gsearch" class="checkbox" <?php echo ($searchGlobal) ? 'checked="checked"' : ''; ?>/>
|
||||
<?php if ( $showGlobalSearch && ! $isAdmin ): ?>
|
||||
<label for="chkgsearch" title="<?php echo _('Búsqueda global');?>"><?php echo ($searchGlobal) ? 'ON' : 'OFF'; ?></label>
|
||||
<input type="checkbox" name="chkgsearch" id="chkgsearch" class="checkbox" <?php echo ($searchGlobal) ? 'checked="checked"' : ''; ?>/>
|
||||
<input type="hidden" name="gsearch" value="<?php echo $searchGlobal; ?>">
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="start" value="<?php echo $limitStart; ?>">
|
||||
<input type="hidden" name="skey" value="<?php echo $searchKey; ?>" />
|
||||
@@ -41,22 +42,23 @@
|
||||
$("#rpp").spinner({step: 3, max: 50, min: 6, numberFormat: "n", stop: function(event, ui) {
|
||||
accSearch(0);
|
||||
}});
|
||||
<?php if ( $globalSearch ): ?>
|
||||
$('#tblTools').find('.checkbox').button();
|
||||
$('#frmSearch').find('.ui-button').click(function(){
|
||||
// El cambio de clase se produce durante el evento de click
|
||||
// Si tiene la clase significa que el estado anterior era ON y ahora es OFF
|
||||
if ( $(this).hasClass('ui-state-active') ){
|
||||
$(this).children().html('OFF');
|
||||
} else{
|
||||
$(this).children().html('ON');
|
||||
}
|
||||
|
||||
accSearch(0);
|
||||
});
|
||||
|
||||
<?php endif; ?>
|
||||
$('#frmSearch input:text:visible:first').focus();
|
||||
$('#frmSearch #txtSearch').keyup(function(e){accSearch(1,e)});
|
||||
$('#frmSearch #btnClear').click(function(e){clearSearch(); accSearch(0);})
|
||||
|
||||
<?php if ( $showGlobalSearch ): ?>
|
||||
$('#tblTools').find('.checkbox').button().click(
|
||||
function(){
|
||||
if ($(this).attr('checked') == undefined){
|
||||
$(this).button('option', 'label', 'OFF');
|
||||
$('input[name="gsearch"]').val(0);
|
||||
} else {
|
||||
$(this).button('option', 'label', 'ON');
|
||||
$('input[name="gsearch"]').val(1);
|
||||
}
|
||||
|
||||
accSearch(0);
|
||||
}
|
||||
);
|
||||
<?php endif; ?>
|
||||
</script>
|
||||
13
js/jquery-ui.min.js
vendored
Normal file
@@ -28,11 +28,10 @@ define('APP_ROOT', '..');
|
||||
require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php';
|
||||
|
||||
$jsFiles = array(
|
||||
// array("href" => "js/jquery.js", "min" => false),
|
||||
array("href" => "js/jquery-1.11.2.min.js", "min" => false),
|
||||
array("href" => "js/jquery-migrate-1.2.1.min.js", "min" => false),
|
||||
array("href" => "js/jquery.placeholder.js", "min" => true),
|
||||
array("href" => "js/jquery-ui.js", "min" => false),
|
||||
array("href" => "js/jquery-ui.min.js", "min" => false),
|
||||
array("href" => "js/fancybox/jquery.fancybox.pack.js", "min" => false),
|
||||
array("href" => "js/jquery.powertip.min.js", "min" => false),
|
||||
array("href" => "js/chosen.jquery.min.js", "min" => false),
|
||||
|
||||
@@ -53,7 +53,7 @@ class SearchC extends Controller implements ActionsInterface
|
||||
private function setVars()
|
||||
{
|
||||
$this->view->assign('isAdmin', (\SP\Session::getUserIsAdminApp() || \SP\Session::getUserIsAdminAcc()));
|
||||
$this->view->assign('globalSearch', \SP\Config::getValue('globalsearch', 0));
|
||||
$this->view->assign('showGlobalSearch', \SP\Config::getValue('globalsearch', false));
|
||||
|
||||
// Comprobar si está creado el objeto de búsqueda en la sesión
|
||||
if (!is_object(\SP\Session::getSearchFilters())) {
|
||||
@@ -69,7 +69,7 @@ class SearchC extends Controller implements ActionsInterface
|
||||
$this->view->assign('searchCustomer', \SP\Request::analyze('customer', $filters->getCustomerId()));
|
||||
$this->view->assign('searchCategory', \SP\Request::analyze('category', $filters->getCategoryId()));
|
||||
$this->view->assign('searchTxt', \SP\Request::analyze('search', $filters->getTxtSearch()));
|
||||
$this->view->assign('searchGlobal', \SP\Request::analyze('gsearch', $filters->isGlobalSearch(), false, 1));
|
||||
$this->view->assign('searchGlobal', \SP\Request::analyze('gsearch', $filters->getGlobalSearch()));
|
||||
$this->view->assign('limitStart', \SP\Request::analyze('start', $filters->getLimitStart()));
|
||||
$this->view->assign('limitCount', \SP\Request::analyze('rpp', $filters->getLimitCount()));
|
||||
}
|
||||
@@ -96,7 +96,7 @@ class SearchC extends Controller implements ActionsInterface
|
||||
|
||||
$search = new \SP\AccountSearch();
|
||||
|
||||
$search->setGlobalSearch($this->view->globalSearch);
|
||||
$search->setGlobalSearch($this->view->searchGlobal);
|
||||
$search->setTxtSearch($this->view->searchTxt);
|
||||
$search->setCategoryId($this->view->searchCategory);
|
||||
$search->setCustomerId($this->view->searchCustomer);
|
||||
|
||||