Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
danrot committed Feb 13, 2017
2 parents 5c178b9 + 93c71a9 commit 3859496
Show file tree
Hide file tree
Showing 35 changed files with 1,471 additions and 704 deletions.
2 changes: 2 additions & 0 deletions .grunt/husky.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"services/husky/url-validator": "husky_services/url-validator",
"services/husky/logger": "husky_services/logger",
"services/husky/expression": "husky_services/expression",
"services/husky/storage": "husky_services/storage",

"bootstrap-datepicker": "bower_components/bootstrap-datepicker/bootstrap-datepicker",
"datepicker-ar": "bower_components/bootstrap-datepicker/locales/bootstrap-datepicker.az",
Expand Down Expand Up @@ -158,6 +159,7 @@
"services/husky/mediator",
"services/husky/translator",
"services/husky/url-validator",
"services/husky/storage",

"husky",
"__component__$navigation@husky",
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# CHANGELOG for husky

* 0.29.0 (2017-02-13)
* BUGFIX #762 Fixed empty list for non-table views in datagrid
* FEATURE #760 Implement basic storage and used it in datagrid
* ENHANCEMENT #761 Changed default image format for datagrid
* BUGFIX #759 Added inline-block to toggle icon in datagrid
* FEATURE #755 Added notification badge to tab-component
* ENHANCEMENT #754 Added new table-view style
* BUGFIX #753 Fixed bug with required date-picker
* ENHANCEMENT #720 Changed vertical align to middle for class "form-group"
* BUGFIX #749 Fixed defaultDisplayOption in itembox

* 0.28.1 (2016-11-21)
* HOTFIX #757 Changed ckeditor to not escape umlauts
* HOTFIX #693 fix remove of title when datagrid is cropped with a badge
Expand Down
4 changes: 4 additions & 0 deletions apimocker_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
"verbs": ["GET"],
"mockFile": "datagrid/tiles.json"
},
"admin/api/datagrid/tasks": {
"verbs": ["GET"],
"mockFile": "datagrid/tasks.json"
},

"admin/api/autocomplete": {
"verbs": ["GET"],
Expand Down
2 changes: 1 addition & 1 deletion apimocks/datagrid/fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"disabled": false,
"default": false,
"sortable": true,
"type": "title",
"type": "string",
"width": "25%",
"minWidth": "",
"editable": true
Expand Down
54 changes: 54 additions & 0 deletions apimocks/datagrid/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"_links": {
"self": {
"href": "http://husky.lo:7878/admin/api/datagrid?pageSize=4&sortBy=content1&sortOrder=desc"
}
},
"_embedded": {
"items": [
{
"id": 1,
"status": 0,
"task": "Unpublish",
"schedule": "2014-02-19T22:04:40+0100",
"created": "Manually",
"creator": "Donald Duck"
},
{
"id": 2,
"status": 0,
"task": "Unpublish",
"schedule": "2015-02-19T22:04:40+0100",
"created": "Manually",
"creator": "Mickey Mouse"
},
{
"id": 3,
"status": 1,
"task": "Publish",
"schedule": "2016-02-19T22:04:40+0100",
"created": "From event",
"creator": "Dagobert Duck"
},
{
"id": 4,
"status": 2,
"task": "Send message",
"schedule": "2014-05-19T22:04:40+0100",
"created": "From event",
"creator": "Donald Duck"
},
{
"id": 5,
"status": 0,
"task": "Publish",
"schedule": "2016-03-19T22:04:40+0100",
"created": "Manually",
"creator": "Trick Duck"
}
]
},
"total": 5,
"pages": 1,
"page": 1
}
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "husky",
"version": "0.28.1",
"version": "0.29.0",
"main": "js/husky.js",
"dependencies": {
"backbone": "1.1.*",
Expand Down
69 changes: 69 additions & 0 deletions demos/datagrid/styling/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<!doctype html>
<!--[if lt IE 7]>
<html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>
<html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>
<html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Datagrid demo</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="stylesheet" href="../../../dist/husky.css">

<style type="text/css">
#content {
max-width: 1200px;
margin: 0 0;
padding: 0 50px;
}

h1 {
padding: 20px 0 30px;
}

body {
overflow: auto;
}

.task-state {
width: 30px;
text-align: center;
margin-left: 10px;
}

.task-state.fa-check-circle {
color: green;
}

.task-state.fa-exclamation-triangle {
color: yellow;
}

.task-state.fa-ban {
color: red;
}
</style>
</head>
<body>
<div class="page">
<div id="content" class="grid">
<h2 class="divider m-top-30">datagrid | default</h2>
<div id="datagrid-default" class="grid-row"></div>

<h2 class="divider m-top-30">datagrid | styled with datagrid-table-view-light.scss</h2>
<div id="datagrid-light" class="grid-row"></div>
</div>

<script src="../../../bower_components/jquery/jquery.js"></script>
<script src="../../../bower_components/requirejs/require.js"></script>
<script src="../../js/defaults.js"></script>
<script src="script.js"></script>
</div>
</body>
</html>
90 changes: 90 additions & 0 deletions demos/datagrid/styling/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
require.config({
baseUrl: '../../../'
});

require(['lib/husky'], function(Husky) {
'use strict';

var app = new Husky({debug: {enable: true}}),
matchings = [
{
name: 'id',
translation: 'id',
disabled: true
},
{
name: 'status',
translation: 'status'
},
{
name: 'task',
translation: 'name',
sortable: true
},
{
name: 'schedule',
translation: 'schedule',
type: 'date',
sortable: true
},
{
name: 'created',
translation: 'created'
},
{
name: 'creator',
translation: 'creator',
}
],
contentFilter = {
status: function(content, argument, recordId) {
var iconString = 'fa-question';
switch(content) {
case 0:
iconString = 'fa-check-circle';
break;
case 1:
iconString = 'fa-exclamation-triangle';
break;
case 2:
iconString = 'fa-ban';
break;
}
return '<span class="' + iconString + ' task-state"/>';
}
};

app.start([
{
name: 'datagrid@husky',
options: {
el: '#datagrid-default',
url: 'http://husky.lo:7878/admin/api/datagrid/tasks',
contentFilters: contentFilter,
viewOptions: {
table: {
selectItem: false
}
},
pagination: false,
matchings: matchings
}
},
{
name: 'datagrid@husky',
options: {
el: '#datagrid-light',
url: 'http://husky.lo:7878/admin/api/datagrid/tasks',
contentFilters: contentFilter,
viewOptions: {
table: {
selectItem: false,
cssClass: 'light'
}
},
pagination: false,
matchings: matchings
}
},
]);
});
37 changes: 37 additions & 0 deletions demos/notification-badge/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!doctype html>
<!--[if lt IE 7]>
<html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>
<html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>
<html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Autocomplete Demo</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="stylesheet" href="../../dist/husky.min.css">
<style>
.container {
width: 800px;
margin: 30px auto;
}
</style>
</head>
<body>
<div class="container">
<div class="grid">
<div class="grid-row">
<a href="#" data-badge="10">I have a notification</a>
</div>
<div class="grid-row">
<a href="#">I havent one</a>
</div>
</div>
</div>
</body>
</html>
Loading

0 comments on commit 3859496

Please sign in to comment.