Announcement

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

    Can move column that has canReorder:false in column picker dialog

    SmartClient_v101p_2016-03-07_PowerEdition

    When a column is set to canReorder:false, it cannot be moved. However, if using the fieldpicker, another column can be reordered, moving the column out of order.

    REPRO Steps:
    =========
    1. Load the test case
    2. Observe that Inspection ID cannot be reordered
    3. Open Field Picker
    4. Highlight the Region/Country Column
    5. Click the Ip arrow multiple times until its moved to the first field in the list

    This should not be allows, Region should not be able to move beyond the Inspector ID field.

    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 = "SNT-14405";
                
                // test data
                var data = [
                    {inspectorID:12345, region:"Northeast", inspections:206, observations:913,lastInspectionDate:new Date(2012, 8, 13), index:52.6 },
                    {inspectorID:67890, region:"West", inspections:66, observations:2,lastInspectionDate:new Date(2013, 2,2), index:75.3 },
                    {inspectorID:54321, region:"Northeast", inspections:4, observations:67,lastInspectionDate:new Date(2013,2,3), index:75.3 },
                    {inspectorID:09876, region:"South", inspections:24, observations:0,lastInspectionDate:new Date(2012,8,31), index:52.6 }
                ];
                // datasource for the grid        
                isc.DataSource.create({
                    ID: "ds",
                    cacheData:data,
                    clientOnly: true
                });
                
                // 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({
                    dataSource: ds,
                    dataFetchMode : "local",
                    fields: [
                        {name:"inspectorID", title:"Inspector ID", type:"integer", canReorder: false }, 
                        {name:"inspections", type:"integer", title:"Number of Inspections Total"},
                        {name:"observations", title:"# Observations"},
                        {name:"region", type:"text", title:"Region/Country"},
                        {name:"lastInspectionDate", type:"date", title:"Last Inspection"}
                    ],
                    autoFetchData: true,
                    clientOnly: true,
                    position: "relative",
                    width : "100%",
                    align : "center",
                    autoFitData : "vertical",
                    autoFitMaxHeight : 400,
                    alternateRecordStyles : true,
                    canAddFormulaFields : true,
                    canAddSummaryFields : true,
                    canGroupBy : true,
                    canReorderFields : true,
                    showGroupSummary : true,
                    groupByMaxRecords : 5,
                    useAdvancedFieldPicker: true,
                    advancedFieldPickerThreshold: 5,
                    autoDraw: false,
                    badFormulaResultValue: "NA"
                });    
                
                
        
                // 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,
                        // ===== place anty components here
                        grid
                    ]
                });
                
                    
            </script>
    
        </body>
    
    </html>

    #2
    Is there any update on this issue?

    Comment


      #3
      We can confirm the issue is present, and we are developing a solution.

      Comment


        #4
        We don't actually prevent reorderable fields from being moved "past" a non-reorderable field, if the non-reorderable field is in the middle of the visible fields, surrounded by reorderable fields. This is mentioned in our SmartClient documentation. You can see this in your own example - if you grab the leftmost header button on the ListGrid, you can drag it all the way to the right, past the non-reorderable "Inspector ID" header button.

        That being said, we do want to prevent reorderable fields from being dragged into a contiguous set of non-reorderable fields at the left or right of the ListGrid (top or bottom in the AdvancedFieldPicker). We've made fixes to SC 10.1p and newer to ensure the AdvancedFieldPicker has this behavior and prohibits dragging field records (or using the equivalent buttons to move them) into such a contiguous group of non-reorderable fields at the top or bottom. This will be in the nightly builds stamped 2016-03-16 and newer.

        Comment

        Working...
        X