improvement save form Dashboards
This commit is contained in:
@@ -503,7 +503,7 @@ Ext.onReady( function() {
|
|||||||
enableTabScroll : true,
|
enableTabScroll : true,
|
||||||
//anchor : '98%',
|
//anchor : '98%',
|
||||||
width : '100%',
|
width : '100%',
|
||||||
height : 260,
|
height : 160,
|
||||||
defaults : {
|
defaults : {
|
||||||
autoScroll :true
|
autoScroll :true
|
||||||
},
|
},
|
||||||
@@ -733,7 +733,7 @@ var addTab = function (flag) {
|
|||||||
width : "100%",
|
width : "100%",
|
||||||
items : [
|
items : [
|
||||||
new Ext.Panel({
|
new Ext.Panel({
|
||||||
height : 230,
|
height : 130,
|
||||||
width : "100%",
|
width : "100%",
|
||||||
border : true,
|
border : true,
|
||||||
bodyStyle : 'padding:10px',
|
bodyStyle : 'padding:10px',
|
||||||
@@ -1156,12 +1156,12 @@ var saveAllIndicators = function (DAS_UID) {
|
|||||||
|
|
||||||
data[field] = value.trim();
|
data[field] = value.trim();
|
||||||
}
|
}
|
||||||
saveDashboardIndicator(data);
|
saveDashboardIndicator(data, fieldsTab[0].id);
|
||||||
}
|
}
|
||||||
window.location = 'dashboardList';
|
window.location = 'dashboardList';
|
||||||
};
|
};
|
||||||
|
|
||||||
var saveDashboardIndicator = function (options) {
|
var saveDashboardIndicator = function (options, id) {
|
||||||
var data = {};
|
var data = {};
|
||||||
data["DAS_UID"] = options['DAS_UID'];
|
data["DAS_UID"] = options['DAS_UID'];
|
||||||
data["DAS_IND_TYPE"] = options['DAS_IND_TYPE'];
|
data["DAS_IND_TYPE"] = options['DAS_IND_TYPE'];
|
||||||
@@ -1184,7 +1184,7 @@ var saveDashboardIndicator = function (options) {
|
|||||||
},
|
},
|
||||||
data: JSON.stringify(data),
|
data: JSON.stringify(data),
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
var jsonResp = Ext.util.JSON.decode(response.responseText);
|
Ext.getCmp(id).setValue(response);
|
||||||
},
|
},
|
||||||
failure: function (response) {
|
failure: function (response) {
|
||||||
var jsonResp = Ext.util.JSON.decode(response.responseText);
|
var jsonResp = Ext.util.JSON.decode(response.responseText);
|
||||||
|
|||||||
@@ -31,21 +31,41 @@
|
|||||||
var oClientWinSize = getClientWindowSize();
|
var oClientWinSize = getClientWindowSize();
|
||||||
|
|
||||||
var autoResizeScreen = function () {
|
var autoResizeScreen = function () {
|
||||||
|
var dashboardFrame;
|
||||||
|
var containerList1, containerList2;
|
||||||
|
|
||||||
dashboardFrame = document.getElementById('dashboardFrame');
|
dashboardFrame = document.getElementById('dashboardFrame');
|
||||||
if (dashboardFrame) {
|
|
||||||
height = getClientWindowSize().height-90;
|
containerList1 = document.getElementById("pm_header");
|
||||||
if (typeof dashboardFrame.style != 'undefined') {
|
if (document.getElementById("mainMenuBG") &&
|
||||||
dashboardFrame.style.height = height;
|
document.getElementById("mainMenuBG").parentNode &&
|
||||||
}
|
document.getElementById("mainMenuBG").parentNode.parentNode &&
|
||||||
if (typeof dashboardFrame.contentWindow.document != 'undefined') {
|
document.getElementById("mainMenuBG").parentNode.parentNode.parentNode &&
|
||||||
dashboardFrame = dashboardFrame.contentWindow.document.getElementById('dashboardFrame');
|
document.getElementById("mainMenuBG").parentNode.parentNode.parentNode.parentNode
|
||||||
if (dashboardFrame && typeof dashboardFrame.style != 'undefined') {
|
){
|
||||||
dashboardFrame.style.height = height-5;
|
containerList2 = document.getElementById("mainMenuBG").parentNode.parentNode.parentNode.parentNode;
|
||||||
}
|
}
|
||||||
|
if (containerList1 === containerList2) {
|
||||||
|
height = oClientWinSize.height - containerList1.clientHeight;
|
||||||
|
dashboardFrame.style.height = height;
|
||||||
|
if (dashboardFrame.height ) {
|
||||||
|
dashboardFrame.height = height;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setTimeout('autoResizeScreen()', 2000);
|
if (dashboardFrame) {
|
||||||
|
height = getClientWindowSize().height-90;
|
||||||
|
if (typeof dashboardFrame.style != 'undefined') {
|
||||||
|
dashboardFrame.style.height = height;
|
||||||
|
}
|
||||||
|
if (typeof dashboardFrame.contentWindow.document != 'undefined') {
|
||||||
|
dashboardFrame = dashboardFrame.contentWindow.document.getElementById('dashboardFrame');
|
||||||
|
if (dashboardFrame && typeof dashboardFrame.style != 'undefined') {
|
||||||
|
dashboardFrame.style.height = height-5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setTimeout('autoResizeScreen()', 2000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user