]> Softwares of Agnibho - obscalc.git/blobdiff - index.html
Enabled extra.js
[obscalc.git] / index.html
index ee94fcfb4f3cb2a66cfbd6b87b2cbeeb24ad244d..ef5015f7dc927f19fdb8da113e236b7dc151ef0e 100755 (executable)
    All rights reserved
  **********************************************************************
    This file is part of ObsCalc.
-   
+
    ObsCalc is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
-   
+
    ObsCalc is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
-   along with Obscalc. If not, see <http://www.gnu.org/licenses/>.
+   along with ObsCalc. If not, see <http://www.gnu.org/licenses/>.
 ***********************************************************************
 -->
 <!DOCTYPE html>
 <html>
-    <head>
-       <title>ObsCalc</title>
-       <meta name="viewport" content="width=device-width, initial-scale=1.0">
-       <link href="bootstrap.min.css" rel="stylesheet">
-       <link href="datepicker/jquery-ui.min.css" rel="stylesheet">
-       <link href="custom.css" rel="stylesheet">
-       <script src="jquery.min.js"></script>
-       <script src="bootstrap.min.js"></script>
-       <script src="angular.js"></script>
-       <script src="moment.js"></script>
-       <script src="datepicker/jquery-ui.min.js"></script>
-    </head>
-    <body>
-       <div class="container">
-           <div class="text-primary">
-               <div class="jumbotron">
-                   <h1>ObsCalc</h1>
-                   <h2>Obstetric Calculator</h2>
-               </div>
-           </div>
-           <div class="row" data-ng-app="oc" data-ng-controller="oc">
-               <div class="col-sm-6">
-                   <div class="panel panel-default">
-                       <div class="panel-heading">
-                           <p><strong>Calculate by Date</strong></p>
-                       </div>
-                       <div class="panel panel-body">
-                           <ul class="nav nav-tabs">
-                               <li class="active"><a href="#panel-lmp" aria-controls="panel-lmp" data-toggle="tab">Enter L.M.P.</a></li>
-                               <li><a href="#panel-edd" aria-controls="panel-edd" data-toggle="tab">Enter E.D.D.</a></li>
-                           </ul>
-                           <div class="tab-content">
-                               <div class="panel panel-default tab-pane active" id="panel-lmp">
-                                   <div class="panel-body">
-                                       <form name="form_lmp">
-                                           <div class="form-group">
-                                               <label>Enter L.M.P.:</label>
-                                               <div class="row">
-                                                   <div class="col-sm-8">
-                                                       <div data-ng-class="{'has-error':form_lmp.dt.$invalid}"><input class="form-control" type="date" id="lmp-dt" name="dt" data-ng-model="lmp_dt" placeholder="YYYY-MM-DD" autocomplete="off" data-ng-change="getEdd()"></div>
-                                                   </div>
-                                                   <div class="col-sm-4">
-                                                       <input type="reset" class="btn">
-                                                   </div>
-                                               </div>
-                                           </div>
-                                       </form>
-                                   </div><!-- body -->
-                               </div><!-- panel -->
-                               <div class="panel panel-default tab-pane" id="panel-edd">
-                                   <div class="panel-body">
-                                       <form name="form_edd">
-                                           <div class="form-group">
-                                               <label>Enter E.D.D.:</label>
-                                               <div class="row">
-                                                   <div class="col-sm-8">
-                                                       <div data-ng-class="{'has-error':form_edd.dt.$invalid}"><input class="form-control" type="date" id="edd-dt" name="dt" data-ng-model="edd_dt" placeholder="YYYY-MM-DD" autocomplete="off" data-ng-change="getLmp()"></div>
-                                                   </div>
-                                                   <div class="col-sm-4">
-                                                       <input type="reset" class="btn">
-                                                   </div>
-                                               </div>
-                                           </div>
-                                       </form>
-                                   </div><!-- body -->
-                               </div><!-- panel -->
-                           </div><!-- tab -->
-                           <table class="table table-bordered" data-ng-hide="lmp_dt==null">
-                               <tr class="active"><th>L.M.P.</th><th>E.D.D.</th></tr>
-                               <tr><th>{{showDate(lmp_dt)}}</th><th>{{showDate(edd_dt)}}</th></tr>
-                           </table>
-                       </div>
-                   </div>
-               </div><!-- col -->
-               <div class="col-sm-6">
-                   <div class="panel panel-default tab-pane" id="panel-usg">
-                       <div class="panel-heading">
-                           <p><strong>Calculate by U.S.G.</strong></p>
-                       </div>
-                       <div class="panel-body">
-                           <form name="form_usg">
-                               <div class="form-group">
-                                   <label>Enter U.S.G. date:</label>
-                                   <div data-ng-class="{'has-error':form_usg.dt.$invalid}"><input class="form-control" type="date" id="usg-dt" name="dt" data-ng-model="usg_dt" placeholder="YYYY-MM-DD" autocomplete="off"></div>
-                               </div>
-                               <div class="form-group">
-                                   <label>Enter U.S.G. Maturation:</label>
-                                   <div class="row">
-                                       <div class="col-md-6" data-ng-class="{'has-error':form_usg.wk.$invalid}"><input class="form-control" type="number" min="0" max="52" data-ng-model="usg_wk" name="wk" placeholder="Weeks" autocomplete="off"></div>
-                                       <div class="col-md-6" data-ng-class="{'has-error':form_usg.dy.$invalid}"><input class="form-control" type="number" min="0" max="6" data-ng-model="usg_dy" name="dy" placeholder="Days" autocomplete="off"></div>
-                                   </div>
-                               </div>
-                               <input type="reset" class="btn">
-                           </form>
-                           <br>
-                           <table class="table" data-ng-show="calcUsg()">
-                               <tr><th class="active">Maturation by U.S.G. at present</th><th>{{calcUsg()}}</th></tr>
-                           </table>
-                       </div><!-- body -->
-                   </div><!-- panel -->
-               </div>
-           </div>
-           <div class="alert alert-info">
-               <h3>Developed by Agnibho Mondal</h3>
-               <h4><a href="http://www.agnibho.com" style="text-decoration:none;color:inherit">www.agnibho.com</a></h4>
-           </div>
-       </div>
-       <script>
-        if(navigator.userAgent.indexOf("Chrome")==-1){
-            $("#lmp-dt").datepicker({
-                dateFormat:"yy-mm-dd",
-                changeYear:true,
-                changeMonth:true
-            });
-            $("#edd-dt").datepicker({
-                dateFormat:"yy-mm-dd",
-                changeYear:true,
-                changeMonth:true
-            });
-            $("#usg-dt").datepicker({
-                dateFormat:"yy-mm-dd",
-                changeYear:true,
-                changeMonth:true
-            });
-        }
-        var app=angular.module("oc",[]);
-        app.controller("oc",function($scope){
-            $scope.showDate=function(date){
-                if(date!=null){
-                    dt=moment(date);
-                    if(dt.isValid()){
-                        return dt.format("DD/MM/YY");
-                    }
-                }
-            }
-            $scope.getEdd=function(){
-                if($scope.lmp_dt!=null){
-                dt=moment($scope.lmp_dt);
-                    if(dt.isValid()){
-                        dt.add(9, "months");
-                        dt.add(7, "days");
-                        $scope.edd_dt=dt.toDate();
-                    }
-                    else{
-                        $scope.edd_dt=null;
-                    }
-                }
-                else{
-                    $scope.edd_dt=null;
-                }
-            };
-            $scope.getLmp=function(){
-                if($scope.edd_dt!=null){
-                dt=moment($scope.edd_dt);
-                    if(dt.isValid()){
-                        dt.subtract(9, "months");
-                        dt.subtract(7, "days");
-                        $scope.lmp_dt=dt.toDate();
-                    }
-                    else{
-                        $scope.lmp_dt=null;
-                    }
-                }
-                else{
-                    $scope.lmp_dt=null;
-                }
-            };
-            $scope.calcUsg=function(){
-                if($scope.usg_dt!=null){
-                dt=moment($scope.usg_dt);
-                    if(dt.isValid()){
-                        if($scope.usg_wk>=0 && $scope.usg_wk<=52 && $scope.usg_dy>=0 && $scope.usg_dy<=6){
-                            today=moment();
-                            diff=today.diff(dt, "days");
-                            console.log(diff);
-                            days=$scope.usg_wk*7+$scope.usg_dy+diff;
-                            return Math.floor(days/7)+" weeks "+days%7+" days";
-                        }
-                    }
-                }
-            };
-        });
-       </script>
-    </body>
+  <head>
+    <title>ObsCalc</title>
+    <link rel="icon" href="dist/logo.png">
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <script>
+var NAME="ObsCalc";
+var VERSION="2.2.0";
+var STORAGE="obscalc_data";
+var INFO_URL="https://code.agnibho.com/obscalc/info.json";
+var NOTIFY=true;
+    </script>
+    <style>
+.loader {
+  position: absolute;
+  left: 50%;
+  top: 50%;
+  border: 16px solid lavender;
+  border-top: 16px solid #428bca;
+  border-bottom: 16px solid #428bca;
+  border-radius: 50%;
+  width: 150px;
+  height: 150px;
+  margin: -75px 0 0 -75px;
+  animation: spin 2s linear infinite;
+}
+
+    @keyframes spin {
+      0% { transform: rotate(0deg); }
+      100% { transform: rotate(360deg); }
+    }
+    </style>
+
+  </head>
+  <body>
+    <div class="loader"></div>
+    <div class="container" style="display:none">
+      <div id="notify" style="position:fixed;margin:10px;z-index:2;display:none">
+        <div id="notify-alert" class="alert alert-info alert-dismissible">
+          <button type="button" class="close" data-dismiss="alert"><span>&times;</span></button>
+          <h4><span id="notify-text"></span> <a id="notify-link" href="#" class="btn btn-success btn-lg">Download</a></h4>
+        </div>
+      </div>
+      <div class="text-primary">
+        <div class="jumbotron">
+          <h1>ObsCalc</h1>
+          <h2>Obstetric Calculator</h2>
+        </div>
+      </div>
+      <div class="row" id="app">
+        <div class="col-sm-6">
+          <by-date :settings="settings"></by-date>
+        </div>
+        <div class="col-sm-6">
+          <by-usg :settings="settings"></by-usg>
+        </div>
+        <settings-btn :settings="settings"></settings-btn>
+      </div>
+      <div class="alert alert-info">
+        <h3>Copyright &copy; <span class="copyright" data-start="2016">2016</span> Agnibho Mondal</h3>
+        <h4><a href="http://www.agnibho.com" style="text-decoration:none;color:inherit">www.agnibho.com</a></h4>
+      </div>
+    </div>
+    <script src="dist/bundle.js"></script>
+    <script src="extra.js"></script>
+  </body>
 </html>