Skip to content
This repository was archived by the owner on Apr 27, 2021. It is now read-only.

Commit

Permalink
begin.html : now uses modern API to speed up loading
Browse files Browse the repository at this point in the history
  • Loading branch information
SRenan committed Nov 5, 2014
1 parent ac5aa37 commit a32e490
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 39 deletions.
2 changes: 1 addition & 1 deletion reports/schemas/Plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ debugString <- paste0( "flowIncubator:::plotGate_labkey( ",
"cond = ", tempCond, ", ",
"overlay = ", tempOverlay, ", ",
"stack = F",
" )[[1]]" );
" )" );

#stop( paste0( gsPath, "|", debugString ) );

Expand Down
62 changes: 27 additions & 35 deletions views/begin.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,48 +36,43 @@
// REMOVE once issue #18 in OpenCytoVisualization is taken care of

var createTempPnl = function( moduleName ){
var maskMsg =
'Seems like you have not enabled the ' + moduleName + ' module, click <a href="' +
LABKEY.ActionURL.buildURL('admin', 'folderManagement', LABKEY.ActionURL.getContainer(), { tabId: 'folderType' } ) +
'">here</a> to do so.'

var temp = new Ext.Panel({
border: false,
frame: false,
height: 100,
layout: 'fit',
listeners: {
afterrender: function(){
this.getEl().mask( maskMsg, 'infoMask');
}
},
renderTo: webPartDiv
});
var
maskMsg =
'Seems like you have not enabled the ' + moduleName + ' module, click <a href="' +
LABKEY.ActionURL.buildURL('admin', 'folderManagement', LABKEY.ActionURL.getContainer(), { tabId: 'folderType' } ) +
'">here</a> to do so.',

temp = new Ext.Panel({
border: false,
cls: 'opencyto',
frame: false,
height: 100,
layout: 'fit',
listeners: {
afterrender: function(){
this.getEl().mask( maskMsg, 'infoMask' );
}
},
renderTo: webPartDiv
});

resizeModule = function(){
temp.getEl().mask( maskMsg, 'infoMask');
temp.getEl().mask( maskMsg, 'infoMask' );
};

Ext.EventManager.onWindowResize( resizeModule );
};

LABKEY.Query.getSchemas({
apiVersion: '9.3',
failure: LABKEY.ext.OpenCyto.onFailure,
success: function(schemasInfo){
if ( $.inArray( 'opencyto_preprocessing', schemasInfo.schemas ) >= 0 ){
LABKEY.Query.getQueries({
failure: LABKEY.ext.OpenCyto.onFailure,
includeColumns: false,
includeSystemQueries: false,
success: function( schemasInfo ){
if ( schemasInfo.opencyto_preprocessing ) {
LABKEY.Query.getQueryDetails({
failure: function(){ createTempPnl( 'OpenCytoVisualization' ); },
queryName: 'StudyVars',
schemaName: 'opencyto_preprocessing',
success: function(queriesInfo){
var i, array = queriesInfo.queries, length = queriesInfo.queries.length;
for ( i = 0; i < length; i ++ ){
if ( array[i].name == 'StudyVars' ){
i = length;
}
}
if ( i != length ){ // i == length + 1 => query present => module present => regular instanciation
success: function(){
// END REMOVE

var OpenCytoVisualization = new LABKEY.ext.OpenCytoVisualization({
Expand All @@ -94,9 +89,6 @@
Ext.EventManager.onWindowResize( resizeModule );

// REMOVE once issue #18 in OpenCytoVisualization is taken care of
} else {
createTempPnl( 'OpenCytoVisualization' );
}
}
});
} else {
Expand Down
6 changes: 3 additions & 3 deletions web/OpenCytoVisualization.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ LABKEY.ext.OpenCytoVisualization = Ext.extend( Ext.Panel, {

if ( this.getCount() < 1 ){
// disable all
pnlTabs.getEl().mask('Seems like there are no analyses to visualize, use OpenCytoPreprocessing to create one.' + strngErrorContactWithLink, 'infoMask');
pnlTabs.getEl().mask('Seems like there are no analyses to visualize, you need to import or create one.' + strngErrorContactWithLink, 'infoMask');
cbAnalysis.setDisabled( true );
pnlAnalysis.setDisabledViaClass( true );
} else {
Expand Down Expand Up @@ -1248,7 +1248,7 @@ LABKEY.ext.OpenCytoVisualization = Ext.extend( Ext.Panel, {
LABKEY.ActionURL.buildURL(
'flow-well',
'showWell',
LABKEY.ActionURL.getContainer(),
null,
{
wellId: record.get('FileIdLink')
}
Expand Down Expand Up @@ -1817,7 +1817,7 @@ LABKEY.ext.OpenCytoVisualization = Ext.extend( Ext.Panel, {
LABKEY.ActionURL.buildURL(
'reports',
'runReport',
LABKEY.ActionURL.getContainer(),
null,
{
reportId: 'module:OpenCytoVisualization/reports/schemas/Plot.R',
tabId: 'Source'
Expand Down

0 comments on commit a32e490

Please sign in to comment.