View Full Version : Disable opening of documents from UIView
In a lotus web application, I have a view in which few documents are displayed. Now when we double click on the document it gets opened in a new tab.
I want to disable the option to open the document after the double click.
Any Hints ?
Thanks In Advance.
Zakaroonikov
6 Dec 2009, 1:34 PM
In a lotus web application, I have a view in which few documents are displayed. Now when we double click on the document it gets opened in a new tab.
I want to disable the option to open the document after the double click.
Any Hints ?
Thanks In Advance.
If you want to only disable the double click you could override the doubleclick method with an empty function. If you are setting up the view as follows:
var ExtndApp = function() {
return {
init : function(){
this.ui = new Ext.nd.DominoUI({
uiOutline : {
outlineName: 'mainOL'
//viewDefaults: {
// selModelConfig: {type: 'checkbox'}
//}
},
uiView : {
viewName: 'sc1',
viewTitle: 'A Categorized View',
//selModelConfig: {type: 'checkbox'},
showSearch: true,
dateTimeFormats : {
dateFormat : 'd/m/y',
timeFormat : 'h:i:s A',
dateTimeFormat : 'Y-M-d h:i:s A'
}
}
});
} // init
} // return
}();
then you could instead do this:
var ExtndApp = function() {
return {
init : function(){
this.ui = new Ext.nd.DominoUI({
uiOutline : {
outlineName: 'mainOL'
//viewDefaults: {
// selModelConfig: {type: 'checkbox'}
//}
},
uiView : {
viewName: 'sc1',
viewTitle: 'A Categorized View',
//selModelConfig: {type: 'checkbox'},
showSearch: true,
// ************* NEW *******************
gridHandleRowDblClick: function(grid, rowIndex, e, bEditMode){ return false;},
// ************* NEW *******************
dateTimeFormats : {
dateFormat : 'd/m/y',
timeFormat : 'h:i:s A',
dateTimeFormat : 'Y-M-d h:i:s A'
}
}
});
} // init
} // return
}();
jratcliff
6 Dec 2009, 7:33 PM
You can also set a 'beforeopendocument' listener on the uiview to just return false and that will tell the code to not open the doc.
so either in your uiview config:
listeners: {
'beforeopendocument' : function() {
return false;
}
}
or after you create your uiview
var myUIView = new Ext.nd.UIView({...});
myUIView.on('beforeopendocument', function() {
return false;
});
Thanks for the help.
Can this functionality be used for only a particular view of the Lotus Notes web application ?.
jratcliff
7 Dec 2009, 9:47 AM
Thanks for the help.
Can this functionality be used for only a particular view of the Lotus Notes web application ?.
Yes, in your listener, instead of just doing a "return false;" you can first check the view name. The beforeopendocument listener has the uiview passed in as the first paramater so you can check uiview.viewName and if it matches the view name that you are interested in then you can do the return false, otherwise, return true.
listeners : {
'beforeopendocument' : function(uiview) {
if (uiview.viewName == 'myview') {
return false;
} else {
return true;
}
}
}
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.