Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //2
- Row{
- spacing: parent.width / 10
- width: frontEndOptionsRoot.width / 2.2
- UbuntuShape{
- id: ipboxArea2
- width: mainColumn.width
- height: mainColumn.height / 14
- color: "grey"
- TextInput{
- id: ipboxEdit2
- text: {
- var defaultIp = "http://127.0.0.1"
- if ( defaultIp === DataBase.frontendIp2())
- return defaultIp
- else
- return DataBase.frontendIp2()
- }
- color: "white"
- font.pixelSize: parent.width / 18
- anchors{
- centerIn: ipboxArea2
- }
- onAccepted:{
- DataBase.createInitFrontEndTable()
- function truncateFrontEnd2(){
- var db = DataBase.frontendDatabase();
- db.transaction(
- function(tx){
- tx.executeSql('DELETE FROM mythbuntu_frontend WHERE WD_1=2')
- }
- )
- }
- function insertIntoFrontEnd2Table() {
- var db = DataBase.frontendDatabase();
- db.transaction(
- function(tx) {
- tx.executeSql('INSERT INTO mythbuntu_frontend VALUES(?, ?, ?)', ['2', text , portboxEdit2.text]);
- }
- )
- }
- truncateFrontEnd2()
- insertIntoFrontEnd2Table()
- // debugging
- console.log("FrontEnd Table 2 is " + DataBase.frontendIp2())
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement