kendo-labs / kendo-bootstrapper

GNU General Public License v3.0
49 stars 20 forks source link

Analyze and accept dataSource attributes when defined via widget settings #38

Closed stefanrahnev closed 10 years ago

stefanrahnev commented 10 years ago

(Both javascript blocks were used in app.js) This code definition is accepted and passes lint verification (when new dataSource is explicitly instantiated):

$(document).ready(function(){
        $("#products").kendoAutoComplete({
           dataTextField: "ProductName",
           filter: "contains",
           minLength: 3,
           dataSource: new kendo.data.DataSource({
              type: "odata",
              serverFiltering: true,
              serverPaging: true,
              pageSize: 20,
              transport:{
                read: "http://demos.kendoui.com/service/Northwind.svc/Products"
              }
           })
        }); 
}); 

while this one reports errors (dataSource attributes not recognized as valid):

$(document).ready(function(){
        $("#products").kendoAutoComplete({
           dataTextField: "ProductName",
           filter: "contains",
           minLength: 3,
           dataSource: {
              type: "odata",
              serverFiltering: true,
              serverPaging: true,
              pageSize: 20,
              transport:{
                read: "http://demos.kendoui.com/service/Northwind.svc/Products"
              }
           })
        }); 
});