ExtJS Combobox not loading up in Panal - json

I have this panel view. Please check this JSFiddle . So I have a cgi script which returns json for combo-box value and label but its not loading up in combo-box. I am not sure why any help will be appreciated. I just want the options to show up each time combo-box drop down menu is clicked.
var incidentjreader = new Ext.data.JsonReader({},['cid','list']);
var incident_store = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: 'test.cgi'
}),
reader: incidentjreader
});
var incident_combo = new Ext.form.ComboBox({
store: incident_store,
mode: 'local',
id: 'incidentcombo',
typeAhead: false,
triggerAction: 'all',
width: 130,
fieldLabel: 'Incident',
valueField: 'cid',
displayField: 'list',
emptyText: 'Select Incident...',
});
incident_store.load();
Please check JSFiddle for more mode.

You are mixing ExtJS3.x syntax and 4.x API, use appropriate release examples to get you started.
Here is the same fiddle with fixed syntax and a few modifications:
http://jsfiddle.net/dbrin/QNSCk/4/

Related

How to create two level context menu in autodesk forge

I want to creat two level context menu but there is no api for this.Just look like this
level context menu image
what I can do?
It is rather straighforward to acheive a multi level context menu by deriving from Autodesk.Viewing.UI.ObjectContextMenu. Simply provide an array in the target field:
buildMenu (event, node) {
var menu = []
switch (node.type) {
case 'hubs':
menu.push({
title: 'Show details',
className: 'fa fa-share',
target: [{
title: 'Hub details',
className: 'fa fa-cloud',
target: () => {
this.emit('context.details', {
event, node, type: 'hubs'
})
}
}, {
title: 'Projects details',
className: 'fa fa-folder',
target: () => {
this.emit('context.details', {
event, node, type: 'hubs.projects'
})
}
}]
})
break
A complete example of this can be found here: DataContextMenu.js
Unfortunately, it's not available on current viewer version. You might have to write your own context menu in deep. But there is a workaround that you can follow:
Override functions of Autodesk.Viewing.Private.ContextMenu to provide multiple level menus.
Refer codes from Autodesk.Viewing.UI.ObjectContextMenu, then create your owned ObjectContextMenu and replace contextMenu property with the your owned multiple levels ContextMenu from the step 1.
Refer codes from Autodesk.Viewing.Extensions.ViewerObjectContextMenu, then write your owned ViewerObjectContextMenu that inherits the custom ObjectContextMenu from the step 2.
P.S. This is just a workaround, it's not the formal solution, you might have to use it at your own risk.

PhotoSwipe next/back icon

Is anyone even use PhotoSwipe before ?
https://github.com/dimsemenov/PhotoSwipe
I stuck at image left and right (back and next)
like this image.
I don't want the other icon. I want to know how to fix this.
I already try to disable image inside css but it's still not work
Please help.
You can use the following options available to show/hide photoswipe buttons/elements.
for more info read docs here
var options = {
history: false,
focus: false,
closeEl: true,
captionEl: true,
fullscreenEl: true,
zoomEl: true,
shareEl: true,
counterEl: true,
arrowEl: true,
preloaderEl: true
};

Unable to select multiple rows in kendo grid using Ctrl key

I have set selectable field in KendoGrid as "multiple,row" but still I am not able to select multiple rows using Ctrl key though it is working fine with Shift key.
Earlier it was working fine but after I had set virtualization in grid, it stopped working. Then I removed virtualization but still it is not working correctly since then. I have even restarted Visual studio, closed all the sessions but to no effect.
Can anyone please suggest a solution.
Please find the code below:
var sampleData = [];
var sampleDataSource= new kendo.data.DataSource({
data: sampleData ,
autoBind : false
});
$("#grid").kendoGrid({
dataSource: sampleDataSource,
height: 440,
selectable: "multiple",
sortable: true,
columns:[
{field: "Year", width:50, title: "Year"},
{field: "Name", title: "Name"}
]
});

How specify link url in json file to open in same window

It's possible to set url parameter in json to open link in same window?
target: "_parent"
not work, opens link in new tab/window
Thanks
I think this should work:
target: "_self"
its working see this code:
var headerItems= {
items: [
{
actionId:'logout',
href:'Logout.jsp',
label:'Log Out',
target: "_self"
}
]
};
Try the below one instead of target and all
{
name: 'logout',
isLabel: true,
url: 'Logout.jsp',
icon: 'fa fa-exclamation-triangle',
}

OpenLayers WFS with array of featureType shows just one featureType

I have WFS service with 2 layers and want to display both layers in one Vector layer:
var layer = new OpenLayers.Layer.Vector('test', {
styleMap: style,
strategies: [new OpenLayers.Strategy.BBOX()],
projection: new OpenLayers.Projection('EPSG:4326'),
protocol: new OpenLayers.Protocol.WFS({
version: '1.1.0',
srsName: 'EPSG:4326',
url: 'http://XXX/WFSServer?request=GetFeature&typeName=pref:type1,pref:type2',
featureType: ['type1', 'type2'],
singleFeatureType: false,
featurePrefix: 'pref',
geometryName: 'Shape',
readFormat: new OpenLayers.Format.GML.v3({ xy: false })
})
});
And OpenLayers show just pref:type1
What am I missing in configuration?
Thank you.
I think you overspecified the url. I would set it to
http://XXX/WFSServer
and let OL create the request based on your parameters.
Compare to this example