Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Regression - Field picker broken when moving all fields

    Here is a small UI issue that we have encountered with the field picker. THe use case may be very seldom, however I thought I would report it as an issue anyway since it was working in previous releases.

    Last release that test passed: SmartClient_v101p_2016-03-11_PowerEdition
    Current release tested (regression found):SmartClient_v101p_2016-03-24_PowerEdition

    REPRO Steps:
    =============
    - Load the test case
    - Open the field picker
    - Move all fields from Visible to Available (except Continent)
    - Attempt to move any field back to visible
    - Observe that no fields can be moved

    *** This does not occur with a grid not containing a static field (no drag, no menu, etc).

    Also note, in bot releases, that you can hide all columns making it not possible to bring any columns back:

    - Load the test case
    - Open the field picker
    - Move all fields from Visible to Available (except Continent)
    - Click Apply
    - Observe that all fields are hidden except Continent
    - Observe that there is no way to open field picker again (as only field is what we call static - no menu, no drag, etc.)




    Code:
    <!DOCTYPE html>
    
    <html>
        <head>
    
            <title></title>
            
            <style>
                .diagInfo {
                    font-size: 14px;
                    font-weight: bold;
                    padding: 5px;
                }
            </style>
            
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Core.js"></script>
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Foundation.js"></script>
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Containers.js"></script>
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Grids.js"></script>
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Forms.js"></script>
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_DataBinding.js"></script>
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Drawing.js"></script>
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_PluginBridges.js"></script>
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Charts.js"></script>    
            <script type="text/javascript" SRC="http://localhost:8080/isomorphic/skins/EnterpriseBlue/load_skin.js"></script>
        
            <script type="text/javascript" >
                var isomorphicDir="http://localhost:8080/isomorphic/";
                
                // set this to the correct JIRA ticket
                var JIRA_TICKET = "SNTQ-1237";
                
                countryData = [
    
    {
        continent:"North America",
        countryName:"United States",
        countryCode:"US",
        area:9631420,
        population:298444215,
        gdp:12360.0,
        independence:new Date(1776,6,4),
        government:"federal republic",
        government_desc:2,
        capital:"Washington, DC",
        member_g8:true,
        article:"http://en.wikipedia.org/wiki/United_states"
    },
    {
        continent:"Asia",
        countryName:"China",
        countryCode:"CH",
        area:9596960,
        population:1313973713,
        gdp:8859.0,
        government:"Communist state",
        government_desc:0,
        capital:"Beijing",
        member_g8:false,
        article:"http://en.wikipedia.org/wiki/China"
    },
    {
        continent:"Asia",
        countryName:"Japan",
        countryCode:"JA",
        area:377835,
        population:127463611,
        gdp:4018.0,
        government:"constitutional monarchy with parliamentary government",
        government_desc:1,
        capital:"Tokyo",
        member_g8:true,
        article:"http://en.wikipedia.org/wiki/Japan"
    },
    {
        continent:"Asia",
        countryName:"India",
        countryCode:"IN",
        area:3287590,
        population:1095351995,
        gdp:3611.0,
        independence:new Date(1947,7,15),
        government:"federal republic",
        government_desc:2,
        capital:"New Delhi",
        member_g8:false,
        article:"http://en.wikipedia.org/wiki/India"
    }
    
    ]
    
            
                
                // once page loads set some diagnostic information, DO NOT CHANGE
                isc.Page.setEvent("load", function() {
                    document.title = JIRA_TICKET + "   (SmartClient version " + isc.versionNumber + ")";
                    var html = [];
                    html.push("Jira: " + JIRA_TICKET);
                    html.push("SmartClient: " + isc.versionNumber);
                    html.push("Browser: " + navigator.appCodeName + " " + navigator.appName + " " + navigator.appVersion);
                    diagLabel.setContents( html.join("<br>"));
                });
                
                
                
    
            </script>
    
    </head>
        
        <body>
            <script>
            
                // ===== DO NOT REMOVE =====
                var diagLabel = isc.Label.create({
                            ID: "diagInfo",
                            width: "100%",
                            styleName: "diagInfo",
                            autoFit: true
                        });
                // ===== DO NOT REMOVE =====
                            
                // basic grid        
                var grid = isc.ListGrid.create({
                    data: countryData,
                    dataFetchMode : "local",
    autoFetchData:true,
    fields:[
                    {name:"continent", title:"Continent",canHide:false, canDragResize:false, canReorder:false,showDefaultContextMenu:false},
                    {name:"countryCode", title:"Code"},
                    {name:"countryName", title:"Country"},
                    {name:"capital", title:"Capital"}
                ],
                    position: "relative",
                    width : "100%",
                    align : "center",
                    autoFitData : "vertical",
                    autoFitMaxHeight : 400,
                    alternateRecordStyles : true,
                    canAddFormulaFields : true,
                    canAddSummaryFields : true,
                    canGroupBy : true,
                    canReorderFields : true,
                    showGroupSummary : true,
                    groupByMaxRecords : 1000,
                    useAdvancedFieldPicker: true,
                    advancedFieldPickerThreshold: 2,
                    autoDraw: false
                    
                });    
                
                    
                // the main page layout - place all other components afetr diagLabel
                var layout = isc.VLayout.create({
                    width:"100%",
                    membersMargin: 20,
                    members: [
                        // ===== DO NOT REMOVE diagLabel
                        diagLabel,
                        grid
                        
                        // ===== place anty components here
        
                    ]
                });
    
                    
            </script>
    
        </body>
    
    </html>

    #2
    In the case of your first issue, the restriction is present because in that case all of the visible fields are non-reorderable, so technically there is no valid position to allow placement of available fields pursuant to the previous bug you filed. However, after consideration, we have made a change to allow placement at the end of the visible field list in that case (where all fields are non-reorderable) to avoid a situation where you'd get stuck.

    This has been applied to SC 10.1p and newer and will be in the nightly builds dated 2016-03-30 and beyond.

    The second issue you describe - having no context menu available - is intended behavior, since you've explicitly disabled the context menu on that field. You can either remove that setting, or change that ListGrid's configuration so as to ensure that a scrollbar gap or scrollbar is displayed, since the context menu is also available via right click at the top of the scrollbar/scrollbar gap.

    Comment

    Working...
    X