Skip to content

Commit

Permalink
Merge pull request #1182 from obiba/rhaeri-dev-1.4.x
Browse files Browse the repository at this point in the history
Prepared JS libraries for release 1.4.0.
  • Loading branch information
ymarcon authored Sep 28, 2016
2 parents bcfbdd7 + 8e56bc9 commit 88aceae
Show file tree
Hide file tree
Showing 27 changed files with 219 additions and 114 deletions.
10 changes: 5 additions & 5 deletions mica-webapp/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@
"mica-study-timeline": "https://github.com/obiba/mica-study-timeline.git#1.0",
"ng-file-upload": "12.0.4",
"ng-obiba": "https://github.com/obiba/ng-obiba.git#1.4.1",
"ng-obiba-mica": "https://github.com/obiba/ng-obiba-mica.git#branch-1.3.x",
"ng-obiba-mica": "https://github.com/obiba/ng-obiba-mica.git#1.3.0",
"modernizr": "2.8.3",
"swagger-ui": "2.1.4",
"filesize": "3.2.1",
"angular-utils-pagination": "0.11.1",
"angular-schema-form": "0.8.13",
"angular-schema-form-bootstrap": "https://github.com/obiba/angular-schema-form-bootstrap.git#master",
"angular-schema-form-bootstrap": "https://github.com/obiba/angular-schema-form-bootstrap.git#1.0.0",
"angular-schema-form-ui-ace": "0.1.2",
"angular-ui-ace": "0.2.3",
"angular-moment": "0.10.3",
"angular-schema-form-datetimepicker": "https://github.com/obiba/angular-schema-form-datetimepicker.git#~0.1.4",
"angular-schema-form-datetimepicker": "https://github.com/obiba/angular-schema-form-datetimepicker.git#~0.1.5",
"angular-xeditable": "0.1.12",
"angular-media-queries": "0.6.0",
"sf-localized-string": "https://github.com/obiba/sf-localized-string.git#master",
"sf-obiba-file-upload": "https://github.com/obiba/sf-obiba-file-upload.git#master",
"sf-localized-string": "https://github.com/obiba/sf-localized-string.git#1.1.3",
"sf-obiba-file-upload": "https://github.com/obiba/sf-obiba-file-upload.git#1.1.0",
"sf-checkboxgroup": "https://github.com/obiba/sf-checkboxgroup.git#1.0.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@
"angular-ui-sortable": ">=0.12.11",
"bootstrap-vertical-tabs": "~1.2.0"
},
"_release": "15ce20e759",
"version": "1.0.0",
"_release": "1.0.0",
"_resolution": {
"type": "branch",
"branch": "master",
"commit": "15ce20e759568ee81465aa104dbca3aba7b07854"
"type": "version",
"tag": "1.0.0",
"commit": "59a759bc80f7d9660489e02f84513ccd839a1076"
},
"_source": "https://github.com/obiba/angular-schema-form-bootstrap.git",
"_target": "master",
"_target": "1.0.0",
"_originalSource": "https://github.com/obiba/angular-schema-form-bootstrap.git"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-schema-form-bootstrap",
"version": "0.2.0",
"version": "1.0.0",
"description": "Bootstrap 3 decorator for Angular Schema Form",
"main": "bootstrap-decorator.js",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"main": [
"schema-form-date-time-picker.min.js"
],
"version": "0.1.4",
"version": "0.1.5",
"authors": [
"Cheng Zhu",
"Cheng Zhu<cheng@aqmin.com>"
Expand Down Expand Up @@ -36,13 +36,13 @@
"angular-mocks": ">= 1.2"
},
"homepage": "https://github.com/obiba/angular-schema-form-datetimepicker",
"_release": "0.1.4",
"_release": "0.1.5",
"_resolution": {
"type": "version",
"tag": "0.1.4",
"commit": "2fba38b01b0e9e8ef1c651688bceb2d76e472ab8"
"tag": "0.1.5",
"commit": "14ae0335c718098c51eb9e8710855b03e51732f1"
},
"_source": "https://github.com/obiba/angular-schema-form-datetimepicker.git",
"_target": "~0.1.4",
"_target": "~0.1.5",
"_originalSource": "https://github.com/obiba/angular-schema-form-datetimepicker.git"
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
angular.module("schemaForm").run(["$templateCache", function($templateCache) {$templateCache.put("directives/decorators/bootstrap/strap/datepicker.html","<div>\n <div class=\"visible-print form-group\" ng-class=\"{\'has-error\': hasError(), \'has-success\': hasSuccess(), \'has-feedback\': form.feedback !== false }\">\n <label class=\"control-label\" ng-show=\"showTitle()\">{{form.title}}</label>\n \n <p ng-show=\"form.key\"\n class=\"visible-print {{form.fieldHtmlClass}}\"\n sf-field-model=\"replaceAll\"\n aria-describedby=\"{{form.key.slice(-1)[0] + \'Status\'}}\" ng-bind-html=\"$$value$$\"></p>\n </div>\n \n <div class=\"hidden-print form-group\" ng-class=\"{\'has-error\': hasError(), \'has-success\': hasSuccess(), \'has-feedback\': form.feedback !== false }\">\n <label class=\"control-label\" ng-show=\"showTitle()\">{{form.title}}</label>\n \n <p ng-show=\"form.key\"\n class=\"visible-print {{form.fieldHtmlClass}}\"\n sf-field-model=\"replaceAll\"\n aria-describedby=\"{{form.key.slice(-1)[0] + \'Status\'}}\" ng-bind-html=\"$$value$$\"></p>\n \n <input\n type=\"text\" class=\"form-control\"\n ng-show=\"form.key\"\n ng-model=\"$$value$$\"\n schema-validate=\"form\"\n data-date-type=\"{{form.dateOptions.dateType || \'string\'}}\"\n data-date-format=\"{{form.dateOptions.dateFormat || \'yyyy-MM-dd\'}}\"\n data-autoclose=\"{{form.dateOptions.autoclose}}\"\n data-min-date=\"{{form.dateOptions.minDateIsRef ? (model[form.dateOptions.minDate] | sfDatePickerDefaultFormat : form.dateOptions.dateFormat) : form.dateOptions.minDate}}\"\n data-max-date=\"{{form.dateOptions.maxDateIsRef ? (model[form.dateOptions.maxDate] | sfDatePickerDefaultFormat : form.dateOptions.dateFormat) : form.dateOptions.maxDate}}\"\n data-use-navitve=\"{{form.dateOptions.useNative || false}}\"\n bs-datepicker />\n <span ng-if=\"form.feedback !== false\"\n class=\"form-control-feedback\"\n ng-class=\"evalInScope(form.feedback) || {\'glyphicon\': true, \'glyphicon-ok\': hasSuccess(), \'glyphicon-remove\': hasError() }\"></span>\n <div class=\"help-block\"\n ng-show=\"(hasError() && errorMessage(schemaError())) || form.description\"\n ng-bind-html=\"(hasError() && errorMessage(schemaError())) || form.description\"></div>\n </div>\n</div>");
angular.module("schemaForm").run(["$templateCache", function($templateCache) {$templateCache.put("directives/decorators/bootstrap/strap/datepicker.html","<div>\n <div class=\"visible-print form-group\" ng-class=\"{\'has-error\': hasError(), \'has-success\': hasSuccess(), \'has-feedback\': form.feedback !== false }\">\n <label class=\"control-label\" ng-show=\"showTitle()\">{{form.title}}</label>\n \n <p ng-show=\"form.key\"\n class=\"visible-print {{form.fieldHtmlClass}}\"\n sf-field-model=\"replaceAll\"\n aria-describedby=\"{{form.key.slice(-1)[0] + \'Status\'}}\" ng-bind-html=\"$$value$$\"></p>\n </div>\n \n <div class=\"hidden-print form-group\" ng-controller=\"DatePickerController\"\n ng-class=\"{\'has-error\': hasError(), \'has-success\': hasSuccess(), \'has-feedback\': form.feedback !== false }\">\n <label class=\"control-label\" ng-show=\"showTitle()\">{{form.title}}</label>\n \n <p ng-show=\"form.key\"\n class=\"visible-print {{form.fieldHtmlClass}}\"\n sf-field-model=\"replaceAll\"\n aria-describedby=\"{{form.key.slice(-1)[0] + \'Status\'}}\" ng-bind-html=\"$$value$$\"></p>\n\n <div ng-class=\"{\'input-group\' : isDirty()}\">\n <input\n type=\"text\" class=\"form-control\"\n ng-show=\"form.key\"\n ng-model=\"$$value$$\"\n schema-validate=\"form\"\n data-date-type=\"{{form.dateOptions.dateType || \'string\'}}\"\n data-date-format=\"{{form.dateOptions.dateFormat || \'yyyy-MM-dd\'}}\"\n data-autoclose=\"{{form.dateOptions.autoclose}}\"\n data-min-date=\"{{form.dateOptions.minDateIsRef ? (model[form.dateOptions.minDate] | sfDatePickerDefaultFormat : form.dateOptions.dateFormat) : form.dateOptions.minDate}}\"\n data-max-date=\"{{form.dateOptions.maxDateIsRef ? (model[form.dateOptions.maxDate] | sfDatePickerDefaultFormat : form.dateOptions.dateFormat) : form.dateOptions.maxDate}}\"\n data-use-navitve=\"{{form.dateOptions.useNative || false}}\"\n bs-datepicker />\n <span class=\"input-group-btn\" ng-show=\"isDirty()\">\n <button id=\"clear-btn-{{form.key.slice(-1)[0]}}\" type=\"button\" class=\"btn btn-sm btn-default\" ng-click=\"clear()\">&times;</button>\n </span>\n </div>\n\n <span ng-if=\"form.feedback !== false\" style=\"right: 45px;\"\n class=\"form-control-feedback\"\n ng-class=\"evalInScope(form.feedback) || {\'glyphicon\': true, \'glyphicon-ok\': hasSuccess(), \'glyphicon-remove\': hasError() }\"></span>\n <div class=\"help-block\"\n ng-show=\"(hasError() && errorMessage(schemaError())) || form.description\"\n ng-bind-html=\"(hasError() && errorMessage(schemaError())) || form.description\"></div>\n </div>\n</div>");
$templateCache.put("directives/decorators/bootstrap/strap/datetimepicker.html","<div class=\"form-group\" ng-class=\"{\'has-error\': hasError(), \'has-success\': hasSuccess(), \'has-feedback\': form.feedback !== false }\">\n <label class=\"control-label\" ng-show=\"showTitle()\">{{form.title}}</label>\n <div class=\"row\">\n <div class=\"form-control-date\">\n <div class=\"input-group\">\n <span class=\"input-group-addon\"><i class=\"fa fa-calendar\"></i></span>\n <input type=\"text\" class=\"form-control\" \n ng-show=\"form.key\"\n ng-model=\"$$value$$\"\n data-date-type=\"object\"\n data-date-format=\"{{form.options.dateFormat || \'yyyy-MM-dd\'}}\"\n data-autoclose=\"{{form.options.autoclose || \'1\'}}\"\n data-min-date=\"{{form.options.minDate}}\"\n data-max-date=\"{{form.options.maxDate}}\"\n data-use-navitve=\"{{form.options.useNative || false}}\"\n bs-datepicker />\n </div>\n </div>\n <div class=\"form-control-time\">\n <div class=\"input-group\">\n <span class=\"input-group-addon\"><i class=\"fa fa-clock-o\"></i></span>\n <input type=\"text\" class=\"form-control\" size=\"8\"\n ng-show=\"form.key\"\n ng-model=\"$$value$$\"\n data-time-type=\"object\"\n data-time-format=\"{{form.options.timeFormat || \'shortTime\'}}\"\n data-minute-step=\"{{form.options.minuteStep || \'15\'}}\"\n data-use-native=\"{{form.options.useNative || false}}\"\n bs-timepicker />\n </div>\n </div>\n </div>\n <input type=\"hidden\" sf-changed=\"form\" ng-model=\"$$value$$\" schema-validate=\"form\" />\n <div class=\"help-block\"\n ng-show=\"(hasError() && errorMessage(schemaError())) || form.description\"\n ng-bind-html=\"(hasError() && errorMessage(schemaError())) || form.description\"></div>\n</div>\n");
$templateCache.put("directives/decorators/bootstrap/strap/timepicker.html","<div class=\"form-group\" ng-class=\"{\'has-error\': hasError(), \'has-success\': hasSuccess(), \'has-feedback\': form.feedback !== false }\">\n <label class=\"control-label\" ng-show=\"showTitle()\">{{form.title}}</label>\n\n <!--<span class=\"input-group-addon\"><i class=\"fa fa-clock-o\"></i></span>-->\n <input type=\"text\" class=\"form-control\" size=\"8\"\n ng-show=\"form.key\"\n ng-model=\"$$value$$\"\n schema-validate=\"form\"\n data-use-native=\"{{form.timeOptions.useNative || false}}\"\n data-min-time=\"10:00\"\n data-max-time=\"16:30\"\n data-time-format=\"HH:mm\"\n data-time-type=\"string\"\n data-minute-step=\"15\"\n data-round-display=\"true\"\n bs-timepicker />\n\n <span ng-if=\"form.feedback !== false\"\n class=\"form-control-feedback\"\n ng-class=\"evalInScope(form.feedback) || {\'glyphicon\': true, \'glyphicon-ok\': hasSuccess(), \'glyphicon-remove\': hasError() }\"></span>\n\n <div class=\"help-block\"\n ng-show=\"(hasError() && errorMessage(schemaError())) || form.description\"\n ng-bind-html=\"(hasError() && errorMessage(schemaError())) || form.description\"></div>\n</div>\n\n\n");}]);
angular.module('schemaForm-datepicker', ['schemaForm', 'mgcrea.ngStrap.datepicker']).config(
['schemaFormProvider', 'schemaFormDecoratorsProvider', 'sfPathProvider', '$provide',
function(schemaFormProvider, schemaFormDecoratorsProvider, sfPathProvider, $provide) {
['schemaFormProvider', 'schemaFormDecoratorsProvider', 'sfPathProvider',
function(schemaFormProvider, schemaFormDecoratorsProvider, sfPathProvider) {

var picker = function(name, schema, options) {
if ((schema.type === 'string' || schema.type === 'number') && schema.format == 'datepicker') {
Expand All @@ -23,12 +23,22 @@ angular.module('schemaForm-datepicker', ['schemaForm', 'mgcrea.ngStrap.datepicke
schemaFormDecoratorsProvider.createDirective('datepicker',
'directives/decorators/bootstrap/strap/datepicker.html');
}])
.filter('sfDatePickerDefaultFormat', ['moment', function (moment) {
return function (dateStr, format) {
format = format || '';
return dateStr ? moment(dateStr, format.toUpperCase()).format('YYYY-MM-DD') : '';
};
}]);
.filter('sfDatePickerDefaultFormat', ['moment', function (moment) {
return function (dateStr, format) {
format = format || '';
return dateStr ? moment(dateStr, format.toUpperCase()).format('YYYY-MM-DD') : '';
};
}])
.controller('DatePickerController', ['$scope', function ($scope) {
$scope.isDirty = function () {
return $scope.ngModel.$dirty;
};

$scope.clear = function () {
$scope.model[$scope.form.key.slice(-1)[0]] = '';
$scope.ngModel.$setPristine(true);
}
}]);

angular.module('schemaForm-datetimepicker', ['schemaForm', 'mgcrea.ngStrap.datepicker', 'mgcrea.ngStrap.timepicker']).config(
['schemaFormProvider', 'schemaFormDecoratorsProvider', 'sfPathProvider',
Expand Down
Loading

0 comments on commit 88aceae

Please sign in to comment.