git clone your_repo_link
This file contains hidden or 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
function findGrandParent(array, id) { | |
// Diziyi her bir eleman için döngüye sok | |
for (let i = 0; i < array.length; i++) { | |
// Eğer elemanın id'si aranan id ile eşitse, elemanı, üst nesneyi ve üst nesnenin üst nesnesini döndür | |
if (array[i].StepId === id) { | |
return { item: array[i], parent: array, grandParent: array.parent }; | |
} | |
// Eğer elemanın Steps adında bir özelliği varsa, recursive olarak fonksiyonu çağır | |
if (array[i].Steps) { | |
// Recursive çağrı yapmadan önce, dizinin üst nesnesini Steps özelliğine ata |
This file contains hidden or 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
// https://stackoverflow.com/questions/3239834/window-onbeforeunload-not-working-on-the-ipad | |
if (typeof (onbeforeunloadCallBack) === "function") { | |
//newWindow.onbeforeunload = function (param) { | |
// onbeforeunloadCallBack(param); | |
//} | |
var isOnIOS = navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPhone/i); | |
var eventName = isOnIOS ? "pagehide" : "beforeunload"; |
This file contains hidden or 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
// wwwroot/js/ui-components klasörü açıp içinde her component'e özel dosyalar olabilir: | |
// alert-message.js | |
ko.components.register('alert-message', { | |
viewModel: function (params) { | |
var self = this; | |
self.css = params.css; | |
self.icon = params.icon; | |
self.text = params.text; | |
self.title = translate(`global.${self.icon}`); | |
}, |
This file contains hidden or 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
const box = document.querySelector(".box"); | |
document.addEventListener("click", function(e) { | |
if(e.composedPath().includes(box)) { | |
console.log("clicked inside it!") | |
} else { | |
console.log("clicked outside it!") | |
} | |
}) |
This file contains hidden or 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
// MIT Licensed | |
// Author: jwilson8767 | |
/** | |
* Waits for an element satisfying selector to exist, then resolves promise with the element. | |
* Useful for resolving race conditions. | |
* | |
* @param selector | |
* @returns {Promise} | |
*/ |
This file contains hidden or 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
# Use TODO to note missing features or functionality that should be added at a later date. | |
# Use FIXME to note broken code that needs to be fixed. | |
# Use OPTIMIZE to note slow or inefficient code that may cause performance problems. | |
# Use HACK to note code smells where questionable coding practices were used and should be refactored away. | |
# Use REVIEW to note anything that should be looked at to confirm it is working as intended. |
This file contains hidden or 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
$(input).inputmask({ | |
'alias': 'decimal', | |
'radixPoint': ',', | |
'groupSeparator': '.', | |
'autoGroup': true, | |
'rightAlign': false, | |
'digits': 2, | |
'suffix': ` ${bnvst.options.selectedCurrencySymbol}`, | |
'digitsOptional': false, | |
'placeholder': '0,00', |
This file contains hidden or 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
// Selectpicker converts to collapsible when the inside has a optgroup | |
$('.selectpicker').on('shown.bs.select', function (e, clickedIndex, isSelected, previousValue) { | |
if ($(e.target).find("optgroup").length > 0) { | |
//.bootstrap-select .dropdown-menu .dropdown-header | |
$(e.target).closest(".bootstrap-select").find(".dropdown-menu .dropdown-header").click(function (e) { | |
e.stopImmediatePropagation(); | |
var $this = $(this), | |
$thisOpt = $this.attr("class").split(" ")[1], | |
$opt = $this.siblings("li").not(".dropdown-header, .dropdown-divider"); |
This file contains hidden or 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
let meetingOriginal = [{ | |
id: 19, | |
datetime: '2019-01-02T13:28:03+05:30', | |
status: 'proposed', | |
createdBy: 'buyer', | |
buyerId: 2, | |
buyerFirstName: 'Demo', | |
buyerLastName: 'User', | |
buyerProfileUrl: null, | |
petId: 1, |
NewerOlder