Removed flexigrid. Fixed findBodyID() in emails controller
|
|
@ -67,6 +67,13 @@ class EmailsController extends AppController {
|
|||
return $attachment['id'];
|
||||
}
|
||||
}
|
||||
|
||||
//Havent found one yet. Just return the first email attachment ID.
|
||||
foreach($email_attachments as $attachment) {
|
||||
return $attachment['id'];
|
||||
}
|
||||
|
||||
|
||||
//Should do something else here to take a stab at it at least.
|
||||
return false;
|
||||
|
||||
|
|
@ -96,11 +103,11 @@ class EmailsController extends AppController {
|
|||
else {
|
||||
|
||||
$user = $this->Email->User->find('first', array('conditions'=>array('User.id'=>$id), 'fields'=>array('User.id','User.access_level'), 'recursive'=>0));
|
||||
|
||||
|
||||
if($user['User']['access_level'] == 'manager' || $user['User']['access_level'] == 'admin') {
|
||||
if( (!$this->isAdmin()) && (!$this->isManager()) ) {
|
||||
echo "Unable to view Emails for this User. You have insufficient privileges.";
|
||||
return;
|
||||
echo "Unable to view Emails for this User. You have insufficient privileges.";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 781 B |
|
Before Width: | Height: | Size: 682 B |
|
|
@ -1,726 +0,0 @@
|
|||
@charset "UTF-8";
|
||||
/* CSS Document */
|
||||
|
||||
.flexigrid
|
||||
{
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
position: relative;
|
||||
border: 0px solid #eee;
|
||||
overflow: hidden;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.flexigrid.hideBody
|
||||
{
|
||||
height: 26px !important;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.ie6fullwidthbug
|
||||
{
|
||||
border-right: 0px solid #ccc;
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
.flexigrid div.nDiv
|
||||
{
|
||||
background: #eee url(images/line.gif) repeat-y -1px top;
|
||||
border: 1px solid #ccc;
|
||||
border-top: 0px;
|
||||
overflow: auto;
|
||||
left: 0px;
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.flexigrid div.nDiv table
|
||||
{
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
.flexigrid div.hDivBox
|
||||
{
|
||||
float: left;
|
||||
padding-right: 40px;
|
||||
}
|
||||
|
||||
.flexigrid div.bDiv table
|
||||
{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.flexigrid div.bDiv table.autoht
|
||||
{
|
||||
border-bottom: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.flexigrid div.nDiv td
|
||||
{
|
||||
padding: 2px 3px;
|
||||
border: 1px solid #eee;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.flexigrid div.nDiv tr:hover td, .flexigrid div.nDiv tr.ndcolover td
|
||||
{
|
||||
background: #d5effc url(images/hl.png) repeat-x top;
|
||||
border: 1px solid #a8d8eb;
|
||||
}
|
||||
|
||||
.flexigrid div.nDiv td.ndcol1
|
||||
{
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.flexigrid div.nDiv td.ndcol2
|
||||
{
|
||||
border-left: 1px solid #fff;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.flexigrid div.nDiv tr:hover td.ndcol1, .flexigrid div.nDiv tr.ndcolover td.ndcol1
|
||||
{
|
||||
border-right: 1px solid #d2e3ec;
|
||||
}
|
||||
|
||||
.flexigrid div.nDiv tr:hover td.ndcol2, .flexigrid div.nDiv tr.ndcolover td.ndcol2
|
||||
{
|
||||
border-left: 1px solid #eef8ff;
|
||||
}
|
||||
|
||||
.flexigrid div.nBtn
|
||||
{
|
||||
position: absolute;
|
||||
height: 24px;
|
||||
width: 14px;
|
||||
z-index: 900;
|
||||
background: #fafafa url(images/fhbg.gif) repeat-x bottom;
|
||||
border: 0px solid #ccc;
|
||||
border-left: 1px solid #ccc;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
margin-top: 1px;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.flexigrid div.nBtn div
|
||||
{
|
||||
height: 24px;
|
||||
width: 12px;
|
||||
border-left: 1px solid #fff;
|
||||
float: left;
|
||||
background: url(images/ddn.png) no-repeat center;
|
||||
}
|
||||
|
||||
.flexigrid div.nBtn.srtd
|
||||
{
|
||||
background: url(images/wbg.gif) repeat-x 0px -1px;
|
||||
}
|
||||
|
||||
|
||||
.flexigrid div.mDiv
|
||||
{
|
||||
background: url(images/wbg.gif) repeat-x top;
|
||||
border: 1px solid #ccc;
|
||||
border-bottom: 0px;
|
||||
border-top: 0px;
|
||||
font-weight: bold;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.flexigrid div.mDiv div
|
||||
{
|
||||
padding: 6px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.flexigrid div.mDiv div.ptogtitle
|
||||
{
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 3px;
|
||||
padding: 0px;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
overflow: hidden;
|
||||
border: 1px solid #ccc;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.flexigrid div.mDiv div.ptogtitle:hover
|
||||
{
|
||||
background-position: left -2px;
|
||||
border-color: #bbb;
|
||||
}
|
||||
|
||||
.flexigrid div.mDiv div.ptogtitle span
|
||||
{
|
||||
display: block;
|
||||
border-left: 1px solid #eee;
|
||||
border-top: 1px solid #fff;
|
||||
border-bottom: 1px solid #ddd;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
background: url(images/uup.png) no-repeat center;
|
||||
}
|
||||
|
||||
.flexigrid div.mDiv div.ptogtitle.vsble span
|
||||
{
|
||||
background: url(images/ddn.png) no-repeat center;
|
||||
}
|
||||
|
||||
.flexigrid div.tDiv /*toolbar*/
|
||||
{
|
||||
background: #fafafa url(images/bg.gif) repeat-x top;
|
||||
position: relative;
|
||||
border: 1px solid #ccc;
|
||||
border-bottom: 0px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.flexigrid div.tDiv2
|
||||
{
|
||||
float: left;
|
||||
clear: both;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.flexigrid div.sDiv /*toolbar*/
|
||||
{
|
||||
background: #fafafa url(images/bg.gif) repeat-x top;
|
||||
position: relative;
|
||||
border: 1px solid #ccc;
|
||||
border-top: 0px;
|
||||
overflow: hidden;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.flexigrid div.sDiv2
|
||||
{
|
||||
float: left;
|
||||
clear: both;
|
||||
padding: 5px;
|
||||
padding-left: 5px;
|
||||
width: 1024px;
|
||||
}
|
||||
|
||||
.flexigrid div.sDiv2 input, .flexigrid div.sDiv2 select
|
||||
{
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.flexigrid div.btnseparator
|
||||
{
|
||||
float: left;
|
||||
height: 22px;
|
||||
border-left: 1px solid #ccc;
|
||||
border-right: 1px solid #fff;
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
.flexigrid div.fbutton
|
||||
{
|
||||
float: left;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.flexigrid div.fbutton div
|
||||
{
|
||||
float: left;
|
||||
padding: 1px 3px;
|
||||
}
|
||||
|
||||
.flexigrid div.fbutton span
|
||||
{
|
||||
float: left;
|
||||
display: block;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.flexigrid div.fbutton:hover, .flexigrid div.fbutton.fbOver
|
||||
{
|
||||
padding: 0px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.flexigrid div.fbutton:hover div, .flexigrid div.fbutton.fbOver div
|
||||
{
|
||||
padding: 0px 2px;
|
||||
border-left: 1px solid #fff;
|
||||
border-top: 1px solid #fff;
|
||||
border-right: 1px solid #eee;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
|
||||
/* end toolbar*/
|
||||
|
||||
.flexigrid div.hDiv
|
||||
{
|
||||
background: #fafafa url(images/fhbg.gif) repeat-x bottom;
|
||||
position: relative;
|
||||
border: 1px solid #ccc;
|
||||
border-bottom: 0px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.flexigrid div.hDiv table
|
||||
{
|
||||
border-right: 1px solid #fff;
|
||||
}
|
||||
|
||||
.flexigrid div.cDrag
|
||||
{
|
||||
float: left;
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.flexigrid div.cDrag div
|
||||
{
|
||||
float: left;
|
||||
background: none;
|
||||
display: block;
|
||||
position: absolute;
|
||||
height: 24px;
|
||||
width: 5px;
|
||||
cursor: col-resize;
|
||||
}
|
||||
|
||||
.flexigrid div.cDrag div:hover, .flexigrid div.cDrag div.dragging
|
||||
{
|
||||
background: url(images/line.gif) repeat-y 2px center;
|
||||
}
|
||||
|
||||
.flexigrid div.iDiv
|
||||
{
|
||||
border: 1px solid #316ac5;
|
||||
position: absolute;
|
||||
overflow: visible;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.flexigrid div.iDiv input, .flexigrid div.iDiv select, .flexigrid div.iDiv textarea
|
||||
{
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.flexigrid div.iDiv input.tb
|
||||
{
|
||||
border: 0px;
|
||||
padding: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0px;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.flexigrid div.bDiv
|
||||
{
|
||||
border: 1px solid #ccc;
|
||||
border-top: 0px;
|
||||
background: #fff;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.flexigrid div.bDiv table
|
||||
{
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.flexigrid div.hGrip
|
||||
{
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
height: 5px;
|
||||
width: 5px;
|
||||
background: url(images/line.gif) repeat-x center;
|
||||
margin-right: 1px;
|
||||
cursor: col-resize;
|
||||
}
|
||||
|
||||
.flexigrid div.hGrip:hover, .flexigrid div.hGrip.hgOver
|
||||
{
|
||||
border-right: 1px solid #999;
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
.flexigrid div.vGrip
|
||||
{
|
||||
height: 5px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background: #fafafa url(images/wbg.gif) repeat-x 0px -1px;
|
||||
border: 1px solid #ccc;
|
||||
border-top: 0px;
|
||||
text-align: center;
|
||||
cursor: row-resize;
|
||||
}
|
||||
|
||||
.flexigrid div.vGrip span
|
||||
{
|
||||
display: block;
|
||||
margin: 1px auto;
|
||||
width: 20px;
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
border-top: 1px solid #aaa;
|
||||
border-bottom: 1px solid #aaa;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.flexigrid div.hDiv th, .flexigrid div.bDiv td /* common cell properties*/
|
||||
{
|
||||
text-align: left;
|
||||
border-right: 1px solid #ddd;
|
||||
border-left: 1px solid #fff;
|
||||
overflow: hidden;
|
||||
vertical-align: top !important;
|
||||
}
|
||||
|
||||
.flexigrid div.hDiv th div, .flexigrid div.bDiv td div, div.colCopy div/* common inner cell properties*/
|
||||
{
|
||||
padding: 5px;
|
||||
border-left: 0px solid #fff;
|
||||
}
|
||||
|
||||
.flexigrid div.hDiv th, div.colCopy
|
||||
{
|
||||
font-weight: normal;
|
||||
height: 24px;
|
||||
cursor: default;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.colCopy {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
background: #fafafa url(images/fhbg.gif) repeat-x bottom;
|
||||
border: 1px solid #ccc;
|
||||
border-bottom: 0px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.flexigrid div.hDiv th.sorted
|
||||
{
|
||||
background: url(images/wbg.gif) repeat-x 0px -1px;
|
||||
border-bottom: 0px solid #ccc;
|
||||
}
|
||||
|
||||
.flexigrid div.hDiv th.thOver
|
||||
{
|
||||
}
|
||||
|
||||
.flexigrid div.hDiv th.thOver div, .flexigrid div.hDiv th.sorted.thOver div
|
||||
{
|
||||
border-bottom: 1px solid orange;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
.flexigrid div.hDiv th.sorted div
|
||||
{
|
||||
border-bottom: 0px solid #ccc;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.flexigrid div.hDiv th.thMove
|
||||
{
|
||||
background: #fff;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.flexigrid div.hDiv th.sorted.thMove div
|
||||
{
|
||||
border-bottom: 1px solid #fff;
|
||||
padding-bottom: 4px
|
||||
}
|
||||
|
||||
.flexigrid div.hDiv th.thMove div
|
||||
{
|
||||
background: #fff !important;
|
||||
}
|
||||
|
||||
.flexigrid div.hDiv th div.sdesc
|
||||
{
|
||||
background: url(images/dn.png) no-repeat center top;
|
||||
}
|
||||
|
||||
.flexigrid div.hDiv th div.sasc
|
||||
{
|
||||
background: url(images/up.png) no-repeat center top;
|
||||
}
|
||||
|
||||
.flexigrid div.bDiv td
|
||||
{
|
||||
border-bottom: 1px solid #fff;
|
||||
vertical-align: top;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.flexigrid div.hDiv th div
|
||||
{
|
||||
}
|
||||
|
||||
.flexigrid span.cdropleft
|
||||
{
|
||||
display: block;
|
||||
background: url(images/prev.gif) no-repeat -4px center;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
position: relative;
|
||||
top: -24px;
|
||||
margin-bottom: -24px;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.flexigrid div.hDiv span.cdropright
|
||||
{
|
||||
display: block;
|
||||
background: url(images/next.gif) no-repeat 12px center;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
float: right;
|
||||
position: relative;
|
||||
top: -24px;
|
||||
margin-bottom: -24px;
|
||||
}
|
||||
|
||||
|
||||
.flexigrid div.bDiv td div
|
||||
{
|
||||
border-top: 0px solid #fff;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
|
||||
.flexigrid tr td.sorted
|
||||
{
|
||||
background: #f3f3f3;
|
||||
border-right: 1px solid #ddd;
|
||||
border-bottom: 1px solid #f3f3f3;
|
||||
}
|
||||
|
||||
.flexigrid tr td.sorted div
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
.flexigrid tr.erow td
|
||||
{
|
||||
background: #f7f7f7;
|
||||
border-bottom: 1px solid #f7f7f7;
|
||||
}
|
||||
|
||||
.flexigrid tr.erow td.sorted
|
||||
{
|
||||
background: #e3e3e3;
|
||||
border-bottom: 1px solid #e3e3e3;
|
||||
}
|
||||
|
||||
.flexigrid tr.erow td.sorted div
|
||||
{
|
||||
}
|
||||
|
||||
.flexigrid div.bDiv tr:hover td,
|
||||
.flexigrid div.bDiv tr:hover td.sorted,
|
||||
.flexigrid div.bDiv tr.trOver td.sorted,
|
||||
.flexigrid div.bDiv tr.trOver td
|
||||
{
|
||||
background: #d9ebf5;
|
||||
border-left: 1px solid #eef8ff;
|
||||
border-bottom: 1px dotted #a8d8eb;
|
||||
}
|
||||
|
||||
.flexigrid div.bDiv tr.trSelected:hover td,
|
||||
.flexigrid div.bDiv tr.trSelected:hover td.sorted,
|
||||
.flexigrid div.bDiv tr.trOver.trSelected td.sorted,
|
||||
.flexigrid div.bDiv tr.trOver.trSelected td,
|
||||
.flexigrid tr.trSelected td.sorted,
|
||||
.flexigrid tr.trSelected td
|
||||
{
|
||||
background: #d5effc url(images/hl.png) repeat-x top;
|
||||
border-right: 1px solid #d2e3ec;
|
||||
border-left: 1px solid #eef8ff;
|
||||
border-bottom: 1px solid #a8d8eb;
|
||||
}
|
||||
|
||||
/* novstripe adjustments */
|
||||
|
||||
.flexigrid.novstripe .bDiv table
|
||||
{
|
||||
border-bottom: 1px solid #ccc;
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.flexigrid.novstripe div.bDiv td
|
||||
{
|
||||
border-right-color: #fff;
|
||||
}
|
||||
|
||||
.flexigrid.novstripe div.bDiv tr.erow td.sorted
|
||||
{
|
||||
border-right-color: #e3e3e3;
|
||||
}
|
||||
|
||||
.flexigrid.novstripe div.bDiv tr td.sorted
|
||||
{
|
||||
border-right-color: #f3f3f3;
|
||||
}
|
||||
|
||||
.flexigrid.novstripe div.bDiv tr.erow td
|
||||
{
|
||||
border-right-color: #f7f7f7;
|
||||
border-left-color: #f7f7f7;
|
||||
}
|
||||
|
||||
.flexigrid.novstripe div.bDiv tr.trSelected:hover td,
|
||||
.flexigrid.novstripe div.bDiv tr.trSelected:hover td.sorted,
|
||||
.flexigrid.novstripe div.bDiv tr.trOver.trSelected td.sorted,
|
||||
.flexigrid.novstripe div.bDiv tr.trOver.trSelected td,
|
||||
.flexigrid.novstripe tr.trSelected td.sorted,
|
||||
.flexigrid.novstripe tr.trSelected td
|
||||
{
|
||||
border-right: 1px solid #0066FF;
|
||||
border-left: 1px solid #0066FF;
|
||||
}
|
||||
|
||||
.flexigrid.novstripe div.bDiv tr.trOver td, .flexigrid.novstripe div.bDiv tr:hover td
|
||||
{
|
||||
border-left-color: #d9ebf5;
|
||||
border-right-color: #d9ebf5;
|
||||
}
|
||||
|
||||
/* end novstripe */
|
||||
|
||||
.flexigrid div.pDiv
|
||||
{
|
||||
background: url(images/wbg.gif) repeat-x 0 -1px;
|
||||
border: 1px solid #ccc;
|
||||
border-top: 0px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.flexigrid div.pDiv div.pDiv2
|
||||
{
|
||||
margin: 3px;
|
||||
margin-left: -2px;
|
||||
float: left;
|
||||
width: 1024px;
|
||||
}
|
||||
|
||||
div.pGroup
|
||||
{
|
||||
float: left;
|
||||
background: none;
|
||||
height: 24px;
|
||||
margin: 0px 5px;
|
||||
}
|
||||
|
||||
.flexigrid div.pDiv .pPageStat, .flexigrid div.pDiv .pcontrol
|
||||
{
|
||||
position: relative;
|
||||
|
||||
top: 5px;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.flexigrid div.pDiv input
|
||||
{
|
||||
vertical-align: text-top;
|
||||
position: relative;
|
||||
top: -5px;
|
||||
}
|
||||
|
||||
.flexigrid div.pDiv div.pButton
|
||||
{
|
||||
float: left;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border: 0px;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.flexigrid div.pDiv div.pButton:hover, .flexigrid div.pDiv div.pButton.pBtnOver
|
||||
{
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border: 1px solid #ccc;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.flexigrid div.pDiv div.pButton span
|
||||
{
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.flexigrid div.pDiv div.pButton:hover span, .flexigrid div.pDiv div.pButton.pBtnOver span
|
||||
{
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
border-top: 1px solid #fff;
|
||||
border-left: 1px solid #fff;
|
||||
}
|
||||
|
||||
|
||||
.flexigrid .pSearch
|
||||
{
|
||||
background: url(images/magnifier.png) no-repeat center;
|
||||
}
|
||||
|
||||
.flexigrid .pFirst
|
||||
{
|
||||
background: url(images/first.gif) no-repeat center;
|
||||
}
|
||||
|
||||
.flexigrid .pPrev
|
||||
{
|
||||
background: url(images/prev.gif) no-repeat center;
|
||||
}
|
||||
|
||||
.flexigrid .pNext
|
||||
{
|
||||
background: url(images/next.gif) no-repeat center;
|
||||
}
|
||||
|
||||
.flexigrid .pLast
|
||||
{
|
||||
background: url(images/last.gif) no-repeat center;
|
||||
}
|
||||
|
||||
.flexigrid .pReload
|
||||
{
|
||||
background: url(images/load.png) no-repeat center;
|
||||
}
|
||||
|
||||
.flexigrid .pReload.loading
|
||||
{
|
||||
background: url(images/load.gif) no-repeat center;
|
||||
}
|
||||
|
||||
/* ie adjustments */
|
||||
|
||||
.flexigrid.ie div.hDiv th div, .flexigrid.ie div.bDiv td div, div.colCopy.ie div/* common inner cell properties*/
|
||||
{
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 854 B |
|
Before Width: | Height: | Size: 955 B |
|
Before Width: | Height: | Size: 111 B |
|
Before Width: | Height: | Size: 220 B |
|
Before Width: | Height: | Size: 836 B |
|
Before Width: | Height: | Size: 217 B |
|
Before Width: | Height: | Size: 189 B |
|
Before Width: | Height: | Size: 220 B |
|
Before Width: | Height: | Size: 817 B |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 827 B |
|
Before Width: | Height: | Size: 615 B |
|
Before Width: | Height: | Size: 185 B |
|
Before Width: | Height: | Size: 186 B |
|
Before Width: | Height: | Size: 224 B |
|
Before Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 868 B |
|
Before Width: | Height: | Size: 837 B |
|
Before Width: | Height: | Size: 828 B |
|
Before Width: | Height: | Size: 50 KiB |
|
|
@ -1,594 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Flexigrid</title>
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/flexigrid/flexigrid.css">
|
||||
<script type="text/javascript" src="lib/jquery/jquery.js"></script>
|
||||
<script type="text/javascript" src="flexigrid.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<img src="flash.png" alt="Flexigrid" width="960" height="483" usemap="#Map" style="visibility:hidden" onload="$(this).css({visibility:'visible',display:'none'}).fadeIn('slow');" title="Flexigrid" border="0" />
|
||||
<map name="Map" id="Map"><area shape="rect" coords="671,29,853,72" href="flexigrid.zip" alt="Download" />
|
||||
</map>
|
||||
|
||||
<h1 class="title" style="display: none"><strong>Flexigrid</strong> for jQuery (beta) <span style="font-size:12px">by Paulo P. Marinas</span></h1>
|
||||
|
||||
<div class="update" style="height: auto">
|
||||
<b class="top">What is it?</b>
|
||||
|
||||
<p>Lightweight but rich data grid with resizable columns and a scrolling data to match the headers, plus an ability to connect to an xml based data source using Ajax to load the content. </p>
|
||||
<p>Similar in concept with the Ext Grid only its pure jQuery love, which makes it light weight and follows the jQuery mantra of running with the least amount of configuration.</p>
|
||||
<p><b>Features</b></p>
|
||||
|
||||
<ul type="square">
|
||||
<li>Resizable columns</li>
|
||||
<li>Resizable height and width</li>
|
||||
<li>Sortable column headers</li>
|
||||
<li>Cool theme</li>
|
||||
<li>Can convert an ordinary table</li>
|
||||
<li>Ability to connect to an ajax data source (XML and JSON[new])</li>
|
||||
<li>Paging</li><li>Show/hide columns</li>
|
||||
<li>Toolbar (new)</li>
|
||||
<li>Search (new)</li>
|
||||
<li>Accessible API</li>
|
||||
<li>Many more</li>
|
||||
</ul>
|
||||
<p>I'm planning to add an Editable and Resortable rows feature, as well as other cool GUI features. </p>
|
||||
<p>One of my main goal for the plugin is ultimately to keep it lightweight, maybe under 20k when compressed. Because otherwise you should probably stick with Ext Grid or YUI data table.</p>
|
||||
</div>
|
||||
<br />
|
||||
<div class="update2">
|
||||
<p>1.0b3 Released 14 July 2008</p>
|
||||
<p align="right">
|
||||
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=paulopmx@gmail.com" target="_blank" class="beer">Buy me a coffee here</a>
|
||||
</p>
|
||||
</div>
|
||||
<br />
|
||||
<div class="update" style="height: auto">
|
||||
<b class="top">What's New Version 1.0b3</b>
|
||||
<ul type="square">
|
||||
<li>Fixed paging problem on multiple instances</li>
|
||||
<li>Mootools and Prototype noConflict() compatibility problems fixed</li>
|
||||
<li>New onError event on ajax interaction, (it will pass what the server said in a variable called data), allowing you to handle server problems</li>
|
||||
<li>New $().flexAddData method, allows you to directly add new data to the grid using your own data source.</li>
|
||||
<li>New preProcess API, allows you to modify or process data sent by server before passing it to Flexigrid, allowing you to use your own JSON format for example.</li>
|
||||
<li>Single Rows Select just use { singleSelect: true } in the options</li>
|
||||
<li>There are other bugs that were reported and fixed as well, but forgot what they were :-)</li>
|
||||
<li>IE6 Support fixes</li>
|
||||
<li>CSS Bug fixes</li>
|
||||
</ul>
|
||||
<b class="top">What's New Version 1.0b2</b>
|
||||
<ul type="square">
|
||||
<li>Resizable Width</li>
|
||||
<li>JSON Support</li>
|
||||
<li>Toolbar</li>
|
||||
<li>Table Toggle Button</li>
|
||||
<li>Show/Hide Columns control have been move to the column headers (try it by mouseovering a header and clicking a black triangle on the right);</li>
|
||||
<li>Quick Search</li>
|
||||
<li>IE6 Support fixes</li>
|
||||
<li>CSS Bug fixes</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<p>
|
||||
As I still don't have time to build a full pledge support or community site, which I'm planning to, these are usually the questions I receive:
|
||||
</p>
|
||||
<div class="update">
|
||||
|
||||
<b class="top">FAQ</b>
|
||||
<ol>
|
||||
<li>Paulo this is awesome. How can I show my appreciation?<br />Answer: Normally people say buy me a beer, but it slows me down. <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=paulopmx@gmail.com" target="_blank" class="beer">Buy me a coffee here</a><br /><br /></li>
|
||||
<li>Paulo this is awesome. How can I contact you? <br />Answer: <a href="http://www.webplicity.net/contact">http://www.webplicity.net/contact</a><br /><br /></li>
|
||||
<li>Do you have a forum where I can post a message? <br />Answer: Not yet. But I hang out here <a href="http://codeigniter.com/forums/viewthread/75326/">http://codeigniter.com/forums/viewthread/75326/</a><br /><br /></li>
|
||||
<li>What browsers does Flexigrid support? <br />Answer: Currently I'm testing only for IE6/IE7,Firefox 2,Opera 9.x,Safari 3.0<br /><br /></li>
|
||||
<li>Can I contribute code/Suggest a feature? <br />Answer: Sure you can, Quick Search and Toolbar was actually suggested by Marcos Aurélio, although I can't promise I can actually include it, I need to see if it doesn't conflict my primary goals.<br /><br /></li>
|
||||
<li>Can I use it for personal or commercial projects/modify it/hack it? <br />Answer: Go ahead? No worries. Although, I'd appreciate a heads up<br /><br /></li>
|
||||
<li>I have a problem. How do I use it in Drupal/WordPress/Etc?<br /> Answer: Hmmm..I haven't actually tested in those yet, but I'm planning to just have patience, or maybe if another guy has the answer they can email me and I'll post it here.<br /><br /></li>
|
||||
<li>Can I connect this to a form or add Parameters? <br />Answer: Yes. Problem is I haven't built documentation on the API yet. If you are any good with Javascript, you can probably find it, I put a lot of comments in the code<br /><br /></li>
|
||||
<li>When are you going to make a decent site with support and a community? <br />Answer: Maybe in a month or two, fact is I have a day job. I'm considering building a community if I get enough support.<br /><br /></li>
|
||||
</ol>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="update">
|
||||
<b class="top">Files you need</b>
|
||||
<ul type="square">
|
||||
<li>Of course you need the <a href="http://www.jquery.com">jQuery script</a></li>
|
||||
<li><a href="flexigrid.zip">and the FlexiGrid Plugin Pack(32K)</a> which includes the js, css, and images you need to run the Flexigrid</li>
|
||||
</ul>
|
||||
</div>
|
||||
<br />
|
||||
<div class="update">
|
||||
<b class="top">How to use</b>
|
||||
<p>
|
||||
My appologies, but no time to make a thorough guide on how to use it yet, but I did make some examples below.
|
||||
</p>
|
||||
<p>
|
||||
For the Third example you need to generate an
|
||||
XML file with a very specific format, just use the same format to generate an XML file using any backend programming language.
|
||||
</p>
|
||||
<p>
|
||||
<a href="post.php" target="_blank">The sample xml file is here</a>
|
||||
</p>
|
||||
<p>
|
||||
And due to consistent public demand. My sample PHP code for post.php. Please don't forget to change hostname, username, password and dbname.
|
||||
|
||||
</p>
|
||||
<p>
|
||||
<a href="#" onclick="$(this).parent().next().toggle(); return false;">Show sample PHP code for XML</a>
|
||||
</p>
|
||||
|
||||
<div class="code">
|
||||
|
||||
<p>function runSQL($rsql) {</p>
|
||||
<p>$connect = mysql_connect($hostname,$username,$password) or die ("Error: could not connect to database");<br />
|
||||
$db = mysql_select_db($dbname);</p>
|
||||
|
||||
<p>$result = mysql_query($rsql) or die ('test');<br />
|
||||
return $result;<br />
|
||||
mysql_close($connect);<br />
|
||||
}</p>
|
||||
<p>function countRec($fname,$tname) {<br />
|
||||
$sql = "SELECT count($fname) FROM $tname ";<br />
|
||||
|
||||
$result = runSQL($sql);<br />
|
||||
while ($row = mysql_fetch_array($result)) {<br />
|
||||
return $row[0];<br />
|
||||
} <br />
|
||||
}<br />
|
||||
$page = $_POST['page'];<br />
|
||||
|
||||
$rp = $_POST['rp'];<br />
|
||||
$sortname = $_POST['sortname'];<br />
|
||||
$sortorder = $_POST['sortorder'];</p>
|
||||
<p>if (!$sortname) $sortname = 'name';<br />
|
||||
if (!$sortorder) $sortorder = 'desc';</p>
|
||||
<p>$sort = "ORDER BY $sortname $sortorder";</p>
|
||||
|
||||
<p>if (!$page) $page = 1;<br />
|
||||
if (!$rp) $rp = 10;</p>
|
||||
<p>$start = (($page-1) * $rp);</p>
|
||||
<p>$limit = "LIMIT $start, $rp";</p>
|
||||
<p>$sql = "SELECT iso,name,printable_name,iso3,numcode FROM country $sort $limit";<br />
|
||||
$result = runSQL($sql);</p>
|
||||
|
||||
<p>$total = countRec('iso','country');</p>
|
||||
<p>header("Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); <br />
|
||||
header("Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" ); <br />
|
||||
|
||||
header("Cache-Control: no-cache, must-revalidate" ); <br />
|
||||
header("Pragma: no-cache" );<br />
|
||||
header("Content-type: text/xml");<br />
|
||||
|
||||
$xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";<br />
|
||||
$xml .= "<rows>";<br />
|
||||
$xml .= "<page>$page</page>";<br />
|
||||
|
||||
$xml .= "<total>$total</total>";<br />
|
||||
while ($row = mysql_fetch_array($result)) {<br />
|
||||
$xml .= "<row id='".$row['iso']."'>";<br />
|
||||
|
||||
$xml .= "<cell><![CDATA[".$row['iso']."]]></cell>"; <br />
|
||||
$xml .= "<cell><![CDATA[".utf8_encode($row['name'])."]]></cell>";<br />
|
||||
|
||||
$xml .= "<cell><![CDATA[".utf8_encode($row['printable_name'])."]]></cell>"; <br />
|
||||
$xml .= "<cell><![CDATA[".utf8_encode($row['iso3'])."]]></cell>"; <br />
|
||||
|
||||
$xml .= "<cell><![CDATA[".utf8_encode($row['numcode'])."]]></cell>"; <br />
|
||||
$xml .= "</row>"; <br />
|
||||
}</p>
|
||||
|
||||
<p>$xml .= "</rows>";<br />
|
||||
echo $xml;</p>
|
||||
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<a href="#" onclick="$(this).parent().next().toggle(); return false;">Show sample PHP code for JSON</a>
|
||||
</p>
|
||||
<div class="code">
|
||||
|
||||
<p>function runSQL($rsql) {</p>
|
||||
<p>$connect = mysql_connect($hostname,$username,$password) or die ("Error: could not connect to database");<br />
|
||||
$db = mysql_select_db($dbname);</p>
|
||||
|
||||
<p>$result = mysql_query($rsql) or die ('test');<br />
|
||||
return $result;<br />
|
||||
mysql_close($connect);<br />
|
||||
}</p>
|
||||
<p>function countRec($fname,$tname) {<br />
|
||||
$sql = "SELECT count($fname) FROM $tname ";<br />
|
||||
|
||||
$result = runSQL($sql);<br />
|
||||
while ($row = mysql_fetch_array($result)) {<br />
|
||||
return $row[0];<br />
|
||||
} <br />
|
||||
}<br />
|
||||
$page = $_POST['page'];<br />
|
||||
|
||||
$rp = $_POST['rp'];<br />
|
||||
$sortname = $_POST['sortname'];<br />
|
||||
$sortorder = $_POST['sortorder'];</p>
|
||||
<p>if (!$sortname) $sortname = 'name';<br />
|
||||
if (!$sortorder) $sortorder = 'desc';</p>
|
||||
<p>$sort = "ORDER BY $sortname $sortorder";</p>
|
||||
|
||||
<p>if (!$page) $page = 1;<br />
|
||||
if (!$rp) $rp = 10;</p>
|
||||
<p>$start = (($page-1) * $rp);</p>
|
||||
<p>$limit = "LIMIT $start, $rp";</p>
|
||||
<p>$sql = "SELECT iso,name,printable_name,iso3,numcode FROM country $sort $limit";<br />
|
||||
$result = runSQL($sql);</p>
|
||||
|
||||
<p>$total = countRec('iso','country');</p>
|
||||
<p>header("Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); <br />
|
||||
header("Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" ); <br />
|
||||
header("Cache-Control: no-cache, must-revalidate" ); <br />
|
||||
header("Pragma: no-cache" );<br />
|
||||
header("Content-type: text/x-json");<br />
|
||||
$json = "";<br />
|
||||
$json .= "{\n";<br />
|
||||
$json .= "page: $page,\n";<br />
|
||||
$json .= "total: $total,\n";<br />
|
||||
$json .= "rows: [";<br />
|
||||
$rc = false;<br />
|
||||
while ($row = mysql_fetch_array($result)) {<br />
|
||||
if ($rc) $json .= ",";<br />
|
||||
$json .= "\n{";<br />
|
||||
$json .= "id:'".$row['iso']."',";<br />
|
||||
$json .= "cell:['".$row['iso']."'";<br />
|
||||
$json .= ",'".addslashes($row['name'])."'";<br />
|
||||
$json .= ",'".addslashes($row['printable_name'])."'";<br />
|
||||
$json .= ",'".addslashes($row['iso3'])."'";<br />
|
||||
$json .= ",'".addslashes($row['numcode'])."']";<br />
|
||||
$json .= "}";<br />
|
||||
$rc = true; <br />
|
||||
}<br />
|
||||
$json .= "]\n";<br />
|
||||
$json .= "}";<br />
|
||||
echo $json;</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<b>Example 1</b>
|
||||
<p>
|
||||
The most basic example with the zero configuration, with a table converted into flexigrid
|
||||
(<a href="#" onclick="$(this).parent().next().toggle(); return false;">Show sample code</a>)
|
||||
</p>
|
||||
<div class="code">
|
||||
<pre>$('.flexme').flexigrid();</pre>
|
||||
</div>
|
||||
<table class="flexme1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="100">Col 1</th>
|
||||
<th width="100">Col 2</th>
|
||||
<th width="100">Col 3 is a long header name</th>
|
||||
<th width="300">Col 4</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>This is data 1 with overflowing content</td>
|
||||
<td>This is data 2</td>
|
||||
<td>This is data 3</td>
|
||||
<td>This is data 4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>This is data 1</td>
|
||||
<td>This is data 2</td>
|
||||
<td>This is data 3</td>
|
||||
<td>This is data 4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>This is data 1</td>
|
||||
<td>This is data 2</td>
|
||||
<td>This is data 3</td>
|
||||
<td>This is data 4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>This is data 1</td>
|
||||
<td>This is data 2</td>
|
||||
<td>This is data 3</td>
|
||||
<td>This is data 4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>This is data 1</td>
|
||||
<td>This is data 2</td>
|
||||
<td>This is data 3</td>
|
||||
<td>This is data 4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>This is data 1</td>
|
||||
<td>This is data 2</td>
|
||||
<td>This is data 3</td>
|
||||
<td>This is data 4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>This is data 1</td>
|
||||
<td>This is data 2</td>
|
||||
<td>This is data 3</td>
|
||||
<td>This is data 4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>This is data 1</td>
|
||||
<td>This is data 2</td>
|
||||
<td>This is data 3</td>
|
||||
<td>This is data 4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>This is data 1</td>
|
||||
<td>This is data 2</td>
|
||||
<td>This is data 3</td>
|
||||
<td>This is data 4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>This is data 1</td>
|
||||
<td>This is data 2</td>
|
||||
<td>This is data 3</td>
|
||||
<td>This is data 4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>This is data 1</td>
|
||||
<td>This is data 2</td>
|
||||
<td>This is data 3</td>
|
||||
<td>This is data 4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>This is data 1</td>
|
||||
<td>This is data 2</td>
|
||||
<td>This is data 3</td>
|
||||
<td>This is data 4</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<br />
|
||||
|
||||
<b>Example 2</b>
|
||||
<p>
|
||||
Table converted into flexigrid with height, and width set to auto, stripes remove.
|
||||
(<a href="#" onclick="$(this).parent().next().toggle(); return false;">Show sample code</a>)
|
||||
</p>
|
||||
<div class="code">
|
||||
<pre>$('.flexme2').flexigrid({height:'auto',striped:false});</pre>
|
||||
</div>
|
||||
<table class="flexme2">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="100">Col 1</th>
|
||||
<th width="100">Col 2</th>
|
||||
<th width="100">Col 3 is a long header name</th>
|
||||
<th width="300">Col 4</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>This is data 1 with overflowing content</td>
|
||||
<td>This is data 2</td>
|
||||
<td>This is data 3</td>
|
||||
<td>This is data 4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>This is data 1</td>
|
||||
<td>This is data 2</td>
|
||||
<td>This is data 3</td>
|
||||
<td>This is data 4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>This is data 1</td>
|
||||
<td>This is data 2</td>
|
||||
<td>This is data 3</td>
|
||||
<td>This is data 4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>This is data 1</td>
|
||||
<td>This is data 2</td>
|
||||
<td>This is data 3</td>
|
||||
<td>This is data 4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>This is data 1</td>
|
||||
<td>This is data 2</td>
|
||||
<td>This is data 3</td>
|
||||
<td>This is data 4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>This is data 1</td>
|
||||
<td>This is data 2</td>
|
||||
<td>This is data 3</td>
|
||||
<td>This is data 4</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br />
|
||||
|
||||
<b>Example 3</b>
|
||||
<p>
|
||||
Flexigrid with a dynamic data, paging, search, toolbar, and connected to an JSON file.
|
||||
(<a href="#" onclick="$(this).parent().next().toggle(); return false;">Show sample code</a>)
|
||||
</p>
|
||||
<div class="code">
|
||||
|
||||
<style>
|
||||
|
||||
.flexigrid div.fbutton .add
|
||||
{
|
||||
background: url(css/images/add.png) no-repeat center left;
|
||||
}
|
||||
|
||||
.flexigrid div.fbutton .delete
|
||||
{
|
||||
background: url(css/images/close.png) no-repeat center left;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<pre>
|
||||
$("#flex1").flexigrid
|
||||
(
|
||||
{
|
||||
url: 'post2.php',
|
||||
dataType: 'json',
|
||||
colModel : [
|
||||
{display: 'ISO', name : 'iso', width : 40, sortable : true, align: 'center'},
|
||||
{display: 'Name', name : 'name', width : 180, sortable : true, align: 'left'},
|
||||
{display: 'Printable Name', name : 'printable_name', width : 120, sortable : true, align: 'left'},
|
||||
{display: 'ISO3', name : 'iso3', width : 130, sortable : true, align: 'left', hide: true},
|
||||
{display: 'Number Code', name : 'numcode', width : 80, sortable : true, align: 'right'}
|
||||
],
|
||||
buttons : [
|
||||
{name: 'Add', bclass: 'add', onpress : test},
|
||||
{name: 'Delete', bclass: 'delete', onpress : test},
|
||||
{separator: true}
|
||||
],
|
||||
searchitems : [
|
||||
{display: 'ISO', name : 'iso'},
|
||||
{display: 'Name', name : 'name', isdefault: true}
|
||||
],
|
||||
sortname: "iso",
|
||||
sortorder: "asc",
|
||||
usepager: true,
|
||||
title: 'Countries',
|
||||
useRp: true,
|
||||
rp: 15,
|
||||
showTableToggleBtn: true,
|
||||
width: 700,
|
||||
height: 200
|
||||
}
|
||||
);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
||||
.flexigrid div.fbutton .add
|
||||
{
|
||||
background: url(css/images/add.png) no-repeat center left;
|
||||
}
|
||||
|
||||
.flexigrid div.fbutton .delete
|
||||
{
|
||||
background: url(css/images/close.png) no-repeat center left;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<table id="flex1" style="display:none"></table>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
|
||||
$('.flexme1').flexigrid();
|
||||
$('.flexme2').flexigrid({height:'auto',striped:false});
|
||||
|
||||
$("#flex1").flexigrid
|
||||
(
|
||||
{
|
||||
url: 'post2.php',
|
||||
dataType: 'json',
|
||||
colModel : [
|
||||
{display: 'ISO', name : 'iso', width : 40, sortable : true, align: 'center'},
|
||||
{display: 'Name', name : 'name', width : 180, sortable : true, align: 'left'},
|
||||
{display: 'Printable Name', name : 'printable_name', width : 120, sortable : true, align: 'left'},
|
||||
{display: 'ISO3', name : 'iso3', width : 130, sortable : true, align: 'left', hide: true},
|
||||
{display: 'Number Code', name : 'numcode', width : 80, sortable : true, align: 'right'}
|
||||
],
|
||||
buttons : [
|
||||
{name: 'Add', bclass: 'add', onpress : test},
|
||||
{name: 'Delete', bclass: 'delete', onpress : test},
|
||||
{separator: true}
|
||||
],
|
||||
searchitems : [
|
||||
{display: 'ISO', name : 'iso'},
|
||||
{display: 'Name', name : 'name', isdefault: true}
|
||||
],
|
||||
sortname: "iso",
|
||||
sortorder: "asc",
|
||||
usepager: true,
|
||||
title: 'Countries',
|
||||
useRp: true,
|
||||
rp: 15,
|
||||
showTableToggleBtn: true,
|
||||
width: 700,
|
||||
height: 200
|
||||
}
|
||||
);
|
||||
|
||||
function test(com,grid)
|
||||
{
|
||||
if (com=='Delete')
|
||||
{
|
||||
confirm('Delete ' + $('.trSelected',grid).length + ' items?')
|
||||
}
|
||||
else if (com=='Add')
|
||||
{
|
||||
alert('Add New Item');
|
||||
}
|
||||
}
|
||||
|
||||
$("#flex2").flexigrid
|
||||
(
|
||||
{
|
||||
url: 'post2.php',
|
||||
dataType: 'json',
|
||||
colModel : [
|
||||
{display: 'ISO', name : 'iso', width : 40, sortable : true, align: 'center'},
|
||||
{display: 'Name', name : 'name', width : 180, sortable : true, align: 'left'},
|
||||
{display: 'Printable Name', name : 'printable_name', width : 120, sortable : true, align: 'left'},
|
||||
{display: 'ISO3', name : 'iso3', width : 130, sortable : true, align: 'left', hide: true},
|
||||
{display: 'Number Code', name : 'numcode', width : 80, sortable : true, align: 'right'}
|
||||
],
|
||||
buttons : [
|
||||
{name: 'Add', bclass: 'add', onpress : test},
|
||||
{name: 'Delete', bclass: 'delete', onpress : test},
|
||||
{separator: true}
|
||||
],
|
||||
searchitems : [
|
||||
{display: 'ISO', name : 'iso'},
|
||||
{display: 'Name', name : 'name', isdefault: true}
|
||||
],
|
||||
sortname: "iso",
|
||||
sortorder: "asc",
|
||||
usepager: true,
|
||||
title: 'Countries',
|
||||
useRp: true,
|
||||
rp: 15,
|
||||
showTableToggleBtn: true,
|
||||
width: 700,
|
||||
height: 200
|
||||
}
|
||||
);
|
||||
|
||||
$('b.top').click
|
||||
(
|
||||
function ()
|
||||
{
|
||||
$(this).parent().toggleClass('fh');
|
||||
}
|
||||
);
|
||||
|
||||
</script>
|
||||
|
||||
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
_uacct = "UA-3875581-1";
|
||||
urchinTracker();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
11
webroot/js/flexigrid/lib/jquery/jquery.js
vendored
|
|
@ -1,80 +0,0 @@
|
|||
<?
|
||||
|
||||
function runSQL($rsql) {
|
||||
|
||||
$db['default']['hostname'] = "localhost";
|
||||
$db['default']['username'] = '';
|
||||
$db['default']['password'] = "";
|
||||
$db['default']['database'] = "";
|
||||
|
||||
$db['live']['hostname'] = 'localhost';
|
||||
$db['live']['username'] = '';
|
||||
$db['live']['password'] = '';
|
||||
$db['live']['database'] = '';
|
||||
|
||||
$active_group = 'default';
|
||||
|
||||
$base_url = "http://".$_SERVER['HTTP_HOST'];
|
||||
$base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
|
||||
if (strpos($base_url,'webplicity.net')) $active_group = "live";
|
||||
|
||||
$connect = mysql_connect($db[$active_group]['hostname'],$db[$active_group]['username'],$db[$active_group]['password']) or die ("Error: could not connect to database");
|
||||
$db = mysql_select_db($db[$active_group]['database']);
|
||||
|
||||
$result = mysql_query($rsql) or die ('test');
|
||||
return $result;
|
||||
mysql_close($connect);
|
||||
}
|
||||
|
||||
function countRec($fname,$tname) {
|
||||
$sql = "SELECT count($fname) FROM $tname ";
|
||||
$result = runSQL($sql);
|
||||
while ($row = mysql_fetch_array($result)) {
|
||||
return $row[0];
|
||||
}
|
||||
}
|
||||
$page = $_POST['page'];
|
||||
$rp = $_POST['rp'];
|
||||
$sortname = $_POST['sortname'];
|
||||
$sortorder = $_POST['sortorder'];
|
||||
|
||||
if (!$sortname) $sortname = 'name';
|
||||
if (!$sortorder) $sortorder = 'desc';
|
||||
|
||||
$sort = "ORDER BY $sortname $sortorder";
|
||||
|
||||
if (!$page) $page = 1;
|
||||
if (!$rp) $rp = 10;
|
||||
|
||||
$start = (($page-1) * $rp);
|
||||
|
||||
$limit = "LIMIT $start, $rp";
|
||||
|
||||
$sql = "SELECT iso,name,printable_name,iso3,numcode FROM country $sort $limit";
|
||||
$result = runSQL($sql);
|
||||
|
||||
$total = countRec('iso','country');
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
|
||||
header("Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" );
|
||||
header("Cache-Control: no-cache, must-revalidate" );
|
||||
header("Pragma: no-cache" );
|
||||
header("Content-type: text/xml");
|
||||
$xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
|
||||
$xml .= "<rows>";
|
||||
$xml .= "<page>$page</page>";
|
||||
$xml .= "<total>$total</total>";
|
||||
while ($row = mysql_fetch_array($result)) {
|
||||
$xml .= "<row id='".$row['iso']."'>";
|
||||
$xml .= "<cell><![CDATA[".$row['iso']."]]></cell>";
|
||||
$xml .= "<cell><![CDATA[".utf8_encode($row['name'])."]]></cell>";
|
||||
//$xml .= "<cell><![CDATA[".print_r($_POST,true)."]]></cell>";
|
||||
$xml .= "<cell><![CDATA[".utf8_encode($row['printable_name'])."]]></cell>";
|
||||
$xml .= "<cell><![CDATA[".utf8_encode($row['iso3'])."]]></cell>";
|
||||
$xml .= "<cell><![CDATA[".utf8_encode($row['numcode'])."]]></cell>";
|
||||
$xml .= "</row>";
|
||||
}
|
||||
|
||||
$xml .= "</rows>";
|
||||
echo $xml;
|
||||
?>
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
<?
|
||||
|
||||
function runSQL($rsql) {
|
||||
|
||||
$db['default']['hostname'] = "localhost";
|
||||
$db['default']['username'] = '';
|
||||
$db['default']['password'] = "";
|
||||
$db['default']['database'] = "";
|
||||
|
||||
$db['live']['hostname'] = 'localhost';
|
||||
$db['live']['username'] = '';
|
||||
$db['live']['password'] = '';
|
||||
$db['live']['database'] = '';
|
||||
|
||||
$active_group = 'default';
|
||||
|
||||
$base_url = "http://".$_SERVER['HTTP_HOST'];
|
||||
$base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
|
||||
if (strpos($base_url,'webplicity.net')) $active_group = "live";
|
||||
|
||||
$connect = mysql_connect($db[$active_group]['hostname'],$db[$active_group]['username'],$db[$active_group]['password']) or die ("Error: could not connect to database");
|
||||
$db = mysql_select_db($db[$active_group]['database']);
|
||||
|
||||
$result = mysql_query($rsql) or die ($rsql);
|
||||
return $result;
|
||||
mysql_close($connect);
|
||||
}
|
||||
|
||||
function countRec($fname,$tname) {
|
||||
$sql = "SELECT count($fname) FROM $tname ";
|
||||
$result = runSQL($sql);
|
||||
while ($row = mysql_fetch_array($result)) {
|
||||
return $row[0];
|
||||
}
|
||||
}
|
||||
$page = $_POST['page'];
|
||||
$rp = $_POST['rp'];
|
||||
$sortname = $_POST['sortname'];
|
||||
$sortorder = $_POST['sortorder'];
|
||||
|
||||
if (!$sortname) $sortname = 'name';
|
||||
if (!$sortorder) $sortorder = 'desc';
|
||||
|
||||
$sort = "ORDER BY $sortname $sortorder";
|
||||
|
||||
if (!$page) $page = 1;
|
||||
if (!$rp) $rp = 10;
|
||||
|
||||
$start = (($page-1) * $rp);
|
||||
|
||||
$limit = "LIMIT $start, $rp";
|
||||
|
||||
$query = $_POST['query'];
|
||||
$qtype = $_POST['qtype'];
|
||||
|
||||
$where = "";
|
||||
if ($query) $where = " WHERE $qtype LIKE '%$query%' ";
|
||||
|
||||
$sql = "SELECT iso,name,printable_name,iso3,numcode FROM country $where $sort $limit";
|
||||
$result = runSQL($sql);
|
||||
|
||||
$total = countRec("iso","country $where");
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
|
||||
header("Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" );
|
||||
header("Cache-Control: no-cache, must-revalidate" );
|
||||
header("Pragma: no-cache" );
|
||||
header("Content-type: text/x-json");
|
||||
$json = "";
|
||||
$json .= "{\n";
|
||||
$json .= "page: $page,\n";
|
||||
$json .= "total: $total,\n";
|
||||
$json .= "rows: [";
|
||||
$rc = false;
|
||||
while ($row = mysql_fetch_array($result)) {
|
||||
if ($rc) $json .= ",";
|
||||
$json .= "\n{";
|
||||
$json .= "id:'".$row['iso']."',";
|
||||
$json .= "cell:['".$row['iso']."'";
|
||||
$json .= ",'".addslashes($row['name'])."'";
|
||||
$json .= ",'".addslashes($row['printable_name'])."'";
|
||||
$json .= ",'".addslashes($row['iso3'])."'";
|
||||
$json .= ",'".$row['numcode']."']";
|
||||
$json .= "}";
|
||||
$rc = true;
|
||||
}
|
||||
$json .= "]\n";
|
||||
$json .= "}";
|
||||
echo $json;
|
||||
?>
|
||||
|
|
@ -1,116 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Flexigrid</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/flexigrid/flexigrid.css">
|
||||
<script type="text/javascript" src="lib/jquery/jquery.js"></script>
|
||||
<script type="text/javascript" src="flexigrid.js"></script>
|
||||
<style>
|
||||
|
||||
body
|
||||
{
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.flexigrid div.fbutton .add
|
||||
{
|
||||
background: url(css/images/add.png) no-repeat center left;
|
||||
}
|
||||
|
||||
.flexigrid div.fbutton .delete
|
||||
{
|
||||
background: url(css/images/close.png) no-repeat center left;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<b>This is a sample implementation attached to a form, to add additional parameters</b>
|
||||
|
||||
<form id="sform">
|
||||
<p>
|
||||
The values you entered will be place in name column for demo's sake.<br />
|
||||
Value 1 : <input type="text" name="val1" value="" autocomplete="off" /><br />
|
||||
Value 2 : Is a hidden input with value 3<input type="hidden" name="val2" value="3" /><br />
|
||||
Value 3 :
|
||||
<select name="val3">
|
||||
<option value="1">One</option>
|
||||
<option value="2">Two</option>
|
||||
<option value="3">Three</option>
|
||||
<option value="4">Four</option>
|
||||
<option value="5">Five</option>
|
||||
</select><br />
|
||||
Value 4 : <input type="checkbox" name="val4" id="val4" value="4" /><label for="val4">This will pass a value 4 if checked</label>
|
||||
</p>
|
||||
<p>
|
||||
<input type="reset" value="Reset" />
|
||||
<input type="submit" value="Submit" />
|
||||
</p>
|
||||
|
||||
</form>
|
||||
|
||||
<table id="flex1" style="display:none"></table>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$("#flex1").flexigrid
|
||||
(
|
||||
{
|
||||
url: 'post3.php',
|
||||
dataType: 'json',
|
||||
colModel : [
|
||||
{display: 'ISO', name : 'iso', width : 40, sortable : true, align: 'center'},
|
||||
{display: 'Name', name : 'name', width : 180, sortable : true, align: 'left'},
|
||||
{display: 'Printable Name', name : 'printable_name', width : 120, sortable : true, align: 'left'},
|
||||
{display: 'ISO3', name : 'iso3', width : 130, sortable : true, align: 'left', hide: true},
|
||||
{display: 'Number Code', name : 'numcode', width : 80, sortable : true, align: 'right'}
|
||||
],
|
||||
searchitems : [
|
||||
{display: 'ISO', name : 'iso'},
|
||||
{display: 'Name', name : 'name', isdefault: true}
|
||||
],
|
||||
sortname: "iso",
|
||||
sortorder: "asc",
|
||||
usepager: true,
|
||||
title: 'Countries',
|
||||
useRp: true,
|
||||
rp: 15,
|
||||
showTableToggleBtn: true,
|
||||
width: 700,
|
||||
onSubmit: addFormData,
|
||||
height: 200
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
//This function adds paramaters to the post of flexigrid. You can add a verification as well by return to false if you don't want flexigrid to submit
|
||||
function addFormData()
|
||||
{
|
||||
|
||||
//passing a form object to serializeArray will get the valid data from all the objects, but, if the you pass a non-form object, you have to specify the input elements that the data will come from
|
||||
var dt = $('#sform').serializeArray();
|
||||
$("#flex1").flexOptions({params: dt});
|
||||
return true;
|
||||
}
|
||||
|
||||
$('#sform').submit
|
||||
(
|
||||
function ()
|
||||
{
|
||||
$('#flex1').flexOptions({newp: 1}).flexReload();
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
@charset "utf-8";
|
||||
/* CSS Document */
|
||||
|
||||
a.beer
|
||||
{
|
||||
background: url(coffee.png) no-repeat 4px center orange;
|
||||
color: #fff;
|
||||
padding: 4px;
|
||||
padding-left: 24px;
|
||||
border: 1px solid #fff;
|
||||
}
|
||||
|
||||
ul li
|
||||
{
|
||||
background: url(accept.png) no-repeat left;
|
||||
list-style: none;
|
||||
padding: 3px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
a
|
||||
{
|
||||
text-decoration: none;
|
||||
color: #0066FF;
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
background: #333;
|
||||
width: 960px;
|
||||
margin: 0px;
|
||||
padding: 20px;
|
||||
padding-bottom: 200px;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
h1
|
||||
{
|
||||
font-size: 26px;
|
||||
font-weight: normal;
|
||||
margin: 0px;
|
||||
color: #0099FF;
|
||||
}
|
||||
|
||||
.code
|
||||
{
|
||||
background: #555;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
display: none;
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
.title
|
||||
{
|
||||
background: #0099FF;
|
||||
color: #fff;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.bborder
|
||||
{
|
||||
background: #eee;
|
||||
border: 0px solid #ccc;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.update2
|
||||
{
|
||||
background:#CCFF33;
|
||||
padding: 10px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.update2 p
|
||||
{
|
||||
margin: 0px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.update
|
||||
{
|
||||
border: 1px solid #777;
|
||||
height: 26px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.update.fh
|
||||
{
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.update p
|
||||
{
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.update b.top
|
||||
{
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
padding: 5px;
|
||||
color: #fff;
|
||||
position: relative;
|
||||
text-transform: uppercase;
|
||||
font-size: 12px;
|
||||
letter-spacing: 2px;
|
||||
border-left: 0px solid #06f;
|
||||
border-bottom: 2px solid #0066FF;
|
||||
}
|
||||