]> Softwares of Agnibho - obscalc.git/blob - src/main.js
Enabled extra.js
[obscalc.git] / src / main.js
1 /**********************************************************************
2 * Title: ObsCalc
3 * Description: An Obstetric Calculator
4 * Author: Agnibho Mondal
5 * Website: http://code.agnibho.com
6 **********************************************************************
7 Copyright (c) 2016 Agnibho Mondal
8 All rights reserved
9 **********************************************************************
10 This file is part of ObsCalc.
11
12 ObsCalc is free software: you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation, either version 3 of the License, or
15 (at your option) any later version.
16
17 ObsCalc is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License
23 along with Obscalc. If not, see <http://www.gnu.org/licenses/>.
24 **********************************************************************/
25
26 //Icon
27 import "./assets/logo.png"
28
29 //CSS
30 import "bootstrap/dist/css/bootstrap.css";
31 import "bootstrap-datepicker/dist/css/bootstrap-datepicker3.css";
32 import "./custom.css";
33
34 //JS libs
35 import "jquery";
36 import "bootstrap";
37 import "bootstrap-datepicker";
38 import "bootstrap-validator";
39
40 //Vue Components
41 import Vue from "vue";
42 import ByDate from "./ByDate.vue";
43 import ByUsg from "./ByUsg.vue";
44 import Settings from "./Settings.vue";
45
46 //Start app
47 new Vue({
48 el: "#app",
49 components: {
50 "by-date": ByDate,
51 "by-usg": ByUsg,
52 "settings-btn": Settings
53 },
54 data: {settings: ""},
55 mounted:function(){
56 try{
57 this.settings=JSON.parse(localStorage.getItem("obscalc_settings"));
58 }
59 catch(e){
60 }
61 finally{
62 if(this.settings==null){
63 this.settings={dstyle:"cal"};
64 }
65 else if(this.settings.dstyle!="cal" && this.settings.dstyle!="txt"){
66 this.settings={dstyle:"cal"};
67 }
68 }
69 }
70 });
71
72 //Routine jobs
73 import "./routine.js"
74
75 //Source Map
76 //#sourceMappingURL=dist/bundle.js.map;