Permalink
Browse files

Work on editing and viewing dates (no tiem support yet) for #38

1 parent 43ffd34 commit cb6946cd481e04e520972336f7a55dbd3ed98cbc @skyronic committed Mar 5, 2016
View
@@ -36,7 +36,7 @@
"fontawesome": "~4.3.0",
"bootstrap3-dialog": "~1.34.4",
"moment": "~2.10.3",
- "moment-timezone": "~0.3.1"
+ "moment-timezone": "^0.5.1"
},
"resolutions": {
"angular": "1.3.15"
@@ -48,7 +48,7 @@ public function getUserParams () {
protected $login = null;
public function useLogin ($login) {
$this->login = $login;
- $login->preprocess ();
+ $login->preprocess ($this);
if (!$login->check ()) {
$this->addPage ($login);
$this->render ();
@@ -10,7 +10,7 @@ public function renderInternal()
return <<<COMP
<div class="input-group">
- <datepicker show-weeks="true" class="well well-sm" $directives/>
+ <input type="date" $directives/>
</div>
COMP;
}
@@ -6,7 +6,7 @@ var ck = window.ck = {
var ckUrl = {
resetGetParams: function (params) {
var url = new Url();
- url.query.clear();
+ url.clearQuery();
for (var key in params) {
if (params.hasOwnProperty(key)) {
@@ -5,7 +5,7 @@
<link href="{{ staticRoot }}/vendor/fontawesome/css/font-awesome.css" type="text/css" rel="stylesheet" />
<link href="{{ staticRoot }}/vendor/bootstrap3-dialog/dist/css/bootstrap-dialog.css" type="text/css" rel="stylesheet" />
-<link href="{{ staticRoot }}/build/crudkit.css" type="text/css" rel="stylesheet" />
+<link href="{{ staticRoot }}/temp/crudkit.css" type="text/css" rel="stylesheet" />
<script src="{{ staticRoot }}/vendor/jquery/dist/jquery.js" type="text/javascript"></script>
<script src="{{ staticRoot }}/vendor/bootstrap/dist/js/bootstrap.js" type="text/javascript"></script>
@@ -17,6 +17,7 @@
<script src="{{ staticRoot }}/vendor/bootstrap3-dialog/dist/js/bootstrap-dialog.js" type="text/javascript"></script>
<script src="{{ staticRoot }}/vendor/jsurl/url.js" type="text/javascript"></script>
<script src="{{ staticRoot }}/vendor/moment/min/moment.min.js" type="text/javascript"></script>
+<script src="{{ staticRoot }}/vendor/moment-timezone/builds/moment-timezone-with-data.min.js" type="text/javascript"></script>
<script src="{{ staticRoot }}/vendor/adminlte/dist/js/app.js" type="text/javascript"></script>
<script src="{{ staticRoot }}/extra/ui-bootstrap-custom-0.13.0.min.js" type="text/javascript"></script>
<script src="{{ staticRoot }}/extra/ui-bootstrap-custom-tpls-0.13.0.min.js" type="text/javascript"></script>
@@ -1,4 +1,4 @@
-<link href="{{ staticRoot }}css/crudkit.min.css" type="text/css" rel="stylesheet" />
-<script src="{{ staticRoot }}js/crudkit.min.js" type="text/javascript"></script>
+<link href="{{ staticRoot }}build/css/crudkit.min.css" type="text/css" rel="stylesheet" />
+<script src="{{ staticRoot }}build/js/crudkit.min.js" type="text/javascript"></script>
@@ -18,7 +18,11 @@
<dl class="dl-horizontal">
{% for key, col in schema %}
<dt style={% if not loop.first %}"margin-top: 15px"{% endif %}>{{ col['label'] }}</dt>
+ {% if col['type'] == 'datetime' %}
+ <dd style="margin-top: 15px">{{ row[key]|date('m/d/Y', "UTC")}} </dd>
+ {% else %}
<dd style="margin-top: 15px">{{ row[key] }} </dd>
+ {% endif %}
{% endfor %}
</dl>
</div>

0 comments on commit cb6946c

Please sign in to comment.