aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-07-18 22:55:53 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-07-18 22:55:53 +0000
commit3ca3ecdd45838debc75d6feba2a452ef4d91431a (patch)
treee4f8d68d65579d0b4463a6be2aa39982be9878de
parentcfe669be36d115c3bc4c98c8215c51480185e64e (diff)
deleted pages are no more visible on the filters
-rw-r--r--h-source/Application/Controllers/SearchController.php1
-rw-r--r--h-source/Application/Models/AcquisitioncardsModel.php9
-rw-r--r--h-source/Application/Models/BluetoothModel.php9
-rw-r--r--h-source/Application/Models/FingerprintreadersModel.php9
-rw-r--r--h-source/Application/Models/GenericModel.php10
-rw-r--r--h-source/Application/Models/NotebooksModel.php9
-rw-r--r--h-source/Application/Models/PrintersModel.php7
-rw-r--r--h-source/Application/Models/ScannersModel.php11
-rw-r--r--h-source/Application/Models/SoundcardsModel.php9
-rw-r--r--h-source/Application/Models/ThreegcardsModel.php9
-rw-r--r--h-source/Application/Models/VideocardsModel.php7
-rw-r--r--h-source/Application/Models/WebcamsModel.php9
-rw-r--r--h-source/Application/Models/WifiModel.php11
-rw-r--r--h-source/Public/Css/main.css11
14 files changed, 41 insertions, 80 deletions
diff --git a/h-source/Application/Controllers/SearchController.php b/h-source/Application/Controllers/SearchController.php
index 9e7cb68..7fda506 100644
--- a/h-source/Application/Controllers/SearchController.php
+++ b/h-source/Application/Controllers/SearchController.php
@@ -72,6 +72,7 @@ class SearchController extends BaseController
// 'model' => "like '%".$this->viewArgs['model']."%'",
// 'other_names' => "like '%".$this->viewArgs['model']."%'",
'-deleted' => "no",
+ 'cleared' => "no",
);
$recordNumber = $this->m['HardwareModel']->clear()->where($whereClause)->orderBy("id_hard desc")->rowNumber();
diff --git a/h-source/Application/Models/AcquisitioncardsModel.php b/h-source/Application/Models/AcquisitioncardsModel.php
index 67d71eb..ab04fed 100644
--- a/h-source/Application/Models/AcquisitioncardsModel.php
+++ b/h-source/Application/Models/AcquisitioncardsModel.php
@@ -45,13 +45,8 @@ class AcquisitioncardsModel extends GenericModel
$this->_popupFunctions = array(
'vendor' => 'betterVendor',
);
-
- $this->_popupWhere = array(
- 'vendor' => 'type="acquisition-card" and deleted="no"',
- 'comm_year' => 'type="acquisition-card" and deleted="no"',
- 'compatibility' => 'type="acquisition-card" and deleted="no"',
- 'interface' => 'type="acquisition-card" and deleted="no"',
- );
+
+ $this->createPopupWhere('vendor,compatibility,comm_year,interface');
$this->diffFields = array(
'vendor' => gtext("vendor"),
diff --git a/h-source/Application/Models/BluetoothModel.php b/h-source/Application/Models/BluetoothModel.php
index 0b7f15d..82aab59 100644
--- a/h-source/Application/Models/BluetoothModel.php
+++ b/h-source/Application/Models/BluetoothModel.php
@@ -45,13 +45,8 @@ class BluetoothModel extends GenericModel
$this->_popupFunctions = array(
'vendor' => 'betterVendor',
);
-
- $this->_popupWhere = array(
- 'vendor' => 'type="bluetooth" and deleted="no"',
- 'comm_year' => 'type="bluetooth" and deleted="no"',
- 'bluetooth_works' => 'type="bluetooth" and deleted="no"',
- 'interface' => 'type="bluetooth" and deleted="no"',
- );
+
+ $this->createPopupWhere('vendor,bluetooth_works,comm_year,interface');
$this->diffFields = array(
'vendor' => gtext("vendor"),
diff --git a/h-source/Application/Models/FingerprintreadersModel.php b/h-source/Application/Models/FingerprintreadersModel.php
index ea249a9..8e3f8da 100644
--- a/h-source/Application/Models/FingerprintreadersModel.php
+++ b/h-source/Application/Models/FingerprintreadersModel.php
@@ -45,13 +45,8 @@ class FingerprintreadersModel extends GenericModel
$this->_popupFunctions = array(
'vendor' => 'betterVendor',
);
-
- $this->_popupWhere = array(
- 'vendor' => 'type="fingerprint-reader" and deleted="no"',
- 'comm_year' => 'type="fingerprint-reader" and deleted="no"',
- 'fingerprint_works' => 'type="fingerprint-reader" and deleted="no"',
- 'interface' => 'type="fingerprint-reader" and deleted="no"',
- );
+
+ $this->createPopupWhere('vendor,fingerprint_works,comm_year,interface');
$this->diffFields = array(
'vendor' => gtext("vendor"),
diff --git a/h-source/Application/Models/GenericModel.php b/h-source/Application/Models/GenericModel.php
index 0ccd332..9a619fd 100644
--- a/h-source/Application/Models/GenericModel.php
+++ b/h-source/Application/Models/GenericModel.php
@@ -56,4 +56,14 @@ class GenericModel extends Model_Tree {
{
return getDiffArray($this->diffFields, $oldArray, $newArray);
}
+
+ //create the $_popupWhere property
+ public function createPopupWhere($list)
+ {
+ $listArray = explode(',',$list);
+ foreach ($listArray as $field)
+ {
+ $this->_popupWhere[$field] = 'type="'.$this->type.'" and deleted="no" and cleared="no"';
+ }
+ }
} \ No newline at end of file
diff --git a/h-source/Application/Models/NotebooksModel.php b/h-source/Application/Models/NotebooksModel.php
index 00ab64d..2172f52 100644
--- a/h-source/Application/Models/NotebooksModel.php
+++ b/h-source/Application/Models/NotebooksModel.php
@@ -40,13 +40,8 @@ class NotebooksModel extends GenericModel {
'comm_year' => gtext("year"),
'subtype' => gtext("subtype"),
);
-
- $this->_popupWhere = array(
- 'vendor' => 'type="notebook" and deleted="no"',
- 'compatibility' => 'type="notebook" and deleted="no"',
- 'comm_year' => 'type="notebook" and deleted="no"',
- 'subtype' => 'type="notebook" and deleted="no"',
- );
+
+ $this->createPopupWhere('vendor,compatibility,comm_year,subtype');
$this->diffFields = array(
'vendor' => gtext("vendor"),
diff --git a/h-source/Application/Models/PrintersModel.php b/h-source/Application/Models/PrintersModel.php
index b5b2f49..882224d 100644
--- a/h-source/Application/Models/PrintersModel.php
+++ b/h-source/Application/Models/PrintersModel.php
@@ -42,12 +42,7 @@ class PrintersModel extends GenericModel
'interface' => gtext("interface"),
);
- $this->_popupWhere = array(
- 'vendor' => 'type="printer" and deleted="no"',
- 'compatibility' => 'type="printer" and deleted="no"',
- 'comm_year' => 'type="printer" and deleted="no"',
- 'interface' => 'type="printer" and deleted="no"',
- );
+ $this->createPopupWhere('vendor,compatibility,comm_year,interface');
$this->diffFields = array(
'vendor' => gtext("vendor"),
diff --git a/h-source/Application/Models/ScannersModel.php b/h-source/Application/Models/ScannersModel.php
index 72825b5..430142d 100644
--- a/h-source/Application/Models/ScannersModel.php
+++ b/h-source/Application/Models/ScannersModel.php
@@ -41,14 +41,9 @@ class ScannersModel extends GenericModel
'comm_year' => gtext("year"),
'interface' => gtext("interface"),
);
-
- $this->_popupWhere = array(
- 'vendor' => 'type="scanner" and deleted="no"',
- 'compatibility' => 'type="scanner" and deleted="no"',
- 'comm_year' => 'type="scanner" and deleted="no"',
- 'interface' => 'type="scanner" and deleted="no"',
- );
-
+
+ $this->createPopupWhere('vendor,compatibility,comm_year,interface');
+
$this->diffFields = array(
'vendor' => gtext("vendor"),
'model' => gtext('model name'),
diff --git a/h-source/Application/Models/SoundcardsModel.php b/h-source/Application/Models/SoundcardsModel.php
index 71c8125..cda9c99 100644
--- a/h-source/Application/Models/SoundcardsModel.php
+++ b/h-source/Application/Models/SoundcardsModel.php
@@ -45,13 +45,8 @@ class SoundcardsModel extends GenericModel
$this->_popupFunctions = array(
'vendor' => 'betterVendor',
);
-
- $this->_popupWhere = array(
- 'vendor' => 'type="soundcard" and deleted="no"',
- 'comm_year' => 'type="soundcard" and deleted="no"',
- 'sound_card_works' => 'type="soundcard" and deleted="no"',
- 'interface' => 'type="soundcard" and deleted="no"',
- );
+
+ $this->createPopupWhere('vendor,sound_card_works,comm_year,interface');
$this->diffFields = array(
'vendor' => gtext("vendor"),
diff --git a/h-source/Application/Models/ThreegcardsModel.php b/h-source/Application/Models/ThreegcardsModel.php
index 5b0a7e7..4a89a97 100644
--- a/h-source/Application/Models/ThreegcardsModel.php
+++ b/h-source/Application/Models/ThreegcardsModel.php
@@ -46,13 +46,8 @@ class ThreegcardsModel extends GenericModel
'vendor' => 'betterVendor',
'interface' => 'betterVendor',
);
-
- $this->_popupWhere = array(
- 'vendor' => 'type="3G-card" and deleted="no"',
- 'comm_year' => 'type="3G-card" and deleted="no"',
- 'wifi_works' => 'type="3G-card" and deleted="no"',
- 'interface' => 'type="3G-card" and deleted="no"',
- );
+
+ $this->createPopupWhere('vendor,wifi_works,comm_year,interface');
$this->diffFields = array(
'vendor' => gtext("vendor"),
diff --git a/h-source/Application/Models/VideocardsModel.php b/h-source/Application/Models/VideocardsModel.php
index 4cac5a7..2e9a3ee 100644
--- a/h-source/Application/Models/VideocardsModel.php
+++ b/h-source/Application/Models/VideocardsModel.php
@@ -42,12 +42,7 @@ class VideocardsModel extends GenericModel
'interface' => gtext("interface"),
);
- $this->_popupWhere = array(
- 'vendor' => 'type="videocard" and deleted="no"',
- 'comm_year' => 'type="videocard" and deleted="no"',
- 'video_card_works' => 'type="videocard" and deleted="no"',
- 'interface' => 'type="videocard" and deleted="no"',
- );
+ $this->createPopupWhere('vendor,video_card_works,comm_year,interface');
$this->diffFields = array(
'vendor' => gtext("vendor"),
diff --git a/h-source/Application/Models/WebcamsModel.php b/h-source/Application/Models/WebcamsModel.php
index 2b5ed9b..a59da6e 100644
--- a/h-source/Application/Models/WebcamsModel.php
+++ b/h-source/Application/Models/WebcamsModel.php
@@ -45,13 +45,8 @@ class WebcamsModel extends GenericModel
$this->_popupFunctions = array(
'vendor' => 'betterVendor',
);
-
- $this->_popupWhere = array(
- 'vendor' => 'type="webcam" and deleted="no"',
- 'comm_year' => 'type="webcam" and deleted="no"',
- 'webcam_works' => 'type="webcam" and deleted="no"',
- 'interface' => 'type="webcam" and deleted="no"',
- );
+
+ $this->createPopupWhere('vendor,webcam_works,comm_year,interface');
$this->diffFields = array(
'vendor' => gtext("vendor"),
diff --git a/h-source/Application/Models/WifiModel.php b/h-source/Application/Models/WifiModel.php
index 3d15aa2..12dedc2 100644
--- a/h-source/Application/Models/WifiModel.php
+++ b/h-source/Application/Models/WifiModel.php
@@ -45,14 +45,9 @@ class WifiModel extends GenericModel
$this->_popupFunctions = array(
'interface' => 'betterVendor',
);
-
- $this->_popupWhere = array(
- 'vendor' => 'type="wifi" and deleted="no"',
- 'comm_year' => 'type="wifi" and deleted="no"',
- 'wifi_works' => 'type="wifi" and deleted="no"',
- 'interface' => 'type="wifi" and deleted="no"',
- );
-
+
+ $this->createPopupWhere('vendor,wifi_works,comm_year,interface');
+
$this->diffFields = array(
'vendor' => gtext("vendor"),
'model' => gtext('model name'),
diff --git a/h-source/Public/Css/main.css b/h-source/Public/Css/main.css
index be0c737..c7c9c0f 100644
--- a/h-source/Public/Css/main.css
+++ b/h-source/Public/Css/main.css
@@ -560,7 +560,12 @@ ul#menuBlock {
margin:0px;
padding:0px;
list-style:none;
- height:24px;
+ height:25px;
+}
+ul#menuBlock li.innerItem
+{
+ height:22px;
+ padding-top:3px;
}
ul#menuBlock li {
position:relative;
@@ -568,11 +573,10 @@ ul#menuBlock li {
float:left;
margin-left:3px;
width:139px;
- height:22px;
+/* height:22px; */
text-align:center;
background: url('../Img/popup_back.png') no-repeat top left;
/* background:#FFA500; */
- padding-top:3px;
}
ul#menuBlock li a {
@@ -596,6 +600,7 @@ ul#menuBlock:hover li ul
ul#menuBlock li ul li {
background:#ffef84;
border-top:1px solid #ec8459;
+ padding:3px 0;
}