mirror of
https://github.com/nasa/openmct.git
synced 2025-06-14 13:18:15 +00:00
[Forms] Fill in specs
Fill in specs for scripts which support the mct-form and mct-control directives. WTD-530.
This commit is contained in:
@ -8,7 +8,8 @@ define(
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
var MATCH_ALL = /^.*$/;
|
||||
// Default ng-pattern; any non whitespace
|
||||
var NON_WHITESPACE = /\S/;
|
||||
|
||||
/**
|
||||
* The mct-form directive allows generation of displayable
|
||||
@ -37,8 +38,7 @@ define(
|
||||
].join("/");
|
||||
|
||||
function controller($scope) {
|
||||
var regexps = [],
|
||||
matchAll = /.*/;
|
||||
var regexps = [];
|
||||
|
||||
// ng-pattern seems to want a RegExp, and not a
|
||||
// string (despite what documentation says) but
|
||||
@ -47,7 +47,7 @@ define(
|
||||
function getRegExp(pattern) {
|
||||
// If undefined, don't apply a pattern
|
||||
if (!pattern) {
|
||||
return MATCH_ALL;
|
||||
return NON_WHITESPACE;
|
||||
}
|
||||
|
||||
// Just echo if it's already a regexp
|
||||
|
@ -1,8 +1,9 @@
|
||||
/*global define*/
|
||||
/*global define,moment*/
|
||||
|
||||
define(
|
||||
["../../lib/moment.min"],
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
var DATE_FORMAT = "YYYY-DDD";
|
||||
|
||||
|
Reference in New Issue
Block a user