-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
25,924 additions
and
3,323 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
6,652 changes: 3,330 additions & 3,322 deletions
6,652
dist/octagrid.min.js → dist/trainingapp/trainingapp.bundle.js
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{"octagrid":"./octagrid/Grid.ts" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { OctaGrid } from "../octagrid/Grid"; | ||
import { BootstrapFormBuilder } from "../octagrid/BootstrapFormBuilder"; | ||
import * as $ from 'jquery-validation' | ||
|
||
|
||
var metadata = '{"TrainingId":{"input":"number","grid_header_type": "checkbox","isdependent":false,"primary":true,"rules":{}},"Name":{"input":"text","isdependent":false,"primary":false,"rules":{"required":true}},"Description":{"input":"textarea","isdependent":false,"primary":false,"rules":{}},"Syllabus":{"input":"editor","isdependent":false,"primary":false,"rules":{}},"Career":{"input":"editor","isdependent":false,"primary":false,"rules":{}},"DateFrom":{"input":"datepicker","isdependent":false,"primary":false,"rules":{}},"DateTo":{"input":"datepicker","isdependent":false,"primary":false,"rules":{}},"Time":{"input":"text","isdependent":false,"primary":false,"rules":{"required":true}},"IsPopular":{"input":"checkbox","isdependent":false,"primary":false,"rules":{}},"IsRunning":{"input":"checkbox","isdependent":false,"primary":false,"rules":{}},"IsActive":{"input":"checkbox","isdependent":false,"primary":false,"rules":{}},"AddedOn":{"input":"hidden","isdependent":false,"primary":false,"rules":{}},"IsDeleted":{"input":"hidden","isdependent":false,"primary":false,"rules":{}}}'; | ||
var mdta = JSON.parse(metadata) | ||
var formbuilder = new BootstrapFormBuilder({ | ||
renderAt: "#formhere", | ||
showVertical: false, | ||
model: 'brand', | ||
makeColumn: 2, | ||
metadata: JSON.parse(metadata) | ||
|
||
}); | ||
var options = { | ||
show: ['TrainingId', 'Name', 'Description'], | ||
hideColumns: ['AddedBy', 'IsDeleted'], | ||
// searchBox: "#txtSearch", | ||
showAddNewButton: true, | ||
metadata: JSON.parse(metadata), | ||
model: 'brand', | ||
containers: { | ||
listContainer: $("#dvlist"), | ||
formContainer: $("#formhere"), | ||
paginationContainer: $("#pagehere"), | ||
itemperpage: $("#ddlItemsPerPage") | ||
}, | ||
enableForm: true, | ||
formBuilder: formbuilder | ||
}; | ||
var grid = new OctaGrid(options); | ||
|
||
grid.renderGrid($("#tbltest")); | ||
if (options.enableForm) { | ||
options.formBuilder.renderForm(); | ||
options.formBuilder.setGrid(grid); | ||
//grid.setForm(options.formBuilder); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// List all files in a directory in Node.js recursively in a synchronous fashion | ||
var walkSync = function(dir, filelist) { | ||
|
||
if( dir[dir.length-1] != '/') | ||
dir=dir.concat('/') | ||
|
||
var fs = fs || require('fs'), | ||
files = fs.readdirSync(dir); | ||
filelist = filelist || []; | ||
files.forEach(function(file) { | ||
if (fs.statSync(dir + file).isDirectory()) { | ||
filelist = walkSync(dir + file + '/', filelist); | ||
} | ||
else { | ||
// build regex search | ||
var re = new RegExp(/\entry.(json)/g); | ||
if( re.test(file) ) { | ||
console.log(file); | ||
filelist.push(dir+file); | ||
} | ||
} | ||
}); | ||
return filelist; | ||
|
||
|
||
}; | ||
var getAppEntries=function(dir){ | ||
|
||
var files=walkSync(dir); | ||
//var parsedJSON = require(x); | ||
var mergeJSON = require("merge-json") ; | ||
var result={}; | ||
files.forEach(function(file) { | ||
var json= require(file); | ||
//console.log(json) | ||
result = mergeJSON.merge(result, json) ; | ||
//console.log(result) ; | ||
}); | ||
return result; | ||
} | ||
|
||
var x=getAppEntries(__dirname); | ||
console.log(x.x) | ||
console.log(12) |