self.chron_levels.pop();
}
}
+ this.add_regularity = function() {
+ self.regularity.push({
+ regularity_type : null,
+ chron_type : null,
+ parts : [{ sub_type : null }]
+ });
+ }
+ this.remove_regularity = function(idx) {
+ if (self.regularity.length > idx) {
+ self.regularity.splice(idx, 1);
+ }
+ // and add a blank entry back if need be
+ if (self.regularity.length == 0) {
+ self.add_regularity();
+ }
+ }
+ this.add_regularity_part = function(reg) {
+ reg.parts.push({
+ sub_type : null
+ });
+ }
+ this.remove_regularity_part = function(reg, idx) {
+ if (reg.parts.length > idx) {
+ reg.parts.splice(idx, 1);
+ }
+ // and add a blank entry back if need be
+ if (reg.parts.length == 0) {
+ self.add_regularity_part(reg);
+ }
+ }
+
}
// TODO chron only
// dummy pattern
- $scope.pattern = new PredictionPattern(["3","0","8","1","a","v.","b","no.","u","6","v","r","g","sequence","i","(year)","j","month","m","(day)","w","m","x","06,12"]);
+ $scope.pattern = new PredictionPattern(["3","0","8","1","a","v.","b","no.","u","6","v","r","g","sequence","i","(year)","j","month","m","(day)","w","m","x","06,12","y","pw02we","y","ow0402th,0501"]);
console.debug($scope.pattern);
}]
}