View Full Version : UIView - Standalone ?
mpete
09-12-2007, 11:27 AM
Hi all !
I'm quite new to ext, but what I have seen is truly amazing !
Question:
Is is possible to open a view without the navigator and the view actions ?
I would like to be able to open a view with the RestrictToCategory= parameter
Paging should ofcourse work :-)
Thanks for any information !
pete
mth96a
09-12-2007, 11:32 AM
the easiest way for me is to create a form in notes then
put this div(<div id='view1'allign = 'top' >Loading view, please wait... </div><div id = 'test'> </div>) at the top in pass through html.
then add the contents for your html head
and this too...
"<!-- dialog is created from existing markup -->" +@NewLine +
"<div id='dlg-video' style='visibility:hidden;'>" +@NewLine +
"<div class='x-dlg-hd'>Layout Dialog</div>" + @NewLine +
"<div class='x-dlg-bd'>" + @NewLine +
" <div id='west' class='x-layout-inactive-content'>" + @NewLine +
"</div>"+ @NewLine +
"<div id='center' class='x-layout-inactive-content' style='padding:10px;' > </div>"+ @NewLine
and then add this to the js header.
Note this code opens documents in a new layout dialog rather than a tab. Change your info for the uiview.
Ext.onReady(function() {
frm = new Ext.nd.Form();
frm.render();
});
var myApp = function(){
var showBtn, dialog;
return {
init : function() {
var frm2= window.document.forms[0];
var view1 = new Ext.nd.UIView({
viewName : 'By Account Web',
container : "view1",
viewTitle: "By Account",
showSingleCategory : "..Pick the Account ",
showCategoryComboBox :true}) ;
view1.openDocument = function(grid, rowIndex, e, bEditMode)
{var title = "Opening...";
var ds = grid.getDataSource();
var row = grid.selModel.getSelected();
var node = row.node;
var unid = node.attributes.getNamedItem('unid');
if (!unid) {
return;
} else {
unid = unid.value;
}
var viewUrl = this.getViewUrl(grid);
var link = viewUrl + '/' + unid + '?OpenDocument'
showVideo(link)}
//}
}// end init
};// end 'return'
}();
Ext.onReady(myApp.init, myApp, true);
var showVideo= function(url) {
dlgVideo = new Ext.LayoutDialog("dlg-video", {
closable: false,
modal:true,
width:825,
height:500,
shim: true,
shadow:true,
minWidth:300,
minHeight:300,
proxyDrag:true,
title: 'Time Entry',
center: {
autoScroll:true,
tabPosition: 'top',
closeOnTab: true,
alwaysShowTabs: false
}
});
dlgVideo.addKeyListener(27, dlgVideo.hide, dlgVideo);
var layout = dlgVideo.getLayout();
dlgVideo.beginUpdate();
var iframe = Ext.DomHelper.append(document.body,
{tag: 'iframe', frameBorder: 0, src: url});
feedPanel = new Ext.ContentPanel(iframe, {title: 'Time Entry', fitToFrame:true, autoScroll:true, closable: false});
layout.add('center', feedPanel);
dlgVideo.endUpdate();
dlgVideo.show();}
mpete
09-15-2007, 08:20 AM
Hmm.. cannot get this to work..
Here's my code so far:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<!-- Ext JS library -->
<script type='text/javascript' src='/extnd-alpha2r1/extnd-alpha2r1-db/extnd_a2r1.nsf/ext/adapter/ext/ext-base.js'></script>
<script type='text/javascript' src='/extnd-alpha2r1/extnd-alpha2r1-db/extnd_a2r1.nsf/ext/ext-all.js'></script>
<!-- Ext.nd JS library -->
<script type='text/javascript' src='/extnd-alpha2r1/extnd-alpha2r1-db/extnd_a2r1.nsf/extnd/extnd-all.js'></script>
<script type='text/javascript' src='/extnd-alpha2r1/extnd-alpha2r1-db/extnd_a2r1.nsf/Ext.nd.Session.js?ReadForm'></script>
<script type='text/javascript'>
Ext.nd.init({extndUrl : '/extnd-alpha2r1/extnd-alpha2r1-db/extnd_a2r1.nsf/'});
var ViewTemplateDefault = {};
ViewTemplateDefault.viewName = '';
</script>
<link rel='stylesheet' type='text/css' href='/extnd-alpha2r1/extnd-alpha2r1-db/extnd_a2r1.nsf/ext/resources/css/ext-all.css' />
<link rel='stylesheet' type='text/css' href='/extnd-alpha2r1/extnd-alpha2r1-db/extnd_a2r1.nsf/ext/resources/css/xtheme-aero.css' />
<link rel='stylesheet' type='text/css' href='/extnd-alpha2r1/extnd-alpha2r1-db/extnd_a2r1.nsf/extnd/resources/css/domino.css' />
<!-- dialog is created from existing markup -->
<div id='dlg-video' style='visibility:hidden;'>
<div class='x-dlg-hd'>Layout Dialog</div>
<div class='x-dlg-bd'>
<div id='west' class='x-layout-inactive-content'>
</div>
<div id='center' class='x-layout-inactive-content' style='padding:10px;' > </div>
<script language="JavaScript" type="text/javascript">
<!--
Ext.onReady(function() {
frm = new Ext.nd.Form();
frm.render();
});
var myApp = function(){
var showBtn, dialog;
return {
init : function() {
var frm2= window.document.forms[0];
var view1 = new Ext.nd.UIView({
viewName : '$All',
container : "$All",
viewTitle: "$All",
showSingleCategory : "..Pick the Account ",
showCategoryComboBox :true}) ;
view1.openDocument = function(grid, rowIndex, e, bEditMode)
{var title = "Opening...";
var ds = grid.getDataSource();
var row = grid.selModel.getSelected();
var node = row.node;
var unid = node.attributes.getNamedItem('unid');
if (!unid) {
return;
} else {
unid = unid.value;
}
var viewUrl = this.getViewUrl(grid);
var link = viewUrl + '/' + unid + '?OpenDocument'
showVideo(link)}
//}
}// end init
};// end 'return'
}();
Ext.onReady(myApp.init, myApp, true);
var showVideo= function(url) {
dlgVideo = new Ext.LayoutDialog("dlg-video", {
closable: false,
modal:true,
width:825,
height:500,
shim: true,
shadow:true,
minWidth:300,
minHeight:300,
proxyDrag:true,
title: 'Time Entry',
center: {
autoScroll:true,
tabPosition: 'top',
closeOnTab: true,
alwaysShowTabs: false
}
});
dlgVideo.addKeyListener(27, dlgVideo.hide, dlgVideo);
var layout = dlgVideo.getLayout();
dlgVideo.beginUpdate();
var iframe = Ext.DomHelper.append(document.body,
{tag: 'iframe', frameBorder: 0, src: url});
feedPanel = new Ext.ContentPanel(iframe, {title: 'Time Entry', fitToFrame:true, autoScroll:true, closable: false});
layout.add('center', feedPanel);
dlgVideo.endUpdate();
dlgVideo.show();}
// -->
</script>
<script language="JavaScript" type="text/javascript">
<!--
document._domino_target = "_self";
function _doClick(v, o, t, h) {
var form = document._PK1;
if (form.onsubmit) {
var retVal = form.onsubmit();
if (typeof retVal == "boolean" && retVal == false)
return false;
}
var target = document._domino_target;
if (o.href != null) {
if (o.target != null)
target = o.target;
} else {
if (t != null)
target = t;
}
form.target = target;
form.__Click.value = v;
if (h != null)
form.action += h;
form.submit();
return false;
}
// -->
</script>
</head>
<body text="#000000" bgcolor="#FFFFFF">
<form method="post" action="/extnd-alpha2r1/extnd-alpha2r1-db/extnd_a2r1.nsf/PK1?OpenForm&Seq=1" name="_PK1">
<input type="hidden" name="__Click" value="0"><div id='view1'allign = 'top' >Loading view, please wait... </div><div id = 'test'> </div></form>
</body>
</html>
Result-> Error:'form' is null or not an object
Any tips ?
becomcs
09-18-2007, 05:12 AM
I would like to be able to open a view with the RestrictToCategory= parameter
Be aware that restricttocategory and resort(asc or desc) don't work together.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.