Skip to content

Instantly share code, notes, and snippets.

View NickersF's full-sized avatar
🚀
Preparing to launch a great product.

Nicholas Fazzolari NickersF

🚀
Preparing to launch a great product.
  • Association of Oregon Counties
  • Portland Or
View GitHub Profile
@NickersF
NickersF / childGridSaveAndAddNewBtn.ts
Created February 7, 2024 21:25
Save And Add New For Child Grids
console.log(`#AddChildGridRow_Btn_${curGridName.split('_')[1]}`);
let childGridAddRecordBtnEl = $(`#AddChildGridRow_Btn_${curGridName.split('_')[1]}`);
console.log(childGridAddRecordBtnEl);
setTimeout(function () {
if (childGridAddRecordBtnEl.length === 0) {
console.log("parent grid case");
$(`${curGridName}AddGridRow_Btn`).trigger("click")[0];
} else {
console.log("child grid case");
childGridAddRecordBtnEl.trigger("click")[0];
@NickersF
NickersF / filterObject.ts
Created January 25, 2024 16:52
Custom Kendo DataSource Filter Object
// Construct a filter object and apply it to the grid data source filters
let currentColumnFilter = {
field: currentKeyField,
operator: filterMenuOperatorDDInstance.value(),
value: filterMenuKeyFieldDDInstance.value()
};
gridInstance.dataSource.filter(currentColumnFilter);
@NickersF
NickersF / ddEv.ts
Created February 22, 2023 16:57
Popup editor DD list wrapper event handlers
// Setup wrapper events
popupEditorDropDownWrappers.bind("focus", (e) => {
console.log(e);
let currDDList = $(e.currentTarget).children().eq(2).data("kendoDropDownList");
if (currDDList != undefined) {
console.log(currDDList);
}
});
@NickersF
NickersF / color_gen.ts
Created December 24, 2022 08:40
Basic Color Generator Methods
export function generateStepNames(colorNamesArray: Array<string>, numOfSteps: number, baseColor: string) {
if (numOfSteps < 0 || numOfSteps > 10) {
return console.log("Invalid color step range provided.");
}
for (let index = 0; index < numOfSteps; index++) {
colorNamesArray.push("fe-" + baseColor + "-0" + index.toString());
}
}
@NickersF
NickersF / openconfig_method.ts
Created October 10, 2022 15:04
open config method
openConfig(config: string, hidewindow: boolean = false) {;
//config will be sent here from the dropdown or default to default;
if ($('#OnScreenConfig').val() != "") config = $('#OnScreenConfig').val();
else config = $('#OnScreenConfig').data('kendoDropDownList').text();
var self = this;
// Setup ListView DataSource object
self.gridConfigManagerDataSource = new kendo.data.DataSource({
transport: {
create: {
@NickersF
NickersF / contextMenu.ts
Created October 3, 2022 14:43
Loops for filtering grid column menu aggregate counts and positions.
interface IColumnAggregateCount {
field: string;
aggregateCount: number;
}
let columnAggregateCountObjects = new Array<IColumnAggregateCount>();
let columnsWithActiveAggregates: string[] = [];
// This code may come in handy in the future. It enumerates aggregates on columns.
// Increment aggregate count column-wise
// Selectors
.some-class {
rule: value;
}
#IdSelector {
rule: value;
}
@NickersF
NickersF / iris_code_conventions_ts.ts
Last active May 31, 2022 20:20
TypeScript Conventions
// Casing
// Pascal casing
StringVariable: string;
// Came casing
stringVariable: string;
// Snake casing
string_variable: string;
// Line spacing
// Casing
// Pascal casing
string StringVariable;
// Came casing
string stringVariable;
// Snake casing
string string_variable;
// Line spacing
@NickersF
NickersF / apiFilterString.cs
Created April 14, 2022 21:59
Multi expression API filter
String.Format("[Notice_Key:eq:{0}:null:null:null:and][Notice_Type:eq:{1}:null:null:null:and]", Notice_Key, Notice_Type);