committing the new dash design, along with delete button functionality. edit button functionality to come.

This commit is contained in:
Matthew Wilson 2005-12-01 01:15:42 +00:00
parent fdfb9bf5ae
commit 48d69dfd28
28 changed files with 379 additions and 187 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 923 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -0,0 +1,224 @@
body
{
margin: 0;
margin-top: 0;
padding: 0;
}
table.dashboardColumn
{
width: 100%;
background: none;
background-color:transparent;
}
#dashboardContainer
{
font: 11px Lucida Grande, Verdana, Arial, Helvetica, sans serif;
background-color:white;
}
#dashboardChooserContainer
{
margin:0px;
padding:0px;
border:0px;
}
#position1 {
width:200px;
max-width:200px;
width:expression("200px");
}
#position1 td {
margin-top:40px;
padding:5px;
}
tbody.availableDashlet * div.content {
display: none;
}
#availableDashlets * td {
width:200px;
max-width:200px;
width:expression("200px");
}
#availableDashlets * div.content {
width:200px;
max-width:200px;
width:expression("200px");
height:30px;
display:none;
overflow-x:hidden;
overflow-y:hidden;
}
#columnsContainerDiv
{
margin:6px;
}
td
{
vertical-align: top;
}
h1
{
font: 12px Lucida Grande, Verdana, Arial, Helvetica, sans serif;
font-weight:bold;
margin:0px;
margin-bottom:3px;
}
h2
{
font: 19px Verdana;
margin-bottom:0px;
padding-bottom:0px;
}
ul
{
margin-top:2px;
left:-10px;
position:relative;
}
div.weatherTitle
{
font-weight:bold;
color:white;
}
div.content
{
border-bottom:solid orange 1px;
border-top:solid orange 1px;
border-left:solid orange 1px;
border-right:solid orange 1px;
margin-bottom:10px;
width:auto;
padding:5px;
padding-top:10px;
background: #fff url('content_bg.gif') no-repeat top right;
}
div.content a:link, div.content a:visited
{
color:#F48117;
}
table.tableSearch
{
background-color:#F2F2F2;
border:solid #CCC 1px;
width:100%;
}
table.tableSearch td select
{
margin:0px;
padding:0px;
}
div.dragTitle
{
overflow-x:visible;
background: url('dragable_bg.gif');
width:100%;
z-index:998;
border:solid black 0px;
height:22px;
top:0px;
left:0px;
right:30px;
position:absolute;
}
span.headerTitle
{
display:block;
float:left;
z-index:999;
margin-right:10px;
padding-left:9px;
padding-top:2px;
}
span.options
{
display:block;
position:absolute;
top:0px;
right:-1px;
float:right;
z-index:1000;
padding-right:35px;
background: transparent url('dragtitle_bg.gif') no-repeat top right;
}
span.options img {
opacity:0;
filter:alpha(opacity=0);
}
span.options:hover img {
opacity:100;
}
span.optionsHoverIE img {
filter:alpha(opacity=100);
}
div#availableDashlets * span.options:hover {
opacity:0;
filter:alpha(opacity=0);
}
div#availableDashlets * span.options {
display:none;
opacity:0;
top:50px;
filter:alpha(opacity=0);
}
div#availableDashlets * div.dragTrigger {
background: none;
}
#hideNewContentButton,#showNewContentButton {
/* position:absolute;*/
color: #465D94;
font-size: 1.2em;
font-weight: 600;
top: 20px;
cursor: pointer; cursor: hand;
left: 20px;
width:200px;
}
#availableBox {
display:none;
}
#availableBox2 {
padding-top:40px;
border:solid navy 2px;
height: 600px;
width:200px;
max-width:200px;
width:expression("200px");
}
#availableDashlets {
width:200px;
max-width:200px;
width:expression("200px");
}
.availableDashlet
{
width:200px;
max-width:200px;
width:expression("200px");
}
#availableDashlets tbody {
height: 0px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 997 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -1,57 +1,94 @@
div.dragable:hover {
div.dragable:hover
{
border: 1px dashed #aaaaaa;
}
.dragable{
position: relative;
border: 1px dotted #cccccc;
.dragable
{
position: relative;
border: 1px solid #fff;
}
div.dragTrigger{
div.dragTrigger
{
position: relative;
top:0px;
left:0px;
cursor: move;
width:100%;
cursor: move;
width:100%;
font-size:10pt;
font-weight:bold;
font-face:verdana;
color:white;
height:22px;
}
.dragging{
position: relative;
width: auto;
opacity:0.6;
-moz-opacity:0.6;
filter: alpha(opacity=60);
cursor: hand;
z-index: 2000;
border: 1px dotted #cccccc;
div.dragging
{
position: relative;
width: auto;
filter:alpha(opacity=60);
opacity:.60;
cursor: pointer; cursor: hand;
z-index: 2000;
border: 1px dotted #cccccc;
}
div.dragging div.content
{
opacity:.60;
filter: alpha(opacity=60);
}
.draggedOverTop{
position: relative;
border: 1px dotted #aaaaaa;
border-top: 8px #aaaaaa dotted;
border: 1px dotted white;
margin-top: -1px;
border-top: 50px #dddddd solid;
}
.draggedOverBottom {
position: relative;
border: 1px dotted #aaaaaa;
border-bottom: 8px #aaaaaa dotted;
border: 1px dotted white;
margin-bottom: -1px;
border-bottom: 50px #dddddd solid;
}
.hidden{
display: none;
.hidden
{
display: none;
}
.blank {
position: relative;
opacity:0.5;
-moz-opacity:0.5;
filter: alpha(opacity=50);
cursor: hand;
background-color: white;
.blank
{
position: relative;
opacity:0.5;
-moz-opacity:0.5;
filter: alpha(opacity=50);
cursor: pointer; cursor: hand;
background-color: white;
width:100%;
}
.blankOver {
position: relative;
cursor: hand;
background-color: #eeeeee;
.blankOver
{
position: relative;
cursor: pointer; cursor: hand;
background-color: #eeeeee;
}
.empty {
position: relative;
padding: 0px;
margin: 3px;
width: 100%;
height: 250px;
.empty
{
position: relative;
padding: 0px;
margin: 3px;
width: 100%;
height: 250px;
}
.blankTable {
width:100%;
}
.blankColumn {
width:100%;
}

View file

@ -1,7 +1,7 @@
//Confugration
//sets the drag accruacy
//a value of 0 is most accurate. The number can be raised to improve performance.
var accuracy = 2;
var accuracy = 4;
//list of the content item names. Could be searched for, but hard coded for performance
var draggableObjectList=new Array();
@ -185,15 +185,15 @@ function dragable_move(e){
z.style.left=(temp1+e.clientX-x)+"px";
z.style.top=(temp2+e.clientY-y)+"px";
return false
}else {
// }else {
tmp = dragable_spy(dom? e.pageX: (e.clientX + docElement.scrollLeft),dom? e.pageY: (e.clientY + docElement.scrollTop));
// tmp = dragable_spy(dom? e.pageX: (e.clientX + docElement.scrollLeft),dom? e.pageY: (e.clientY + docElement.scrollTop));
if (tmp.length == 0) {
currentDiv = null;
}else {
currentDiv = tmp[0];
}
// if (tmp.length == 0) {
// currentDiv = null;
// }else {
// currentDiv = tmp[0];
// }
}
}
@ -202,7 +202,11 @@ function dragable_dragStart(e){
e=dom? e : event;
var fObj=dom? e.target : e.srcElement
if (fObj.className != "dragTrigger") {
if (fObj.nodeName=='IMG') { return;}
fObj2 = dragable_getObjectByClass(fObj,"dragTrigger");
if (!fObj2) {
return;
}
@ -250,12 +254,12 @@ function dragable_spy(x, y) {
td = draggableObjectList[i];
//this is a hack
if (td == null || td == startTD) continue;
if (td == null || td == startTD || !td.parentNode || !td.parentNode.parentNode) { continue; }
var fObj=td;
y1=0;
x1=0
x1=0;
var gap = (td.className=='blank' || (td.parentNode.parentNode.rows.length == td.rowIndex + 1)) ? 500 : 0
while (fObj!=null && fObj.tagName!=topelement){
y1+=fObj.offsetTop;
@ -268,7 +272,7 @@ function dragable_spy(x, y) {
returnArray[0] = td;
returnArray[1] = "top";
return returnArray;
}else if (y> y1 && y< (y1 + td.offsetHeight)) {
}else if (y> y1 && y< (y1 + td.offsetHeight + gap)) {
returnArray[0] = td;
returnArray[1] = "bottom";
return returnArray;
@ -330,31 +334,24 @@ function dragable_dragStop(e) {
divName=endTD.id + "_div";
document.getElementById(divName).className="dragable";
// document.getElementById(divName).style.opacity = null;
// document.getElementById(divName).style.filter = null;
// document.getElementById(divName).style.filter = null;
}
AjaxRequest.get(
{
'url':pageURL
,'method':'POST'
,'map':dragable_getContentMap()
,'func':'setContentPositions'
}
);
dragable_postNewContentMap();
}
for(i=0;i<dragableList.length;i++) {
dragableList[i].style.top=0;
dragableList[i].style.left=0;
dragableList[i].style.top='0px';
dragableList[i].style.left='0px';
dragableList[i].className="dragable";
}
//this is a ie hack for a render bug
for(i=0;i<draggableObjectList.length;i++) {
if (draggableObjectList[i]) {
draggableObjectList[i].style.top=1;
draggableObjectList[i].style.left=1;
draggableObjectList[i].style.top=0;
draggableObjectList[i].style.left=0;
draggableObjectList[i].style.top='1px';
draggableObjectList[i].style.left='1px';
draggableObjectList[i].style.top='0px';
draggableObjectList[i].style.left='0px';
}
}
}
@ -366,7 +363,17 @@ function dragable_dragStop(e) {
endTD=null;
}
}
function dragable_postNewContentMap() {
// AjaxRequest.get(
// {
// 'url':pageURL
// ,'method':'POST'
// ,'map':dragable_getContentMap()
// ,'func':'setContentPositions'
// }
// );
}
//gets the element children of a dom object
function dragable_getElementChildren(obj) {
@ -388,14 +395,24 @@ function dragable_appendBlankRow(parent) {
blankClone.id = "blank" + new Date().getTime() + blankCount++;
draggableObjectList[draggableObjectList.length] = blankClone;
parent.appendChild(blankClone);
blankClone.style.top=0;
blankClone.style.left=0;
blankClone.style.top='0px';
blankClone.style.left='0px';
blank.className="hidden";
}
// deletes a dashlet (moves it from its current location to the bottom of position 1)
function dragable_deleteContent(e,from) {
from = dragable_getObjectByClass(from,"dragable");
from = document.getElementById(from.id.substr(0,from.id.indexOf("_div")));
dragable_moveContent(from,document.getElementById('position1').rows[document.getElementById('position1').rows.length - 1],"bottom");
// e.preventDefault();
// e.stopPropagation();
dragable_postNewContentMap();
}
//moves a table row from one table to another. from and to are table row objects
//if the last row is remvoed from a table, id blank is placed in the table
//if the last row is removed from a table, id blank is placed in the table
function dragable_moveContent(from, to,position) {
if (from!=to && from && to) {
var fromParent = from.parentNode;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 855 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B