{
    "type": "object",
    "title": "Telephone",
    "properties": {
        "mode": { "title" : "MODE", "type": "string", "enum": ["Accueil/Verrouillage/Heure",
                                                               "Appel Entrant",
                                                               "Appel Sortant Numerote",
                                                               "Appel Sortant Multiple",
                                                               "Repondeur",
                                                               "SMS Details",
                                                               "SMS Conversations",
                                                               "APP",
                                                               "IMGS"
                                                              ] },
        "unlockpos": { "title" : "Zone de depart", "type": "string", "enum": ["TOPRIGHT", "TOPLEFT", "BOTTOMRIGHT", "BOTTOMLEFT" ]},
        
        
        "home": {
            "type":"object",
            "title":"Page Accueil",
            "options": {
                "collapsed": true
            },
            "properties": {
                
                "background": { "title" : "fond d'ecran", "type": "string", "enum": ["#files"],
                                "links": [
                                    {
                                        "href": "#ROOT/files/{{self}}",
                                        "mediaType": "image/png"
                                    }]
                              },
                
                "icons": { "type": "array",
                           "title": "Icons",
                           "format": "tabs",
                           "items": 
                           { "title" : "icon", "type": "string", "enum": ["#files"],
                             "links": [{
                                     "href": "#ROOT/libs/{{self}}",
                                 "mediaType": "image/png"
                             }] }
                         },
                
                "delay": { "title" : "Delai avant allumage (sec)", "type": "number"},
                "notifdelay": { "title" : "Delai avant apparition notification (sec)", "type": "number"},
                
                "notifs": { "type": "array",
                            
                            "title": "Notifications",
                            "format": "tabs",
                            "items": {
                                "type": "object",
                                "title": "Notification",
                                "properties": {
                                    "author": { "type": "string", "title": "expediteur"},
                                    "txt": { "type": "string", "title": "text"},
                                    "mms": { "title" : "MMS", "type": "string", "enum": ["#files"],
                                             "links": [
                                                 {
                                                     "href": "#ROOT/files/{{self}}",
                                                     "mediaType": "image/png"
                                                 }] },
                                    "oico": { "title" : "Autre icone", "type": "string", "enum": ["#files"] },
                                    "title": { "title" : "titre", "type": "string"},
                                    "nextdelay": { "title" : "notif suivante (sec)", "type": "number" }
                                }
                            }
                          },

                "hour": { "type": "string", "title": "Heure plein ecran" },
                "date": { "type": "string", "title": "Date plein ecran" },
                "unlock": {"type": "boolean", "title":"Avec deverouillage", "format":"checkbox"}

            }
        },

        "incall": {
            "type":"object",
            "options": {
                "collapsed": true
            },
            "title":"Appel Entrant",
            "properties": {
                
                "name": { "title" : "Nom du correspondant", "type": "string"},
                "name2": { "title" : "Nom du correspondant 2", "type": "string"},
                "dcall": { "title" : "Nom du double appel", "type": "string"},
                
                "avatar": { "title" : "Avatar rond", "type": "string", "enum": ["#files"],
                            "links": [
                                {
                                    "href": "#ROOT/files/{{self}}",
                                    "mediaType": "image/png"
                                }] },

                "avatar_bg": { "title" : "Avatar Plein ecran", "type": "string", "enum": ["#files"],
                            "links": [
                                {
                                    "href": "#ROOT/files/{{self}}",
                                    "mediaType": "image/png"
                                }] },
                "force_avatar_bg": {"title": "Avatar plein ecran pdt appel", "type":"boolean", "format": "checkbox"},

                "delay": { "title" : "Delai avant appel (sec)", "type": "number"},
               
                "misscalldelay": { "title" : "Delai avant fin d'appel (sec)", "type": "number"},
                "offdelay": { "title" : "Delai avant ecran noir (sec)", "type": "number"},
                "bt": {"title": "icone bluetooth activé", "type":"boolean", "format": "checkbox"}
            }
        },

        "outcall": {
            
            "type":"object",
            "options": {
                "collapsed": true
            },
            "title":"Appel sortant",
            "properties": {
                "numero": { "type": "string", "title": "numero à taper"},
                "autocomplete": { "type": "array",
                                  "title": "Recherche de numero",
                                  "format": "tabs",
                                  "items": {
                                      "type": "object",
                                      "title": "vcard",
                                      "properties": {
                                          "name": { "title" : "Nom", "type": "string"},
                                          "number": { "title" : "Numero", "type": "string"}
                                      }
                                  }
                                },
                
                "writespeed" : { "type": "number", "title": "temps d'ecriture entre 50 et 300 (ms)"} ,
                "favoris": { "type": "array",
                             "title": "Favoris",
                             "format": "tabs",
                             "items": {
                                 "type": "object",
                                 "title": "vcard",
                                 "properties": {
                                     "avatar": { "title" : "Avatar", "type": "string", "enum": ["#files"],
                                                 "links": [
                                                     {
                                                         "href": "#ROOT/files/{{self}}",
                                                         "mediaType": "image/png"
                                                     }] },
                                     "name": { "title" : "Nom", "type": "string"}
                                 }
                             }
                           },
                
                
                "directory": { "type": "array",
                               "title": "Repertoire téléphonique",
                               "format": "tabs",
                               "items": {
                                   "type": "object",
                                   "title": "vcard",
                                   "properties": {
                                       "avatar": { "title" : "Avatar", "type": "string", "enum": ["#files"],
                                                   "links": [
                                                       {
                                                           "href": "#ROOT/files/{{self}}",
                                                           "mediaType": "image/png"
                                                       }] },
                                       "name": { "title" : "Nom", "type": "string"}
                                   }
                               }
                             },
                
                "history": { "type": "array",
                             "title": "Historique des appels",
                             "format": "tabs",
                             "items": {
                                 "type": "object",
                                 "title": "vcard",
                                 "properties": {
                                     "avatar": { "title" : "Avatar", "type": "string", "enum": ["#files"],
                                                 "links": [
                                                     {
                                                         "href": "#ROOT/files/{{self}}",
                                                         "mediaType": "image/png"
                                                     }] },
                                     "name": { "title" : "Nom", "type": "string"},
                                     "hdetails": {"title": "detail de l'appel", "type": "string"}
                                     
                                 }
                             }
                           },

                "details": { "type": "object",
                             "title": "Fiche contact",
                             "properties": {
                                 "enabled": { "title": "fiche activé", "type": "boolean", "format": "checkbox", "default": false},
                                 "numtel": { "title" : "Numero de tel", "type": "string"}
                             }

                           }
                

                
                
            }
        },

        "sms": {
            "type":"object",
            "options": {
                "collapsed": true
            },
            "title":"Conversation SMS Details",
            
            "properties": {
                "dest": { "title" : "correspondant", "type": "string"},
                "color1": { "title": "couleur fond moi", "type": "string", "format": "color"},
                "color2": { "title": "couleur text moi", "type": "string", "format": "color"},
                "color3": { "title": "couleur pastille", "type": "string", "format": "color"},


                "msgs": { "type": "array",
                          "title": "Messages précédents",
                          "format": "tabs",
                          "items": {
                              "type": "object",
                              "title": "Message",
                              "properties": {
                                  "date": { "type": "string", "title": "date (ex: Aujourd'hui"},
                                  "hour": { "type": "string", "title": "heure (ex: il y a 1 heure)"},
                                  "txt": { "type": "string", "title": "texte du message"},
                                  "mms": { "title" : "MMS", "type": "string", "enum": ["#files"],
                                           "links": [
                                               {
                                                   "href": "#ROOT/files/{{self}}",
                                                   "mediaType": "image/png"
                                               }]
                                         },
                                  "dest": { "type": "boolean", "format": "checkbox", "title": "Message Reçu"},
                                  "deletable": { "type": "boolean", "format": "checkbox", "title": "Supprimable"},
                                  "wave": { "type": "boolean", "format": "checkbox", "title": "Wave"},
                                  "readmark": { "type": "string", "title": "Lu/Non Lu", "enum": ["", "lu", "nonlu"]}
                              }
                          }
                        },
                "writespeed" : { "type": "number", "title": "temps d'ecriture entre  50 et 300 (ms)"},
                "vocal": { "type": "boolean", "format": "checkbox", "title": "micro dictee vocale"},
                "dots": { "type": "boolean", "format": "checkbox", "title": "animation 3 petits points"},
                "send_msgs": { 
                    "type": "array",
                    "title": "Messages interactifs",
                    "format": "tabs",
                    "items": {
                        "type": "object",
                        "title": "Message interactif",
                        "properties": {
                            "date": { "type": "string", "title": "date (ex: il y a 1 heure)"},
                            "hour": { "type": "string", "title": "heure "},
                            "txt": { "type": "string", "title": "texte du message"},
                            "mms": { "title" : "MMS", "type": "string", "enum": ["#files"],
                                           "links": [
                                               {
                                                   "href": "#ROOT/files/{{self}}",
                                                   "mediaType": "image/png"
                                               }]
                                         },
                                  
                            "dest": { "type": "boolean", "format": "checkbox", "title": "Message Reçu"},
                            "deletable": { "type": "boolean", "format": "checkbox", "title": "Supprimable"},
                            "wave": { "type": "boolean", "format": "checkbox", "title": "Wave"},
                             "readmark": { "type": "string", "title": "Lu/Non Lu", "enum": ["", "lu", "nonlu"]}
                        }
                    }
                },
                "calling": { "title": "Icone Appel en cours", "type": "boolean", "format": "checkbox", "default": false},
                "callbut": { "title": "Icone Appel sortant", "type": "boolean", "format": "checkbox", "default": false}
                
                
            }
            
        },


        "smsdir": {
            "type":"object",
            "options": {
                "collapsed": true
            },
            "title":"Conversations SMS",
            
            "properties": {

                "directory": {
                    
                    "type": "array",
                    "title": "Liste des conversations",
                    "format": "tabs",
                    "items": {
                        "type": "object",
                        "title": "Conversation",
                        "properties": {
                            
                            "name": { "title" : "Nom", "type": "string"},
                            "text": { "title" : "Texte", "type": "string"},
                            "date": { "title" : "Date", "type": "string"},
                            "letter": { "title" : "Lettre", "type": "string"},
                            "color": { "title" : "Couleur", "type": "string", "format": "color"},
                            "avatar": { "title" : "Avatar", "type": "string", "enum": ["#files"],
                                        "links": [
                                            {
                                                "href": "#ROOT/files/{{self}}",
                                                "mediaType": "image/png"
                                            }] }

                        }
                    }
                }
            }
        },

        
          "repondeurlist": {
            "type":"object",
            "options": {
                "collapsed": true
            },
            "title":"Messages répondeur",
            
            "properties": {

                "directory": {
                    
                    "type": "array",
                    "title": "Liste des messages vocaux",
                    "format": "tabs",
                    "items": {
                        "type": "object",
                        "title": "Message vocal",
                        "properties": {
                            
                            "name": { "title" : "Nom", "type": "string"},
                            "text": { "title" : "Texte", "type": "string"}
                        }
                    }
                }
            }
        },
        
        "app": {
            "type":"object",
            "options": {
                "collapsed": true
            },
            "title":"App",
            
            
            "properties": {
                "title": { "title" : "Titre", "type": "string"},
                "scroll": { "title" : "scroll", "type": "boolean", "format":"checkbox"},
                "loop": { "title" : "loop", "type": "boolean", "format":"checkbox"},
                "head": { "title" : "head", "type": "boolean", "format":"checkbox"},
                "cam": { "title" : "cam", "type": "boolean", "format":"checkbox"},
                "topimg": { "title" : "Top Image", "type": "string", "enum": ["#files"],
                         "links": [
                             {
                                 "href": "#ROOT/files/{{self}}",
                                 "mediaType": "image/png"
                             }]
                          },
                "imgs": { "type": "array",
                           "title": "Imgs",
                           "format": "tabs",
                           "items": 
                           { "title" : "img", "type": "string", "enum": ["#files"],
                             "links": [{
                                 "href": "#ROOT/libs/{{self}}",
                                 "mediaType": "image/*"
                             }] }
                         }
                
            }
            
        },

         "imgs": {
            "type":"object",
            "options": {
                "collapsed": true
            },
            "title":"Imgs",
            
            
            "properties": {
                "imgs": { "type": "array",
                           "title": "Imgs",
                           "format": "tabs",
                           "items": 
                           { "title" : "img", "type": "string", "enum": ["#files"],
                             "links": [{
                                 "href": "#ROOT/libs/{{self}}",
                                 "mediaType": "image/*"
                             }] }
                         }
                
            }
            
        }

          
    

}
}
