Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5aec4474 authored by Alexandre Roux's avatar Alexandre Roux
Browse files

adding sim card selector

parent 9fca47b4
Loading
Loading
Loading
Loading
+32 −5
Original line number Diff line number Diff line
@@ -373,22 +373,49 @@ Modal
	transform: scale(1.1);
}

.app-ocsms{
.app-esms{
	height:100%;
}

#ocsms-send-button{
#esms-send-button{
	padding-left:20px;
	height: 25px;
	margin-bottom: 5px;
}

#ocsms-message{
	width:calc(100% - 55px);
#esms-message{
	width:calc(100% - 90px);
	height: 30px;
}

#ocsms-messages-container {
#esms-messages-container {
	width: 100%;
	height:100%
}


#esms-sim-card-select{
	position:fixed;
	display: none;
	height:100%;
	width:100%;
	background: rgba(32, 32, 32, 0.315);
	z-index: 1100;
}

#esms-sim-card-content {
	position: relative;
	background: white;
	padding:15px;
	width: 200px;
	left:50%;
	margin-left: -100px;
	margin-top: 100px;
}


#esms-simcard-button{
	padding-left:0px;
	height: 25px;
	margin-bottom: 5px;
}
 No newline at end of file
+52 −0
Original line number Diff line number Diff line
/**
 * Nextcloud - Phone Sync
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Loic Blot <loic.blot@unix-experience.fr>
 * @copyright Loic Blot 2014-2018
 */

var ContactList = new Vue({
	el: '#oc-sms-sim-card-select',
	data: {
		list: [],

	},
	created: function () {
		this.reset();
		this.loadSimCardList();
	},
	methods: {
		reset: function () {
			this.list = [];
		},
		loadSimCardList: function () {
			let self = this;
			// Now bind the events when we click on the phone number
			$.getJSON(Sms.generateURL('/front-api/v1/simCardList'), function (jsondata, status) {
				for (var sim of jsondata) {
					var text = "";
					if (sim['card_number'] != "")
						text += sim['card_number'] + " - "
					if (sim['card_slot'] != "")
						text += sim['card_slot'] + " - "
					if (sim['device_name'] != "")
						text += sim['device_name'] + " - "
					if (sim['carrier_name'] != "")
						text += sim['carrier_name'] + " - "
					sim.text = text
				}
				var sim = {}
				sim.text = "Auto"
				self.list = [sim]
				Array.prototype.push.apply(self.list, jsondata);

			});
		},
	},
	computed: {

	}
});
 No newline at end of file
+13 −0
Original line number Diff line number Diff line
@@ -46,6 +46,19 @@ use \OCA\ESms\Lib\CountryCodes;
</script>

<div id="app">
    <div id="esms-sim-card-select">
        <div id="esms-sim-card-content">
            blabla
            
            <div v-if="list.length > 0">
                <div v-for="sim in list">
                    
                        <input style="min-height:unset" type="radio" v-bind:id="sim.text" name="drone" v-bind:value="sim.text">
                        <label v-bind:for="sim.text">{{ sim.text }}</label>                   
                </div>
            </div>
        </div>
    </div>
    <div id="app-navigation">
        <div id="app-mailbox-peers">
            <div id="app-contacts-loader" class="icon-loading" v-if="isContactsLoading">