Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into svy2019_06
Browse files Browse the repository at this point in the history
  • Loading branch information
jcompagner committed Jun 12, 2019
2 parents 3076fd9 + a0b4f52 commit 14a4806
Show file tree
Hide file tree
Showing 14 changed files with 67 additions and 41 deletions.
2 changes: 1 addition & 1 deletion button/button.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"model":
{
"enabled" : { "type": "enabled", "blockingOn": false, "default": true, "for": ["onActionMethodID","onDoubleClickMethodID","onRightClickMethodID"] },
"imageStyleClass" : { "type" :"styleclass", "tags": { "scope" :"design" }},
"imageStyleClass" : { "type" :"styleclass" },
"tabSeq" : {"type" :"tabseq", "tags": { "scope" :"design" }},
"styleClass" : { "type" :"styleclass", "tags": { "scope" :"design" },"default": "btn btn-default", "values" :["btn","btn-default","btn-lg","btn-sm","btn-xs"]},
"text" : {"type":"tagstring" , "initialValue":"Button", "tags": { "directEdit" : "true" }},
Expand Down
11 changes: 9 additions & 2 deletions calendar/calendar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('bootstrapcomponentsCalendar',['servoy']).directive('bootstrapcomponentsCalendar', function($sabloApplication, $log, $apifunctions, $svyProperties, $sabloConstants) {
angular.module('bootstrapcomponentsCalendar',['servoy']).directive('bootstrapcomponentsCalendar', function($sabloApplication, $log, $apifunctions, $svyProperties, $sabloConstants, $applicationService) {
return {
restrict: 'E',
scope: {
Expand All @@ -22,6 +22,13 @@ angular.module('bootstrapcomponentsCalendar',['servoy']).directive('bootstrapcom
if (locale.language) {
options.locale = locale.language;
}

var showISOWeeks = $applicationService.getUIProperty('ngCalendarShowISOWeeks');
if (showISOWeeks)
{
options.isoCalendarWeeks = true;
}

child.datetimepicker(options);

$scope.$watch('model.format', function(){
Expand Down Expand Up @@ -175,7 +182,7 @@ angular.module('bootstrapcomponentsCalendar',['servoy']).directive('bootstrapcom
switch (property) {
case "size":
if (isAnchored) {
console.log(property + " - " + value.height);
if ($log.debugEnabled) $log.debug("bootstrap calendar * " + property + " - " + value.height);
$svyProperties.setCssProperty(inputElement, "height", value.height);
}
break;
Expand Down
3 changes: 2 additions & 1 deletion calendar/calendar.spec
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
"name":"event",
"type":"JSEvent"
}
]
],
"code": "return true"
},
"onFocusGainedMethodID" : {

Expand Down
8 changes: 7 additions & 1 deletion calendarinline/calendarinline.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
angular.module('bootstrapcomponentsCalendarinline',['servoy'])
.directive('bootstrapcomponentsCalendarinline', function($sabloApplication, $log, $apifunctions, $svyProperties, $sabloConstants) {
.directive('bootstrapcomponentsCalendarinline', function($sabloApplication, $log, $apifunctions, $svyProperties, $sabloConstants, $applicationService) {
return {
restrict: 'E',
scope: {
Expand All @@ -22,6 +22,12 @@ angular.module('bootstrapcomponentsCalendarinline',['servoy'])
options.locale = locale.language;
}

var showISOWeeks = $applicationService.getUIProperty('ngCalendarShowISOWeeks');
if (showISOWeeks)
{
options.isoCalendarWeeks = true;
}

child.datetimepicker(options);

function inputChanged(e) {
Expand Down
3 changes: 2 additions & 1 deletion calendarinline/calendarinline.spec
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"name":"event",
"type":"JSEvent"
}
]
],
"code": "return true"
}
},
"api":
Expand Down
3 changes: 2 additions & 1 deletion checkbox/checkbox.spec
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"name":"event",
"type":"JSEvent"
}
]
],
"code": "return true"
},
"onFocusGainedMethodID" : {

Expand Down
5 changes: 3 additions & 2 deletions choicegroup/choicegroup.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"readOnly" : { "type": "protected", "blockingOn": true, "default": false, "for": ["dataProviderID","onDataChangeMethodID"], "tags": {"scope":"runtime"} },
"inputType" : {"type" : "string" , "default" : "checkbox" ,"tags": { "scope" :"design" }, "values" : ["checkbox","radio"]},
"styleClass" : { "type" :"styleclass", "default" : "checkbox" , "tags": { "scope" :"design" }, "values" :["checkbox", "radio"]},
"valuelistID" : { "type" : "valuelist", "tags": { "scope" :"design" }, "for": "dataProviderID", "max":300},
"valuelistID" : { "type" : "valuelist", "tags": { "scope" :"design" }, "max":300},
"tabSeq" : {"type" :"tabseq", "tags": { "scope" :"design" }},
"toolTipText" : { "type" : "tagstring"},
"findmode" : { "type":"findmode", "tags":{"scope":"private"}, "for" : {"editable":true}},
Expand Down Expand Up @@ -45,7 +45,8 @@
"name":"event",
"type":"JSEvent"
}
]
],
"code": "return true"
},
"onFocusGainedMethodID" : {

Expand Down
3 changes: 2 additions & 1 deletion imagemedia/imagemedia.spec
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"name":"event",
"type":"JSEvent"
}
]
],
"code": "return true"
}
},
"api":
Expand Down
3 changes: 2 additions & 1 deletion list/list.spec
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
"name":"event",
"type":"JSEvent"
}
]
],
"code": "return true"
},
"onFocusGainedMethodID" : {

Expand Down
3 changes: 2 additions & 1 deletion select/select.spec
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"name":"event",
"type":"JSEvent"
}
]
],
"code": "return true"
},
"onFocusGainedMethodID" : {

Expand Down
53 changes: 28 additions & 25 deletions tabpanel/tabpanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ angular.module('bootstrapcomponentsTabpanel', ['servoy'])
handlers: "=svyHandlers",
api: "=svyApi"
},
controller: function($scope, $element, $attrs, webStorage) {
controller: function($scope, $element, $attrs) {

if ($scope.servoyApi.isInDesigner()) return;

Expand Down Expand Up @@ -165,25 +165,33 @@ angular.module('bootstrapcomponentsTabpanel', ['servoy'])
}

if ($scope.model.tabs && $scope.model.tabs.length > 0) {
// find the first enabled tab
var index = getFirstEnabledTabIndex();
if (index === -1) {
index = 0;
}
if ($scope.$parent && $scope.$parent.formname) {
var key = $scope.$parent.formname + "_" + $element.attr('name') + "_tabindex";
var storageValue = webStorage.session.get(key);
if (storageValue) {
index = parseInt(storageValue);
if (index > $scope.model.tabs.length) {
// check if there is any enabled tab
index = getFirstEnabledTabIndex();
if (index === -1) {
index = 0;
}
}

// check the latest enabled tab
var index = $scope.model.tabIndex;
if ($scope.model.tabs[index - 1] && $scope.model.tabs[index - 1].containedForm && $scope.model.tabs[index - 1].disabled !== true) {
// index is in a proper state
} else { // find the first enabled tab
index = getFirstEnabledTabIndex();
if (index === -1) {
index = 0;
}
}
}

// if ($scope.$parent && $scope.$parent.formname) {
// var key = $scope.$parent.formname + "_" + $element.attr('name') + "_tabindex";
// var storageValue = webStorage.session.get(key);
// if (storageValue) {
// index = parseInt(storageValue);
// if (index > $scope.model.tabs.length) {
// // check if there is any enabled tab
// index = getFirstEnabledTabIndex();
// if (index === -1) {
// index = 0;
// }
// }
// }
// }

if ($scope.model.tabs[index - 1] && $scope.model.tabs[index - 1].containedForm) {
// find the first enabled tab
$scope.model.tabIndex = index;
Expand Down Expand Up @@ -246,10 +254,6 @@ angular.module('bootstrapcomponentsTabpanel', ['servoy'])
var promise = $scope.servoyApi.formWillShow($scope.model.tabs[newValue - 1].containedForm, $scope.model.tabs[newValue - 1].relationName);
$scope.model.tabs[newValue - 1].active = true;
}
if ($scope.$parent && $scope.$parent.formname) {
var key = $scope.$parent.formname + "_" + $element.attr('name') + "_tabindex";
webStorage.session.add(key, newValue);
}
if ($scope.handlers.onChangeMethodID) {
$timeout(function() {
$scope.handlers.onChangeMethodID(oldValue, $window.event ? $window.event : $.Event("change"));
Expand Down Expand Up @@ -558,5 +562,4 @@ angular.module('bootstrapcomponentsTabpanel', ['servoy'])
tabCtrl.setButton(element, attrs["bsTabpanelButton"]);
}
}
})

})
3 changes: 2 additions & 1 deletion textarea/textarea.spec
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"name":"event",
"type":"JSEvent"
}
]
],
"code": "return true"
},
"onFocusGainedMethodID" : {

Expand Down
5 changes: 3 additions & 2 deletions textbox/textbox.spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dataProviderID" : { "type":"dataprovider", "pushToServer": "allow","tags": { "scope" :"design" }, "ondatachange": { "onchange":"onDataChangeMethodID","callback":"onDataChangeCallback"}},
"enabled" : { "type": "enabled", "blockingOn": false, "default": true, "for": ["dataProviderID","onActionMethodID","onDataChangeMethodID","onFocusGainedMethodID","onFocusLostMethodID","onRightClickMethodID"] },
"format" : {"for":["dataProviderID"] , "type" :"format"},
"inputType" : {"type":"string" , "pushToServer": "allow", "tags": { "scope" :"design" }, "default" : "text", "values" :["text", "password", "email", "tel", "date", "time", "datetime-local", "month", "week", "number", "color"]},
"inputType" : {"type":"string" , "pushToServer": "allow", "tags": { "scope" :"design", "valuesFieldType":"typeahead" }, "default" : "text", "values" :["text", "password", "email", "tel", "date", "time", "datetime-local", "month", "week", "number", "color","search"]},
"readOnly" : { "type": "protected", "blockingOn": true, "default": false,"for": ["dataProviderID","onDataChangeMethodID"], "tags": {"scope":"runtime"} },
"editable" : { "type": "protected", "blockingOn": false, "default": true,"for": ["dataProviderID","onDataChangeMethodID"] },
"placeholderText" : "tagstring",
Expand Down Expand Up @@ -57,7 +57,8 @@
"name":"event",
"type":"JSEvent"
}
]
],
"code": "return true"
},
"onFocusGainedMethodID" : {

Expand Down
3 changes: 2 additions & 1 deletion typeahead/typeahead.spec
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"name":"event",
"type":"JSEvent"
}
]
],
"code": "return true"
},
"onFocusGainedMethodID" : {

Expand Down

0 comments on commit 14a4806

Please sign in to comment.