Dashboard no longer uses AjaxRequest methods
This commit is contained in:
parent
7b0e1c1c97
commit
51271ca8d6
4 changed files with 113 additions and 108 deletions
|
|
@ -7,6 +7,7 @@
|
||||||
- fixed: Asset Manager breaks when an asset is locked
|
- fixed: Asset Manager breaks when an asset is locked
|
||||||
- fixed: Asset Manager is slow to load
|
- fixed: Asset Manager is slow to load
|
||||||
- fixed: project management application unable to add or edit tasks.
|
- fixed: project management application unable to add or edit tasks.
|
||||||
|
- fixed: dashboard not working due to using legacy ajax handlers
|
||||||
|
|
||||||
7.5.12
|
7.5.12
|
||||||
- skipping this release
|
- skipping this release
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -224,6 +224,12 @@ sub purge {
|
||||||
sub view {
|
sub view {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my %vars = %{$self->get()};
|
my %vars = %{$self->get()};
|
||||||
|
|
||||||
|
$self->session->style->setScript(
|
||||||
|
$self->session->url->extras('yui/build/utilities/utilities.js'),
|
||||||
|
{ type=>'text/javascript' }
|
||||||
|
);
|
||||||
|
|
||||||
my $templateId = $self->get("templateId");
|
my $templateId = $self->get("templateId");
|
||||||
my $children = $self->getLineage( ["children"], { returnObjects=>1, excludeClasses=>["WebGUI::Asset::Wobject::Layout","WebGUI::Asset::Wobject::Dashboard"] });
|
my $children = $self->getLineage( ["children"], { returnObjects=>1, excludeClasses=>["WebGUI::Asset::Wobject::Layout","WebGUI::Asset::Wobject::Dashboard"] });
|
||||||
# I'm sure there's a more efficient way to do this. We'll figure it out someday.
|
# I'm sure there's a more efficient way to do this. We'll figure it out someday.
|
||||||
|
|
|
||||||
|
|
@ -322,88 +322,81 @@ function dragable_dragOver(obj,position) {
|
||||||
|
|
||||||
//called on mouse up, If an element is being dragged, this method does the right thing.
|
//called on mouse up, If an element is being dragged, this method does the right thing.
|
||||||
function dragable_dragStop(e) {
|
function dragable_dragStop(e) {
|
||||||
dragging=false;
|
dragging=false;
|
||||||
if (z) {
|
if (z) {
|
||||||
|
if (endTD !=null && startTD!=null) {
|
||||||
if (endTD !=null && startTD!=null) {
|
fObj2 = dragable_getObjectByClass(startTD,"availableDashlet");
|
||||||
fObj2 = dragable_getObjectByClass(startTD,"availableDashlet");
|
dragable_moveContent(startTD,endTD,endTDPos);
|
||||||
|
if (fObj2) {
|
||||||
|
var replId = startTD.id;
|
||||||
|
replId = replId.replace(/^td/gi,'');
|
||||||
|
//alert(replId);
|
||||||
|
var replUrl = available_dashlets[replId];
|
||||||
|
//alert(replUrl);
|
||||||
|
contentDiv = document.getElementById("ct" + replId + "_div");
|
||||||
|
|
||||||
|
var callback = {
|
||||||
|
success : function(req) {
|
||||||
|
var myArr528 = req.responseText.split(/beginDebug/mg,1);
|
||||||
|
contentDiv.innerHTML = myArr528[0];
|
||||||
|
},
|
||||||
|
failure : function(req) {
|
||||||
|
alert("Toggle Edit Form failed. Problem with connection. Please refresh the page and try again.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var url = replUrl + "?func=ajaxInlineView";
|
||||||
|
var status = YAHOO.util.Connect.asyncRequest('GET',url,callback);
|
||||||
|
}
|
||||||
|
startTD=null;
|
||||||
|
|
||||||
|
if (dragable_isBlank(endTD)) {
|
||||||
|
divName = endTD.id;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
divName=endTD.id + "_div";
|
||||||
|
document.getElementById(divName).className="dragable";
|
||||||
|
}
|
||||||
|
dragable_postNewContentMap();
|
||||||
|
}
|
||||||
|
|
||||||
dragable_moveContent(startTD,endTD,endTDPos);
|
for(i=0;i<dragableList.length;i++) {
|
||||||
|
dragableList[i].style.top='0px';
|
||||||
if (fObj2) {
|
dragableList[i].style.left='0px';
|
||||||
var replId = startTD.id;
|
dragableList[i].className="dragable";
|
||||||
replId = replId.replace(/^td/gi,'');
|
}
|
||||||
// alert(replId);
|
|
||||||
var replUrl = available_dashlets[replId];
|
//this is a ie hack for a render bug
|
||||||
// alert(replUrl);
|
for(i=0;i<draggableObjectList.length;i++) {
|
||||||
contentDiv = document.getElementById("ct" + replId + "_div");
|
if (draggableObjectList[i]) {
|
||||||
var hoopla = AjaxRequest.get(
|
draggableObjectList[i].style.top='1px';
|
||||||
{
|
draggableObjectList[i].style.left='1px';
|
||||||
'url':replUrl
|
draggableObjectList[i].style.top='0px';
|
||||||
,'parameters':{
|
draggableObjectList[i].style.left='0px';
|
||||||
'func':"ajaxInlineView"
|
}
|
||||||
}
|
}
|
||||||
,'onSuccess':function(req){
|
|
||||||
var myArr528 = req.responseText.split(/beginDebug/mg,1);
|
|
||||||
contentDiv.innerHTML = myArr528[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
// tdn6p_3ZAFRtB9WiyKnrwryg
|
|
||||||
// ctn6p_3ZAFRtB9WiyKnrwryg_div
|
|
||||||
}
|
}
|
||||||
startTD=null;
|
|
||||||
|
|
||||||
if (dragable_isBlank(endTD)) {
|
|
||||||
divName = endTD.id;
|
|
||||||
}else {
|
|
||||||
divName=endTD.id + "_div";
|
|
||||||
document.getElementById(divName).className="dragable";
|
|
||||||
// document.getElementById(divName).style.opacity = null;
|
|
||||||
// document.getElementById(divName).style.filter = null;
|
|
||||||
}
|
|
||||||
dragable_postNewContentMap();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
for(i=0;i<dragableList.length;i++) {
|
|
||||||
dragableList[i].style.top='0px';
|
|
||||||
dragableList[i].style.left='0px';
|
|
||||||
dragableList[i].className="dragable";
|
|
||||||
}
|
|
||||||
|
|
||||||
//this is a ie hack for a render bug
|
startTD=null;
|
||||||
for(i=0;i<draggableObjectList.length;i++) {
|
|
||||||
if (draggableObjectList[i]) {
|
|
||||||
draggableObjectList[i].style.top='1px';
|
|
||||||
draggableObjectList[i].style.left='1px';
|
|
||||||
draggableObjectList[i].style.top='0px';
|
|
||||||
draggableObjectList[i].style.left='0px';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
startTD=null;
|
|
||||||
|
|
||||||
if (endTD != null) {
|
|
||||||
endTD.position = null;
|
|
||||||
endTD=null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (endTD != null) {
|
||||||
|
endTD.position = null;
|
||||||
|
endTD=null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function dragable_postNewContentMap() {
|
function dragable_postNewContentMap() {
|
||||||
AjaxRequest.get(
|
var callback = {
|
||||||
{
|
success : function(req) { },
|
||||||
'url':pageURL
|
failure : function(req) {
|
||||||
,'method':'POST'
|
alert("Post New Content Map Failed. Problem with connection. Please refresh the page and try again.");
|
||||||
,'map':dragable_getContentMap()
|
}
|
||||||
,'func':'setContentPositions'
|
|
||||||
// ,'onSuccess':function(req){ alert(req.responseText); }
|
|
||||||
}
|
}
|
||||||
);
|
|
||||||
|
var url = pageURL;
|
||||||
|
var dataParts = "func=setContentPositions&map=" + dragable_getContentMap();
|
||||||
|
var status = YAHOO.util.Connect.asyncRequest('POST',url,callback,dataParts);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//gets the element children of a dom object
|
//gets the element children of a dom object
|
||||||
|
|
@ -437,8 +430,6 @@ function dragable_deleteContent(e,from,postNewContentMap) {
|
||||||
from = dragable_getObjectByClass(from,"dragable");
|
from = dragable_getObjectByClass(from,"dragable");
|
||||||
from = document.getElementById(from.id.substr(0,from.id.indexOf("_div")));
|
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");
|
dragable_moveContent(from,document.getElementById('position1').rows[document.getElementById('position1').rows.length - 1],"bottom");
|
||||||
// e.preventDefault();
|
|
||||||
// e.stopPropagation();
|
|
||||||
if (postNewContentMap) {dragable_postNewContentMap();} // This will help avoid meaningless web server hits.
|
if (postNewContentMap) {dragable_postNewContentMap();} // This will help avoid meaningless web server hits.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -522,44 +513,51 @@ function dashboard_toggleEditForm(event,shortcutId,shortcutUrl) {
|
||||||
var parentDiv = document.getElementById("td" + shortcutId + "_div");
|
var parentDiv = document.getElementById("td" + shortcutId + "_div");
|
||||||
var contentDiv = document.getElementById("ct" + shortcutId + "_div");
|
var contentDiv = document.getElementById("ct" + shortcutId + "_div");
|
||||||
parentDiv.insertBefore(formDiv,contentDiv);
|
parentDiv.insertBefore(formDiv,contentDiv);
|
||||||
var hooha = AjaxRequest.get(
|
|
||||||
{
|
var callback = {
|
||||||
'url':shortcutUrl
|
success : function(req) {
|
||||||
,'parameters':{
|
var myHtml = req.responseText.split(/beginDebug/mg,1)[0];
|
||||||
'func':"getUserPrefsForm"
|
var myScript = myHtml.split(/\<script\>/mg)[1];
|
||||||
|
if (myScript) {
|
||||||
|
myScript = myScript.split(/\<\/script\>/mg)[0];
|
||||||
|
eval(myScript);
|
||||||
}
|
}
|
||||||
,'onSuccess':function(req){
|
formDiv.innerHTML = myHtml;
|
||||||
var myHtml = req.responseText.split(/beginDebug/mg,1)[0];
|
},
|
||||||
var myScript = myHtml.split(/\<script\>/mg)[1];
|
failure : function(req) {
|
||||||
if (myScript) {
|
alert("Toggle Edit Form failed. Problem with connection. Please refresh the page and try again.");
|
||||||
myScript = myScript.split(/\<\/script\>/mg)[0];
|
}
|
||||||
eval(myScript);
|
}
|
||||||
}
|
|
||||||
formDiv.innerHTML = myHtml;
|
var url = shortcutUrl + "?func=getUserPrefsForm";
|
||||||
}
|
var status = YAHOO.util.Connect.asyncRequest('GET',url,callback);
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function dashboard_reloadDashlet(event,shortcutId,shortcutUrl) {
|
function dashboard_reloadDashlet(event,shortcutId,shortcutUrl) {
|
||||||
// Reload the content div.
|
// Reload the content div.
|
||||||
contentDiv = document.getElementById("ct" + shortcutId + "_div");
|
contentDiv = document.getElementById("ct" + shortcutId + "_div");
|
||||||
var hooha = AjaxRequest.get(
|
|
||||||
{
|
var callback = {
|
||||||
'url':shortcutUrl
|
success : function(req) {
|
||||||
,'parameters':{
|
var myHtml = req.responseText.split(/beginDebug/mg,1)[0];
|
||||||
'func':"ajaxInlineView"
|
var myScript = myHtml.split(/\<script\>/mg)[1];
|
||||||
|
if (myScript) {
|
||||||
|
myScript = myScript.split(/\<\/script\>/mg)[0];
|
||||||
|
eval(myScript);
|
||||||
}
|
}
|
||||||
,'onSuccess':function(req){
|
contentDiv.innerHTML = myHtml;
|
||||||
var myHtml = req.responseText.split(/beginDebug/mg,1)[0];
|
},
|
||||||
var myScript = myHtml.split(/\<script\>/mg)[1];
|
failure : function(req) {
|
||||||
if (myScript) {
|
alert("Reload Dashlet failed. Problem with connection. Please refresh the page and try again.");
|
||||||
myScript = myScript.split(/\<\/script\>/mg)[0];
|
}
|
||||||
eval(myScript);
|
}
|
||||||
}
|
|
||||||
contentDiv.innerHTML = myHtml;
|
var url = shortcutUrl + "?func=ajaxInlineView";
|
||||||
}
|
var status = YAHOO.util.Connect.asyncRequest('GET',url,callback);
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function makeActive(o) { o.style.display = "inline"; }
|
||||||
|
|
||||||
|
function makeInactive(o) { o.style.display = "none"; }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue