Wednesday 25 March 2020

getJSON and populate tingle

$.getJSON("https://jsonplaceholder.typicode.com/users/" + this.idfunction (user) {

                    var modal = new tingle.modal({
                        footer: true,
                        stickyFooter: false,
                        closeMethods: ['overlay''button''escape'],
                        closeLabel: "Close",
                        cssClass: ['custom-class-1''custom-class-2'],
                        beforeClose: function () {
                            return true// close the modal
                            return false// nothing happens
                        }
                    });

                    const htmlString = `<h1>User Information</h1>
                                        <h2>ID       : ${user.id}</h2>
                                        <h2>Name     : ${user.name}</h2>
                                        <h2>User Name:${user.username}</h2>`;
                    modal.setContent(htmlString);

                    // open modal
                    modal.open();

                    // add another button
                    modal.addFooterBtn('Ok Close!''tingle-btn tingle-btn--danger'function () {
                        // here goes some logic
                        modal.close();
                    });

                });

Wednesday 11 March 2020

Git step by step

1. Initialize git local repo "master"  using the command 

Go to the folder where your local developmet happening

E:\backup\me\chasy>git init 

Add data to local master repository

E:\backup\me\chasy>git add . 


E:\backup\me\chasy>git commit -m"larval based chasy project added to repo"

E:\backup\me\chasy>git remote add origin https://github.com/gunabalans/chasy.git

E:\backup\me\chasy>git remote -v
origin  https://github.com/gunabalans/chasy.git (fetch)
origin  https://github.com/gunabalans/chasy.git (push)


E:\backup\me\chasy>git push -f origin master

This is forced update if local maser repo is started before online github origin repo




===================

Now ready to sync with development

E:\backup\me\chasy>git add README.md

E:\backup\me\chasy>git commit -m"read me update"


E:\backup\me\chasy>git push oigin master